summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2d7c7754b07d00cef930c77186699b97cb9124e8 (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
52
53
# Maintainer: Evelyn Marie <evelynelizabethmarie@gmail.com>

pkgbase=flac-git
pkgname=(flac-git flac-doc-git)
pkgver=1.3.3.r85.gb358381a
pkgrel=1
arch=(x86_64 aarch64)
url="https://xiph.org/flac/"
license=(BSD GPL)
depends=(gcc-libs libogg)
makedepends=(git nasm doxygen)
source=("git+https://github.com/xiph/flac.git")
sha256sums=('SKIP')

pkgver() {
  cd "flac"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "flac"
  ./autogen.sh
}

build() {
  cd "flac"
  ./configure --prefix=/usr --enable-64-bit-words
  make
}

package_flac-git() {
  pkgdesc="Free Lossless Audio Codec"
  options=(!docs)
  conflicts=(flac)
  provides=(flac libFLAC.so libFLAC++.so)

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

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

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