summaryrefslogtreecommitdiff
path: root/user/flac/APKBUILD
blob: 0588e8fc2495e7a0355f50fef784dc3ae103a3b9 (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
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=flac
pkgver=1.3.2
pkgrel=2
pkgdesc="Free Lossless Audio Codec"
url="https://xiph.org/flac/"
arch="all"
options="!checkroot"
license="BSD-3-Clause AND GPL-2.0+"
subpackages="$pkgname-dev $pkgname-doc"
depends=
makedepends="libogg-dev"
source="https://downloads.xiph.org/releases/flac/flac-${pkgver}.tar.xz
	"

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="63910e8ebbe508316d446ffc9eb6d02efbd5f47d29d2ea7864da9371843c8e671854db6e89ba043fe08aef1845b8ece70db80f1cce853f591ca30d56ef7c3a15  flac-1.3.2.tar.xz"