summaryrefslogtreecommitdiffstats
path: root/main/faad2/APKBUILD
blob: adfffac6a15745f9121ce8cb5c1d8ef4becffe18 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=faad2
pkgver=2.7
pkgrel=6
pkgdesc="ISO AAC audio decoder"
url="http://www.audiocoding.com/"
arch="all"
license="custom:GPL"
subpackages="$pkgname-dev $pkgname-doc"
depends=
makedepends="autoconf automake libtool"
source="http://downloads.sourceforge.net/sourceforge/faac/$pkgname-$pkgver.tar.bz2
	automake.patch"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}
	
build() {
	cd "$_builddir"
	
	# manfile has bad name
	mv frontend/faad.man frontend/faad.1 && \
		sed -i -e 's:faad\.man:faad.1:' frontend/Makefile.am \
		|| return 1

	sh bootstrap || return 1
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
	install -m644 common/mp4ff/mp4ff_int_types.h "$pkgdir"/usr/include/mp4ff_int_types.h || return 1
}
md5sums="4c332fa23febc0e4648064685a3d4332  faad2-2.7.tar.bz2
28b178eddf06bda888fe048abc65d57f  automake.patch"