summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cf18dd2e353608e438d0da028259a5f422cf04d3 (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 255141 2015-12-10 04:45:28Z foutrelis $
# Maintainer: Kamran Mackey <kamranm1200@gmail.com>

pkgbase=flac-git
pkgname=('flac-git' 'flac-doc-git')
pkgver=r3581.02a9262
pkgrel=1
arch=('i686' 'x86_64')
url="http://flac.sourceforge.net/"
license=('BSD' 'GPL')
depends=('gcc-libs' 'libogg')
makedepends=('nasm' 'doxygen')
options=('!makeflags')
source=(git://git.xiph.org/flac.git)
sha1sums=('SKIP')
_gitname=flac

pkgver() {
  cd "$_gitname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

}

build() {
  cd "$_gitname"
  ./autogen.sh
  ./configure --prefix=/usr --disable-sse
  make
}

package_flac-git() {
  pkgdesc="Free Lossless Audio Codec (git version)"
  options=('!docs')
  conflicts=('flac')
  provides=('flac')

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

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

  cd "$_gitname"
  make DESTDIR="${pkgdir}" -C doc install
  sed -i "s|$srcdir/$_gitname|/usr|" "${pkgdir}/usr/share/doc/$_gitname/FLAC.tag"
}