summaryrefslogtreecommitdiffstats
path: root/main/libmad/APKBUILD
blob: 8791a5d7fa2d6abb7d8498b04d1e87187963b4f2 (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
# Contributor: Sebastian Wicki <gandro@gmx.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmad
pkgver=0.15.1b
pkgrel=6
pkgdesc="A high-quality MPEG audio decoder"
url="http://www.underbit.com/products/mad/"
arch="all"
license="GPL"
subpackages="$pkgname-dev"
depends=
makedepends="autoconf automake libtool"
source="http://downloads.sourceforge.net/sourceforge/mad/$pkgname-$pkgver.tar.gz
	libmad-0.15.1b-cflags-O2.patch
	libmad-0.15.1b-cflags.patch
	automake.patch
	mad.pc
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	aclocal && autoconf && automake --add-missing --foreign \
		&& libtoolize --force || return 1
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--enable-fpm=intel \
		--enable-accuracy

	make -j1 || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
	install -D -m644 "$srcdir"/mad.pc "$pkgdir"/usr/lib/pkgconfig/mad.pc
}
md5sums="1be543bc30c56fb6bea1d7bf6a64e66c  libmad-0.15.1b.tar.gz
fbda7a1821e2038221deb3f476da034d  libmad-0.15.1b-cflags-O2.patch
bcd6eab331fc316baf4e9c9882fe13f4  libmad-0.15.1b-cflags.patch
399e83a145ea8ba0e9c9484235a1ee76  automake.patch
89806934195402446d21d1a83f523b11  mad.pc"