aboutsummaryrefslogtreecommitdiffstats
path: root/main/flac/APKBUILD
blob: df6145f56d30d6b1caeb6095cfd3aebc251f1f00 (plain) (blame)
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
54
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=flac
pkgver=1.3.3
pkgrel=0
pkgdesc="Free Lossless Audio Codec"
url="https://xiph.org/flac/"
arch="all"
license="custom:Xiph LGPL GPL FDL"
options="!checkroot !check" # Tests are infinite
subpackages="$pkgname-dev $pkgname-doc"
makedepends="libogg-dev !libiconv"
source="http://downloads.xiph.org/releases/flac/flac-$pkgver.tar.xz"

# secfixes:
#   1.3.2-r2:
#     - CVE-2017-6888


build() {
	cd "$builddir"

	local _arch_conf
	case "${CARCH}" in
		ppc*)	_arch_conf="--enable-altivec" ;;
		x86_64)	_arch_conf="--enable-sse" ;;
		x86)	_arch_conf="--disable-sse" ;;
	esac

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--enable-shared \
		--enable-ogg \
		--disable-rpath \
		--with-pic \
		$_arch_conf
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	install -Dm0644 COPYING.Xiph \
		"$pkgdir"/usr/share/licenses/$pkgname/COPYING.Xiph
}
sha512sums="d6417e14fab0c41b2df369e5e39ce62a5f588e491af4d465b0162f74e171e5549b2f061867f344bfbf8aaccd246bf5f2acd697e532a2c7901c920c69429b1a28  flac-1.3.3.tar.xz"