#!/bin/bash

set -e
set -x

cd FFmpeg 
./configure --enable-gpl --enable-nonfree --enable-gnutls --enable-libx264 --enable-libfdk-aac --enable-libmp3lame --enable-version3 --prefix=/usr
# ./configure --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree --enable-openssl --enable-libx264 --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-version3 --prefix=/usr
make

checkinstall --pkgname=ffmpeg --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default

mv *.deb ../debs
rm -f description-pak
cd -
