summaryrefslogtreecommitdiff
path: root/ffmpeg/Pkgfile
blob: c562c5cf4ec0e3e08e33dbc20713c280983440a7 (plain)
    1 # Description: Complete solution to record, convert and stream audio and video.
    2 # URL: http://ffmpeg.org/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Packager: Matt Housh, jaeger at crux dot nu
    5 # Depends on: bzip2 xz yasm zlib
    6 # Optional: alsa-lib fdk-aac gnutls lame libass libsdl2 libtheora libva libvdpau libvorbis libvpx libwebp opus x264 x265
    7 
    8 name=ffmpeg
    9 version=3.3.3
   10 release=1
   11 source=(https://ffmpeg.org/releases/$name-$version.tar.bz2
   12 	ffmpeg-x264-10bit.sh)
   13 
   14 build() {
   15 	cd $name-$version
   16 
   17 [ -e '/usr/lib/pkgconfig/libwebp.pc' ] && PKGMK_FFMPEG+=' --enable-libwebp'
   18 [ -e '/usr/lib/pkgconfig/vdpau.pc' ] && PKGMK_FFMPEG+=' --enable-vdpau'
   19 [ -e '/usr/lib/pkgconfig/freetype2.pc' ] && PKGMK_FFMPEG+=' --enable-libfreetype'
   20 [ -e '/usr/lib/pkgconfig/x264.pc' ] && PKGMK_FFMPEG+=' --enable-libx264'
   21 [ -e '/usr/lib/pkgconfig/x265.pc' ] && PKGMK_FFMPEG+=' --enable-libx265'
   22 [ -e '/usr/lib/pkgconfig/libass.pc' ] && PKGMK_FFMPEG+=' --enable-libass'
   23 [ -e '/usr/include/lame/lame.h' ] && PKGMK_FFMPEG+=' --enable-libmp3lame'
   24 [ -e '/usr/lib/pkgconfig/opus.pc' ] && PKGMK_FFMPEG+=' --enable-libopus'
   25 [ -e '/usr/lib/pkgconfig/vpx.pc' ] && PKGMK_FFMPEG+=' --enable-libvpx'
   26 [ -e '/usr/lib/pkgconfig/vorbis.pc' ] && PKGMK_FFMPEG+=' --enable-libvorbis'
   27 [ -e '/usr/lib/pkgconfig/theora.pc' ] && PKGMK_FFMPEG+=' --enable-libtheora'
   28 [ -e '/usr/lib/pkgconfig/fdk-aac.pc' ] && PKGMK_FFMPEG+=' --enable-libfdk-aac --enable-nonfree'
   29 
   30 	if [ -e '/usr/lib/pkgconfig/gnutls.pc' ]; then
   31 		PKGMK_FFMPEG+=' --enable-gnutls'
   32 	else
   33 		PKGMK_FFMPEG+=' --enable-openssl --enable-nonfree'
   34 	fi
   35 
   36 	./configure ${PKGMK_FFMPEG} \
   37 		--prefix=/usr \
   38 		--disable-debug \
   39 		--disable-doc \
   40 		--enable-gpl \
   41 		--enable-version3 \
   42 		--enable-shared \
   43 		--enable-pic \
   44 		--enable-avfilter \
   45 		--enable-avresample \
   46 		--enable-postproc \
   47 		--enable-pthreads \
   48 		--enable-swresample
   49 
   50 	make
   51 	make DESTDIR=$PKG install install-man
   52 
   53 	rm -r $PKG/usr/share/ffmpeg/examples
   54 
   55 	if [ -e '/usr/lib/pkgconfig/x264.pc' ]; then
   56 		install -m 0755 -D $SRC/ffmpeg-x264-10bit.sh \
   57 			$PKG/usr/bin/ffmpeg-x264-10bit
   58 	fi
   59 }

Generated by cgit