# Maintainer: Natanael Copa pkgname=ffmpeg pkgver=2.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 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" depends= source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2 configure-dlvsym.patch fix-defines.patch fix-libv4l2-errors.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-gpl \ --enable-libmp3lame \ --enable-librtmp \ --enable-libvorbis \ --enable-libvpx \ --enable-libxvid \ --enable-libx264 \ --enable-libtheora \ --enable-libv4l2 \ --enable-postproc \ --enable-pic \ --enable-pthreads \ --enable-shared \ --enable-x11grab \ --disable-stripping \ --disable-static \ --enable-vaapi \ $_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="00f98a030d21366b6583875d57d98c27 ffmpeg-2.3.tar.bz2 d041c60890392d80f74a567523f4c54d configure-dlvsym.patch fad4fc1e886146a4a2befc8fda052d50 fix-defines.patch 2b6897f352583ee8efdc0c09ef27a30f fix-libv4l2-errors.patch" sha256sums="6b3dbb64e20951480bfd64bcbe305f6ee9031e5fccfd3b3e94cc5055525f809e ffmpeg-2.3.tar.bz2 ffd6beadaea4cdbc1326fe396d8cd34b3efb791a865a32f64b3fe998b679c1d0 configure-dlvsym.patch 4ccac0cf75fe53685c4cdda4061f7248de9a9b98e11f8e3aed8e1822b94d35d1 fix-defines.patch 872236e91e393b62a1a9d7aebdf0c417314f874a67cef55ad37b39ee57cf9edb fix-libv4l2-errors.patch" sha512sums="82bbe5109e426cbd3063f8b2edb3e2daa7f237c4fc46ca37907ab316351978b689f2e0c4d88645b2eb19582765072702f3a19a17c6b02dd11bccac3b41d27a03 ffmpeg-2.3.tar.bz2 d9bb652093b1c2d03cead78bcafd59fc8305f36fe5359ac5d7caf038889f1239829e288c07e77a11bbef89de5fe54a5eae50a1c4718ec77137bb677ef9069e54 configure-dlvsym.patch ea2630d4ae5383bc24a322318aa8c41af745145755333660deec4ed256096eca73a49c41a0921544dfaa53d8087378cb2b5654001332c7262ea39f18e5c472c8 fix-defines.patch 56bba30f200c748d47d60d2b18147522dbceec7e8c97f434d3dbfa239547113a3e9d3b280e22816adeafa994b22eefac4b968448afef1a07aa1c46d3ec359e68 fix-libv4l2-errors.patch"