pkgbase=mkvtoolnix pkgname=('mkvtoolnix-cli' 'mkvtoolnix-gui') pkgver=8.4.0 pkgrel=1 pkgdesc="Set of tools to create, edit and inspect Matroska files." arch=('x86_64') license=('GPL') url="http://www.bunkus.org/videotools/mkvtoolnix/index.html" optdepends=('flac: for FLAC support (Free Lossless Audio Codec)' 'lzo2: for additional compression capabilities' 'bzip2: for additional compression capabilities' 'file: for automatic content type detection' 'curl: for online update checks') makedepends=('flac' 'libmatroska' 'libogg' 'libvorbis' 'qt5-base' 'xdg-utils' 'libebml' 'zlib' 'boost-libs' 'expat' 'boost' 'ruby') categories=('multimedia') source=("http://www.bunkus.org/videotools/${pkgbase}/sources/${pkgbase}-${pkgver}.tar.xz") sha512sums=('ab9ab49baf06a8ef713872a09c58fdb1560628dbe3b2b661d809972f56a36c751a390a78ae260624510963b92e177d090088030bb96f9ab9e96e1a372772d22f') prepare() { cd "${srcdir}/${pkgbase}-${pkgver}" # Disable automagic curl dep used for online update checking sed -i -e '/curl/d' configure.ac export CURL_CFLAGS="" CURL_LIBS="" export CFLAGS="${CFLAGS} -DBOOST_FILESYSTEM_VERSION=3" export CXXFLAGS="${CXXFLAGS} -DBOOST_FILESYSTEM_VERSION=3" # Sets number of threads for a parallel build export DRAKETHREADS=4 autoreconf -vfi } package_mkvtoolnix-cli() { pkgdesc="Set of tools to create, edit and inspect Matroska files - CLI version" depends=('libmatroska' 'expat' 'flac' 'libvorbis' 'file' 'boost-libs' 'lzo2') provides=('mkvtoolnix') conflicts=('mkvtoolnix') replaces=('mkvtoolnix') cd "${srcdir}/${pkgbase}-${pkgver}" ./configure --prefix=/usr \ --with-boost-libdir=/usr/lib \ --disable-gui ./drake mv src/mkvinfo{,-cli} ./drake DESTDIR="${pkgdir}" install rm -rf "${pkgdir}"/usr/bin/mkvinfo install -Dm755 src/mkvinfo-cli "${pkgdir}"/usr/bin/mkvinfo rm -rf "${pkgdir}"/usr/bin/mmg rm -rf "${pkgdir}"/usr/share/man/de/man1/mmg.1 rm -rf "${pkgdir}"/usr/share/man/es/man1/mmg.1 rm -rf "${pkgdir}"/usr/share/man/ja/man1/mmg.1 rm -rf "${pkgdir}"/usr/share/man/man1/mmg.1 rm -rf "${pkgdir}"/usr/share/man/nl/man1/mmg.1 rm -rf "${pkgdir}"/usr/share/man/zh_CN/man1/mmg.1 rm -rf "${pkgdir}"/usr/share/man/uk/man1/mmg.1 rm -rf "${pkgdir}"/usr/share/applications rm -rf "${pkgdir}"/usr/share/icons rm -rf "${pkgdir}"/usr/share/mime } package_mkvtoolnix-gui() { pkgdesc="Set of tools to create, edit and inspect Matroska files - Qt GUI" depends=("mkvtoolnix-cli=${pkgver}" 'qt5-base' 'xdg-utils' 'desktop-file-utils') install=mkvtoolnix.install cd "${srcdir}/${pkgbase}-${pkgver}" ./configure --prefix=/usr \ --with-boost-libdir=/usr/lib ./drake ./drake DESTDIR="${pkgdir}" install rm -rf "${pkgdir}"/usr/bin/mkvextract rm -rf "${pkgdir}"/usr/bin/mkvinfo rm -rf "${pkgdir}"/usr/bin/mkvmerge rm -rf "${pkgdir}"/usr/bin/mkvpropedit rm -rf "${pkgdir}"/usr/share/doc rm -rf "${pkgdir}"/usr/share/locale rm -rf "${pkgdir}"/usr/share/man/de/man1/mkv* rm -rf "${pkgdir}"/usr/share/man/es/man1/mkv* rm -rf "${pkgdir}"/usr/share/man/ja/man1/mkv* rm -rf "${pkgdir}"/usr/share/man/man1/mkv* rm -rf "${pkgdir}"/usr/share/man/nl/man1/mkv* rm -rf "${pkgdir}"/usr/share/man/zh_CN/man1/mkv* rm -rf "${pkgdir}"/usr/share/man/uk/man1/mkv* install -Dm755 src/mkvinfo "${pkgdir}"/usr/bin/mkvinfo-gui sed -ri 's/^(Exec=mkvinfo)/\1-gui/' "${pkgdir}"/usr/share/applications/mkvinfo.desktop }