aboutsummaryrefslogtreecommitdiffstats
path: root/main/ffmpeg/APKBUILD
blob: 296c3c47b60948c42f1a5fb8ae1705de3f20feba (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ffmpeg
pkgver=3.1.1
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="gnutls-dev lame-dev libvorbis-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
	v4l-utils-dev yasm opus-dev x265-dev"
depends=
source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2
	0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
	cflags-speed-O2.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"
	local _asm=""
	[ -n "$DEBUG" ] && _dbg="--enable-debug"

	case "$CARCH" in
	x86 | arm*) _asm="--disable-asm" ;;
	esac

	cd "$_builddir"
	./configure \
		--prefix=/usr \
		--enable-avresample \
		--enable-avfilter \
		--enable-gnutls \
		--enable-gpl \
		--enable-libmp3lame \
		--enable-librtmp \
		--enable-libvorbis \
		--enable-libvpx \
		--enable-libxvid \
		--enable-libx264 \
		--enable-libx265 \
		--enable-libtheora \
		--enable-libv4l2 \
		--enable-postproc \
		--enable-pic \
		--enable-pthreads \
		--enable-shared \
		--enable-x11grab \
		--disable-stripping \
		--disable-static \
		--enable-vaapi \
		--enable-libopus \
		$_asm $_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="bee939350e80e07c3d63285d0873b66b  ffmpeg-3.1.1.tar.bz2
627bb0f8b28063cd5d6a090b07bd3754  0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
91167b4f601db28836dcc3de9f756ed7  cflags-speed-O2.patch"
sha256sums="a5bca50a90a37b983eaa17c483a387189175f37ca678ae7e51d43e7610b4b3b4  ffmpeg-3.1.1.tar.bz2
011f8beaf81074c9f4e522b699d27ee0ab74ec43f800286244a5b63b82ec5e8c  0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
ed75cdc99acb83b660a9e40b908adec896a9421228a620b016a22e7f647bd92b  cflags-speed-O2.patch"
sha512sums="b5b4b2d518affa708b05f72201d5ac20446c88b5fb4dd8586cdc29d1132c678be94898e4f5ad27bef4ac987557305838133f45e94ff55d65f22a76f4f312888a  ffmpeg-3.1.1.tar.bz2
32652e18d4eb231a2e32ad1cacffdf33264aac9d459e0e2e6dd91484fced4e1ca5a62886057b1f0b4b1589c014bbe793d17c78adbaffec195f9a75733b5b18cb  0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
5ff940abb4265401eebb0f2fd486b51a004d62a480c5a64bc279149731b577b5c95f0b7ff2d73429ec10b1f0b76ecf7fa466b02ba3a0bf79d9b7ac2ae87ee5d5  cflags-speed-O2.patch"