summaryrefslogtreecommitdiff
path: root/extra/flac/PKGBUILD
blob: 6c8f47393f370085be8ebb20045e63824a2507ae (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
# $Id: PKGBUILD 186549 2013-05-28 18:39:02Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgbase=flac
pkgname=('flac' 'flac-doc')
pkgver=1.3.0
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
url="http://flac.sourceforge.net/"
license=('BSD' 'GPL')
depends=('libogg')
makedepends=('doxygen')
[ "$CARCH" = "mips64el" ] || makedepends+=('nasm' 'xmms')
options=('!libtool' '!makeflags')
source=(http://downloads.xiph.org/releases/flac/${pkgbase}-${pkgver}.tar.xz)
sha1sums=('a136e5748f8fb1e6c524c75000a765fc63bb7b1b')

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

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

package_flac() {
  pkgdesc="Free Lossless Audio Codec"
  [ "$CARCH" = "mips64el" ] || optdepends=('xmms: for using the xmms plugin')
  options=('!libtool' '!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"
}