# Template file for 'mkvtoolnix'
pkgname=mkvtoolnix
version=7.9.0
revision=2
short_desc="Matroska tools"
license="GPLv2"
maintainer="user"
homepage="https://www.bunkus.org/videotools/mkvtoolnix/"
distfiles="https://www.bunkus.org/videotools/mkvtoolnix/sources/${pkgname}-${version}.tar.xz"
checksum=39788fa57d9cebd6ea3be9db58dbf8a10fd7c96ad8fa4f79bdf4dadca77bba4a
build_style=configure
configure_args="--prefix=/usr --enable-gui --with-gettext --with-wx-config=/usr/bin/wx-config-3.0
$(vopt_enable qt5 qt)
$(vopt_with qt5 mkvtoolnix-gui)
$(vopt_enable wxwidgets)"
#Package build option
build_options="qt5 wxwidgets"
build_options_default="qt5 wxwidgets"
desc_option_qt5="QT Version GUI (New GUI : mkvtoolnix-gui)"
desc_option_wxwidgets="wxWidgets Version GUI (Old GUI : mkvinfo & mmg GUI)"
hostmakedepends="clang libebml-devel libogg-devel boost-devel libflac-devel libmagic lzo-devel libmatroska-devel libvorbis-devel pkg-config libcurl-devel git
$(vopt_if qt5 qt5-devel)
$(vopt_if wxwidgets wxWidgets-devel)"
makedepends="ruby"
lib32disabled=yes
post_configure() {
if [ -d ./rubygems ] ; then
git pull
else
git clone git://github.com/rubygems/rubygems.git
fi
}
pre_build() {
cd rubygems
ruby setup.rb
cd ..
gem install drake
}
do_build() {
case ${XBPS_MACHINE} in
"i686" ) ./drake -j1 ;;
"x86_64" ) ./drake -j2 ;;
* ) ./drake -j1 ;;
esac
}
do_install() {
vmkdir /usr/share/locale/ca/LC_MESSAGES
vmkdir /usr/share/locale/cs/LC_MESSAGES
vmkdir /usr/share/man/de/man1
vmkdir /usr/share/man/ja/man1
vmkdir /usr/share/man/nl/man1
vmkdir /usr/share/man/uk/man1
vmkdir /usr/share/man/zh_CN/man1
vmkdir /usr/share/locale/de/LC_MESSAGES
vmkdir /usr/share/locale/es/LC_MESSAGES
vmkdir /usr/share/locale/eu/LC_MESSAGES
vmkdir /usr/share/locale/fr/LC_MESSAGES
vmkdir /usr/share/locale/it/LC_MESSAGES
vmkdir /usr/share/locale/ja/LC_MESSAGES
vmkdir /usr/share/locale/lt/LC_MESSAGES
vmkdir /usr/share/locale/nl/LC_MESSAGES
vmkdir /usr/share/locale/pl/LC_MESSAGES
vmkdir /usr/share/locale/pt/LC_MESSAGES
vmkdir /usr/share/locale/pt_BR/LC_MESSAGES
vmkdir /usr/share/locale/ru/LC_MESSAGES
vmkdir /usr/share/locale/sr/LC_MESSAGES
vmkdir /usr/share/locale/sv/LC_MESSAGES
vmkdir /usr/share/locale/tr/LC_MESSAGES
vmkdir /usr/share/locale/uk/LC_MESSAGES
vmkdir /usr/share/locale/zh_CN/LC_MESSAGES
vmkdir /usr/share/locale/zh_TW/LC_MESSAGES
vmkdir /usr/share/doc/mkvtoolnix/guide/en
vmkdir /usr/share/doc/mkvtoolnix/guide/es
vmkdir /usr/share/doc/mkvtoolnix/guide/eu
vmkdir /usr/share/doc/mkvtoolnix/guide/nl
vmkdir /usr/share/doc/mkvtoolnix/guide/zh_CN
vmkdir /usr/share/applications
vmkdir /usr/share/mime/packages
vbin src/mkvmerge
vbin src/mkvinfo
vbin src/mkvextract
vbin src/mkvpropedit
if [ $build_option_wxwidgets ] ; then
vbin src/mmg/mmg
vcopy share/desktop/mkvmergeGUI.desktop /usr/share/applications
vcopy share/desktop/mkvinfo.desktop /usr/share/applications
fi
if [ $build_option_qt5 ] ; then
vbin src/mkvtoolnix-gui/mkvtoolnix-gui
vcopy share/desktop/mkvtoolnix-gui.desktop /usr/share/applications
vcopy share/desktop/mkvinfo.desktop /usr/share/applications
fi
vman doc/man/mkvmerge.1 /usr/share/man/man1/mkvmerge.1
vman doc/man/mkvinfo.1 /usr/share/man/man1/mkvinfo.1
vman doc/man/mkvextract.1 /usr/share/man/man1/mkvextract.1
vman doc/man/mkvpropedit.1 /usr/share/man/man1/mkvpropedit.1
vman doc/man/mmg.1 /usr/share/man/man1/mmg.1
vman doc/man/mkvtoolnix-gui.1 /usr/share/man/man1/mkvtoolnix-gui.1
vinstall doc/man/de/mkvmerge.1 644 /usr/share/man/de/man1 mkvmerge.1
vinstall doc/man/de/mkvinfo.1 644 /usr/share/man/de/man1 mkvinfo.1
vinstall doc/man/de/mkvextract.1 644 /usr/share/man/de/man1 mkvextract.1
vinstall doc/man/de/mkvpropedit.1 644 /usr/share/man/de/man1 mkvpropedit.1
vinstall doc/man/de/mmg.1 644 /usr/share/man/de/man1 mmg.1
vinstall doc/man/de/mkvtoolnix-gui.1 644 /usr/share/man/de/man1 mkvtoolnix-gui.1
vinstall doc/man/ja/mkvmerge.1 644 /usr/share/man/ja/man1 mkvmerge.1
vinstall doc/man/ja/mkvinfo.1 644 /usr/share/man/ja/man1 mkvinfo.1
vinstall doc/man/ja/mkvextract.1 644 /usr/share/man/ja/man1 mkvextract.1
vinstall doc/man/ja/mkvpropedit.1 644 /usr/share/man/ja/man1 mkvpropedit.1
vinstall doc/man/ja/mmg.1 644 /usr/share/man/ja/man1 mmg.1
vinstall doc/man/ja/mkvtoolnix-gui.1 644 /usr/share/man/ja/man1 mkvtoolnix-gui.1
vinstall doc/man/nl/mkvmerge.1 644 /usr/share/man/nl/man1 mkvmerge.1
vinstall doc/man/nl/mkvinfo.1 644 /usr/share/man/nl/man1 mkvinfo.1
vinstall doc/man/nl/mkvextract.1 644 /usr/share/man/nl/man1 mkvextract.1
vinstall doc/man/nl/mkvpropedit.1 644 /usr/share/man/nl/man1 mkvpropedit.1
vinstall doc/man/nl/mmg.1 644 /usr/share/man/nl/man1 mmg.1
vinstall doc/man/nl/mkvtoolnix-gui.1 644 /usr/share/man/nl/man1 mkvtoolnix-gui.1
vinstall doc/man/uk/mkvmerge.1 644 /usr/share/man/uk/man1 mkvmerge.1
vinstall doc/man/uk/mkvinfo.1 644 /usr/share/man/uk/man1 mkvinfo.1
vinstall doc/man/uk/mkvextract.1 644 /usr/share/man/uk/man1 mkvextract.1
vinstall doc/man/uk/mkvpropedit.1 644 /usr/share/man/uk/man1 mkvpropedit.1
vinstall doc/man/uk/mmg.1 644 /usr/share/man/uk/man1 mmg.1
vinstall doc/man/uk/mkvtoolnix-gui.1 644 /usr/share/man/uk/man1 mkvtoolnix-gui.1
vinstall doc/man/zh_CN/mkvmerge.1 644 /usr/share/man/zh_CN/man1 mkvmerge.1
vinstall doc/man/zh_CN/mkvinfo.1 644 /usr/share/man/zh_CN/man1 mkvinfo.1
vinstall doc/man/zh_CN/mkvextract.1 644 /usr/share/man/zh_CN/man1 mkvextract.1
vinstall doc/man/zh_CN/mkvpropedit.1 644 /usr/share/man/zh_CN/man1 mkvpropedit.1
vinstall doc/man/zh_CN/mmg.1 644 /usr/share/man/zh_CN/man1 mmg.1
vinstall doc/man/zh_CN/mkvtoolnix-gui.1 644 /usr/share/man/zh_CN/man1 mkvtoolnix-gui.1
vinstall po/ca.mo 644 /usr/share/locale/ca/LC_MESSAGES mkvtoolnix.mo
vinstall po/cs.mo 644 /usr/share/locale/cs/LC_MESSAGES mkvtoolnix.mo
vinstall po/de.mo 644 /usr/share/locale/de/LC_MESSAGES mkvtoolnix.mo
vinstall po/es.mo 644 /usr/share/locale/es/LC_MESSAGES mkvtoolnix.mo
vinstall po/eu.mo 644 /usr/share/locale/eu/LC_MESSAGES mkvtoolnix.mo
vinstall po/fr.mo 644 /usr/share/locale/fr/LC_MESSAGES mkvtoolnix.mo
vinstall po/it.mo 644 /usr/share/locale/it/LC_MESSAGES mkvtoolnix.mo
vinstall po/ja.mo 644 /usr/share/locale/ja/LC_MESSAGES mkvtoolnix.mo
vinstall po/lt.mo 644 /usr/share/locale/lt/LC_MESSAGES mkvtoolnix.mo
vinstall po/nl.mo 644 /usr/share/locale/nl/LC_MESSAGES mkvtoolnix.mo
vinstall po/pl.mo 644 /usr/share/locale/pl/LC_MESSAGES mkvtoolnix.mo
vinstall po/pt.mo 644 /usr/share/locale/pt/LC_MESSAGES mkvtoolnix.mo
vinstall po/pt_BR.mo 644 /usr/share/locale/pt_BR/LC_MESSAGES mkvtoolnix.mo
vinstall po/ru.mo 644 /usr/share/locale/ru/LC_MESSAGES mkvtoolnix.mo
vinstall po/sr.mo 644 /usr/share/locale/sr/LC_MESSAGES mkvtoolnix.mo
vinstall po/sv.mo 644 /usr/share/locale/sv/LC_MESSAGES mkvtoolnix.mo
vinstall po/tr.mo 644 /usr/share/locale/tr/LC_MESSAGES mkvtoolnix.mo
vinstall po/uk.mo 644 /usr/share/locale/uk/LC_MESSAGES mkvtoolnix.mo
vinstall po/zh_CN.mo 644 /usr/share/locale/zh_CN/LC_MESSAGES mkvtoolnix.mo
vinstall po/zh_TW.mo 644 /usr/share/locale/zh_TW/LC_MESSAGES mkvtoolnix.mo
vcopy doc/guide/en/* /usr/share/doc/mkvtoolnix/guide/en
vcopy doc/guide/es/* /usr/share/doc/mkvtoolnix/guide/es
vcopy doc/guide/eu/* /usr/share/doc/mkvtoolnix/guide/eu
vcopy doc/guide/nl* /usr/share/doc/mkvtoolnix/guide/nl
vcopy doc/guide/zh_CN/* /usr/share/doc/mkvtoolnix/guide/zh_CN
vcopy share/mime/mkvtoolnix.xml /usr/share/mime/packages
vmkdir /usr/share/icons/hicolor/128x128/apps
vcopy share/icons/128x128/*.png /usr/share/icons/hicolor/128x128/apps
vmkdir /usr/share/icons/hicolor/16x16/apps
vcopy share/icons/16x16/*.png /usr/share/icons/hicolor/16x16/apps
vmkdir /usr/share/icons/hicolor/24x24/apps
vcopy share/icons/24x24/*.png /usr/share/icons/hicolor/24x24/apps
vmkdir /usr/share/icons/hicolor/256x256/apps
vcopy share/icons/256x256/*.png /usr/share/icons/hicolor/256x256/apps
vmkdir /usr/share/icons/hicolor/32x32/apps
vcopy share/icons/32x32/*.png /usr/share/icons/hicolor/32x32/apps
vmkdir /usr/share/icons/hicolor/48x48/apps
vcopy share/icons/48x48/*.png /usr/share/icons/hicolor/48x48/apps
vmkdir /usr/share/icons/hicolor/64x64/apps
vcopy share/icons/64x64/*.png /usr/share/icons/hicolor/64x64/apps
vmkdir /usr/share/icons/hicolor/96x96/apps
vcopy share/icons/96x96/*.png /usr/share/icons/hicolor/96x96/apps
}
調べたらwx-configというコマンド名が古いバージョンとの競合を避ける為なのか元々の仕様なのかわかりませんがconfigureで指定しないとダメだったので--with-wx-configを追加。
パッケージ作成時に指定出来るオプションでQT5バージョンのGUIとwxWidgetsバージョンを指定出来るようにするためvopt_によりconfigureオプションを変えるようにしました。
それに合わせてビルドオプションを選択できるようにコードを追加。
また、ビルドオプションによって作成時に必要となるパッケージも変えるようにしました。
do_install()ではビルドオプションによってインストールする実行ファイルやGNOME系デスクトップ環境で使われるdesktopファイルのインストールを変えるようにコードを追加。
その他マニュアルや言語ファイル、アイコンのインストール方法が色々間違っていたので修正。
作成したパッケージをインストールして確認。
Linux Mintでは文字化けしていたmkvtoolnix-guiですが、Void Linuxでは文字化けせずにちゃんと表示されています。
テンプレートファイルの手動処理部分はまだまだ勉強不足でわからないこと多し。
テンプレートファイル置き場
https://sites.google.com/site/voidlinuxmemo/xbps-src-tenpureto/mtoolnix
0 件のコメント:
コメントを投稿