aboutsummaryrefslogtreecommitdiffstats
path: root/main/libmpeg2/APKBUILD
blob: 4ade978a684ded04cad5bded436a64f0e99318c1 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmpeg2
pkgver=0.5.1
pkgrel=6
pkgdesc="libmpeg2 is a library for decoding MPEG-1 and MPEG-2 video streams."
url="http://libmpeg2.sourceforge.net/"
arch="all"
license="GPL2"
subpackages="$pkgname-dev $pkgname-doc mpeg2dec"
depends=
makedepends="libx11-dev libice-dev libsm-dev libxext-dev libxv-dev"
source="http://$pkgname.sourceforge.net/files/$pkgname-$pkgver.tar.gz"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared \
		--disable-static \
		|| return 1
	make OPT_CFLAGS="${CFLAGS}" \
		MPEG2DEC_CFLAGS="${CFLAGS}" \
		LIBMPEG2_CFLAGS="" || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la
}

mpeg2dec() {
	pkgdesc="a test program for libmpeg2"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/mpeg2dec "$subpkgdir"/usr/bin/
}

md5sums="0f92c7454e58379b4a5a378485bbd8ef  libmpeg2-0.5.1.tar.gz"