aboutsummaryrefslogtreecommitdiffstats
path: root/main/ffmpeg/APKBUILD
blob: 6ccfd6129fe68235c8f6d47d114093363713a0c5 (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.0.2
pkgrel=1
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="7db5efb1070872823143e1365fdfcd53  ffmpeg-3.0.2.tar.bz2
627bb0f8b28063cd5d6a090b07bd3754  0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
91167b4f601db28836dcc3de9f756ed7  cflags-speed-O2.patch"
sha256sums="30e3c77c2f4c358ed087869455a7496cbd7753a5e1b98d20ba49c1004009fd36  ffmpeg-3.0.2.tar.bz2
011f8beaf81074c9f4e522b699d27ee0ab74ec43f800286244a5b63b82ec5e8c  0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
ed75cdc99acb83b660a9e40b908adec896a9421228a620b016a22e7f647bd92b  cflags-speed-O2.patch"
sha512sums="67697334899b57efd6cfaebca1bb7450635034af34daae1caf77c57239116a7d2854eef3da967d3d1be4b89f346c79e970dc221543ab6181088172460807bc91  ffmpeg-3.0.2.tar.bz2
32652e18d4eb231a2e32ad1cacffdf33264aac9d459e0e2e6dd91484fced4e1ca5a62886057b1f0b4b1589c014bbe793d17c78adbaffec195f9a75733b5b18cb  0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
5ff940abb4265401eebb0f2fd486b51a004d62a480c5a64bc279149731b577b5c95f0b7ff2d73429ec10b1f0b76ecf7fa466b02ba3a0bf79d9b7ac2ae87ee5d5  cflags-speed-O2.patch"