summaryrefslogtreecommitdiffstats
path: root/main/ffmpeg/APKBUILD
blob: ed8ede8fb2a5170f6f76e014735fe3eb56e6e565 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ffmpeg
pkgver=1.1.3
pkgrel=0
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
url="http://ffmpeg.org/"
arch="all"
license="GPL"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
makedepends="lame-dev libvorbis-dev faac-dev xvidcore-dev zlib-dev
	imlib2-dev x264-dev libtheora-dev coreutils bzip2-dev perl libvpx-dev
	libvpx-dev sdl-dev libxfixes-dev libva-dev alsa-lib-dev rtmpdump-dev"
depends=
source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2
	configure-dlvsym.patch"

_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
}

build() {
	local _dbg="--disable-debug"
	[ -n "$DEBUG" ] && _dbg="--enable-debug"
	cd "$_builddir"
	./configure --prefix=/usr \
		--enable-gpl \
		--enable-libmp3lame \
		--enable-librtmp \
		--enable-libvorbis \
		--enable-libfaac \
		--enable-libvpx \
		--enable-libxvid \
		--enable-libx264 \
		--enable-libtheora \
		--enable-nonfree \
		--enable-postproc \
		--enable-pic \
		--enable-pthreads \
		--enable-shared \
		--enable-x11grab \
		--disable-asm \
		--disable-stripping \
		--disable-static \
		--enable-vaapi \
		$_dbg \
		|| return 1
	make || return 1
	${CC:-gcc} -o tools/qt-faststart $CFLAGS tools/qt-faststart.c || return 1
	make doc/ffmpeg.1 doc/ffplay.1 doc/ffserver.1 || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install install-man || return 1
	install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart" || return 1
#	strip --strip-debug "$pkgdir"/usr/lib/*.a || return 1
}

libs() {
	pkgdesc="Libraries for ffmpeg"
	replaces="ffmpeg"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr
}

md5sums="f66eee18559ba59da63b895164a189c3  ffmpeg-1.1.3.tar.bz2
2cdc11a99bf97c63c7cca27b073cb47c  configure-dlvsym.patch"
sha256sums="a70057eba6256fab7342f863e7bb556d14cbed207b5b5b884a0879d3f16ca0a8  ffmpeg-1.1.3.tar.bz2
0854db61ec784935d77516ba9a467ba61e118f951149c07acb6887a6b417ac55  configure-dlvsym.patch"
sha512sums="56a4f1b77f55521e2e129155b10024d02a919b8429a24ef2103b2242e2782695e05e032bffa65b3a90326bee0c274dba5869d0cfbba3f13c11c0ae328ba4ef26  ffmpeg-1.1.3.tar.bz2