mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
75 lines
2.4 KiB
Bash
75 lines
2.4 KiB
Bash
pkgbase=mkvtoolnix
|
|
pkgname=('mkvtoolnix-cli' 'mkvtoolnix-gui')
|
|
pkgver=25.0.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' 'libxslt' 'docbook-xsl' 'po4a'
|
|
'qt5-multimedia' 'libebml' 'cmark')
|
|
categories=('multimedia')
|
|
source=("http://www.bunkus.org/videotools/${pkgbase}/sources/$pkgbase-$pkgver.tar.xz")
|
|
sha256sums=('834cb7abdd8849da3a6864055c8207cea44d14768147830918cd1a723c40bc33')
|
|
|
|
prepare() {
|
|
cd $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"
|
|
|
|
autoreconf -vfi
|
|
}
|
|
|
|
build() {
|
|
cd $pkgbase-$pkgver
|
|
|
|
./configure --prefix='/usr' \
|
|
--without-curl \
|
|
--disable-qt
|
|
rake apps:mkvinfo $MAKEFLAGS
|
|
mv src/mkvinfo{,-cli}
|
|
|
|
./configure --prefix='/usr' \
|
|
--without-curl
|
|
rake $MAKEFLAGS
|
|
}
|
|
|
|
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 $pkgbase-$pkgver
|
|
|
|
rake DESTDIR="${pkgdir}" install
|
|
install -m 755 src/mkvinfo-cli "${pkgdir}"/usr/bin/mkvinfo
|
|
rm -rf "${pkgdir}"/usr/share/{applications,icons,mime,mkvtoolnix}
|
|
find "${pkgdir}" -name mkvtoolnix-gui* -delete
|
|
}
|
|
|
|
package_mkvtoolnix-gui() {
|
|
pkgdesc="Set of tools to create, edit and inspect Matroska files - Qt GUI"
|
|
depends=("mkvtoolnix-cli=${pkgver}" 'qt5-base' 'qt5-multimedia' 'xdg-utils' 'desktop-file-utils' 'cmark')
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
rake DESTDIR="${pkgdir}" install
|
|
rm -rf "${pkgdir}"/usr/share/locale
|
|
for t in mkv{extract,info,merge,propedit}; do
|
|
find "${pkgdir}" -name $t* -delete
|
|
done
|
|
}
|