summaryrefslogtreecommitdiff
path: root/extra/flac/PKGBUILD
blob: 7a5737e9b762bca0abb4335cbf3d89e886db333d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# $Id: PKGBUILD 215465 2014-06-26 00:20:23Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgbase=flac
pkgname=('flac' 'flac-doc')
pkgver=1.3.0
pkgrel=3
arch=('i686' 'x86_64')
url="http://flac.sourceforge.net/"
license=('BSD' 'GPL')
depends=('gcc-libs' 'libogg')
makedepends=('nasm' 'doxygen')
options=('!makeflags')
source=(http://downloads.xiph.org/releases/flac/${pkgbase}-${pkgver}.tar.xz flac-realloc.patch)
sha1sums=('a136e5748f8fb1e6c524c75000a765fc63bb7b1b'
          '22bf08219c289d747f399e351c701d0f195d3ce0')

prepare() {
  cd ${pkgbase}-${pkgver}
  patch -p1 -i "${srcdir}/flac-realloc.patch"
}

build() {
  cd ${pkgbase}-${pkgver}
  ./configure --prefix=/usr --disable-sse
  make
}

check() {
  cd ${pkgbase}-${pkgver}
  make check
}

package_flac() {
  pkgdesc="Free Lossless Audio Codec"
  options=('!docs')

  cd ${pkgbase}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -D -m644 COPYING.Xiph "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_flac-doc() {
  pkgdesc="Developer documentation for the Free Lossless Audio Codec"
  depends=('flac')

  cd ${pkgbase}-${pkgver}
  make DESTDIR="${pkgdir}" -C doc install
  sed -i "s|$srcdir/${pkgbase}-${pkgver}|/usr|" "${pkgdir}/usr/share/doc/${pkgbase}-${pkgver}/FLAC.tag"
  install -D -m644 COPYING.Xiph "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}