SHARE
TWEET

mkvtoolnix-PKGBUILD

a guest Sep 22nd, 2015 325 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # $Id: PKGBUILD 246729 2015-09-20 07:01:02Z giovanni $
  2. # Maintainer: Giovanni Scafora <giovanni@archlinux.org>
  3. # Contributor: xduugu <xduugu@gmx.com>
  4.  
  5. pkgbase=mkvtoolnix
  6. pkgname=('mkvtoolnix-cli' 'mkvtoolnix-qt')
  7. pkgver=8.4.0
  8. pkgrel=2
  9. arch=('i686' 'x86_64')
  10. license=('GPL')
  11. url="http://www.bunkus.org/videotools/mkvtoolnix/index.html"
  12. makedepends=('libmatroska' 'flac' 'libvorbis' 'file' 'qt5-base'
  13.              'boost-libs' 'lzo' 'xdg-utils' 'boost' 'ruby')
  14. source=("http://www.bunkus.org/videotools/${pkgbase}/sources/${pkgbase}-${pkgver}.tar.xz")
  15. md5sums=('773eb42b7887bd20c4ce65cdf667976b')
  16.  
  17. prepare() {
  18.   cd "${srcdir}/${pkgbase}-${pkgver}"
  19.  
  20.   # Disable automagic curl dep used for online update checking
  21.   #sed -i -e '/curl/d' configure.in
  22.   export CURL_CFLAGS="" CURL_LIBS=""
  23.  
  24.   # Sets number of threads for a parallel build
  25.   export DRAKETHREADS=`nproc`
  26.  
  27.   autoreconf -vfi
  28. }
  29.  
  30. build() {
  31.   cd "${srcdir}/${pkgbase}-${pkgver}"
  32.  
  33.   ./configure --prefix=/usr --without-curl --disable-gui
  34.   ./drake apps:mkvinfo
  35.  
  36.   mv src/mkvinfo{,-cli}
  37.  
  38.   ./configure --prefix=/usr --without-curl
  39.  
  40.   ./drake
  41.  
  42.   mv src/mkvinfo{,-qt}
  43.   mv src/mkvinfo{-cli,}
  44. }
  45.  
  46. package_mkvtoolnix-cli() {
  47.   pkgdesc="Set of tools to create, edit and inspect Matroska files - CLI version"
  48.   depends=('libmatroska' 'expat' 'flac' 'libvorbis' 'file' 'boost-libs' 'lzo')
  49.   provides=('mkvtoolnix')
  50.   conflicts=('mkvtoolnix')
  51.   replaces=('mkvtoolnix')
  52.  
  53.   cd "${srcdir}/${pkgbase}-${pkgver}"
  54.  
  55.   ./drake DESTDIR="${pkgdir}" install
  56.  
  57.   cd "${pkgdir}"
  58.  
  59.   find usr/share/man -name 'mkvtoolnix-gui.1*' -delete
  60.   rm -f usr/bin/mkvtoolnix-gui
  61.   rm -rf usr/share/applications
  62.   rm -rf usr/share/icons
  63.   rm -rf usr/share/mime
  64. }
  65.  
  66. package_mkvtoolnix-qt() {
  67.   pkgdesc="Set of tools to create, edit and inspect Matroska files - Qt GUI"
  68.   depends=("mkvtoolnix-cli=${pkgver}" 'qt5-base' 'xdg-utils' 'desktop-file-utils')
  69.   replaces=('mkvtoolnix-gtk')
  70.   install=mkvtoolnix.install
  71.  
  72.   cd "${srcdir}/${pkgbase}-${pkgver}"
  73.  
  74.   ./drake DESTDIR="${pkgdir}" install
  75.   install -Dm755 src/mkvinfo-qt "${pkgdir}"/usr/bin/
  76.  
  77.   cd "${pkgdir}"
  78.  
  79.   sed -i "s/Exec=mkvinfo/Exec=mkvinfo-qt/" usr/share/applications/mkvinfo.desktop
  80.  
  81.   rm -f usr/bin/mkv{extract,info,merge,propedit}
  82.   rm -rf usr/share/locale
  83.   find usr/share/man -name 'mkvextract.1*' -delete
  84.   find usr/share/man -name 'mkvinfo.1*' -delete
  85.   find usr/share/man -name 'mkvmerge.1*' -delete
  86.   find usr/share/man -name 'mkvpropedit.1*' -delete
  87. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top