desktop/mkvtoolnix/PKGBUILD

97 lines
3.3 KiB
Bash
Raw Normal View History

2015-06-23 08:48:35 +08:00
pkgbase=mkvtoolnix
pkgname=('mkvtoolnix-cli' 'mkvtoolnix-gui')
2015-06-29 21:20:52 +08:00
pkgver=8.1.0
pkgrel=1
2011-08-26 05:01:47 +08:00
pkgdesc="Set of tools to create, edit and inspect Matroska files."
2013-01-22 10:13:11 +08:00
arch=('x86_64')
2011-08-26 05:01:47 +08:00
license=('GPL')
url="http://www.bunkus.org/videotools/mkvtoolnix/index.html"
2012-07-28 10:11:42 +08:00
optdepends=('flac: for FLAC support (Free Lossless Audio Codec)'
2013-01-22 10:13:11 +08:00
'lzo2: for additional compression capabilities'
'bzip2: for additional compression capabilities'
'file: for automatic content type detection'
'curl: for online update checks')
2015-06-23 08:48:35 +08:00
makedepends=('flac' 'libmatroska' 'libogg' 'libvorbis' 'qt5-base' 'xdg-utils' 'libebml'
'zlib' 'boost-libs' 'expat' 'boost' 'ruby')
categories=('multimedia')
2015-06-23 08:48:35 +08:00
source=("http://www.bunkus.org/videotools/${pkgbase}/sources/${pkgbase}-${pkgver}.tar.xz")
2015-06-29 21:20:52 +08:00
sha1sums=('77d4090671281f68b8df9efac079246bfb918fcc')
2015-06-23 08:48:35 +08:00
prepare() {
cd "${srcdir}/${pkgbase}-${pkgver}"
# Disable automagic curl dep used for online update checking
sed -i -e '/curl/d' configure.in
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
2011-08-26 05:01:47 +08:00
}
2015-06-23 08:48:35 +08:00
package_mkvtoolnix-cli() {
pkgdesc="Set of tools to create, edit and inspect Matroska files - CLI version"
2015-06-24 05:07:45 +08:00
depends=('libmatroska' 'expat' 'flac' 'libvorbis' 'file' 'boost-libs' 'lzo2')
2015-06-23 08:48:35 +08:00
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/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
2011-12-28 02:44:05 +08:00
2015-06-23 08:48:35 +08:00
./drake DESTDIR="${pkgdir}" install
rm -rf "${pkgdir}"/usr/bin/mkvextract
2011-12-28 02:44:05 +08:00
rm -rf "${pkgdir}"/usr/bin/mkvinfo
2015-06-23 08:48:35 +08:00
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/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
2011-08-26 05:01:47 +08:00
}