-# TODO:
-# - make -gui subpackages (Qt4 deps)
-# - boost autodetection fails ($BOOSTLIBDIR empty), so all boost libs must be passed --with-boost-xxx=xxxx
#
# Conditional build
%bcond_with verbose # verbose build (V=1)
Summary: Matroska video utilities
Summary(pl.UTF-8): Narzędzia do filmów w formacie Matroska
Name: mkvtoolnix
-Version: 10.0.0
-Release: 2
+Version: 38.0.0
+Release: 5
License: GPL v2
Group: Applications/Multimedia
-Source0: http://www.bunkus.org/videotools/mkvtoolnix/sources/%{name}-%{version}.tar.xz
-# Source0-md5: ab7fc3646f00467acafbde5ad9317320
+Source0: https://www.bunkus.org/videotools/mkvtoolnix/sources/%{name}-%{version}.tar.xz
+# Source0-md5: ff896bf627fec8670297aaff50cbe74a
Patch0: %{name}-init_locales.patch
-URL: http://www.bunkus.org/videotools/mkvtoolnix/
+URL: https://www.bunkus.org/videotools/mkvtoolnix/
%if %{with qt}
-BuildRequires: Qt5Gui-devel
-BuildRequires: Qt5Concurrent-devel
+BuildRequires: Qt5Concurrent-devel >= 5.3.0
+BuildRequires: Qt5DBus-devel >= 5.3.0
+BuildRequires: Qt5Gui-devel >= 5.3.0
+BuildRequires: Qt5Multimedia-devel >= 5.3.0
+BuildRequires: Qt5Widgets-devel >= 5.3.0
+BuildRequires: cmark-devel
+BuildRequires: pkgconfig
+BuildRequires: qt5-build >= 5.3.0
+BuildRequires: qt5-linguist >= 5.3.0
%endif
BuildRequires: autoconf
-BuildRequires: boost-devel >= 1.36
+BuildRequires: boost-devel >= 1.49.0
BuildRequires: bzip2-devel
BuildRequires: docbook-style-xsl
-BuildRequires: expat-devel
BuildRequires: flac-devel
BuildRequires: gettext-tools
-BuildRequires: libebml-devel >= 1.2.0
+BuildRequires: libebml-devel >= 1.3.5
BuildRequires: libmagic-devel
-BuildRequires: libmatroska-devel >= 1.1.0
+BuildRequires: libmatroska-devel >= 1.4.8
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
BuildRequires: lzo-devel
-BuildRequires: pcre-cxx-devel
-%if %{with qt}
-BuildRequires: pkgconfig
-BuildRequires: qt5-build >= 4.3.3-3
-%endif
-BuildRequires: ruby-rake
+BuildRequires: po4a
+BuildRequires: pugixml-devel
BuildRequires: ruby-modules
+BuildRequires: ruby-rake
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description -l pl.UTF-8
Narzędzia do filmów w formacie Matroska.
+%package gui
+Summary: Qt GUI for mkvmerge including a chapter and a header editor
+Summary(pl.UTF-8): Graficzny interfejs Qt do mkvmerge, zawierający edytor rozdziałów i nagłówków
+Group: Applications/Multimedia
+Requires: %{name} = %{version}-%{release}
+
+%description gui
+Qt GUI for mkvmerge including a chapter and a header editor.
+
+%description gui -l pl.UTF-8
+Graficzny interfejs Qt do mkvmerge, zawierający edytor rozdziałów i
+nagłówków.
+
%prep
%setup -q
%patch0 -p1
%build
%{__autoconf}
%configure \
+ %{?with_qt:LCONVERT=/usr/bin/lconvert-qt5} \
--docdir=%{_datadir}/%{name} \
--%{?with_qt:en}%{!?with_qt:dis}able-qt \
- --with-boost-filesystem=boost_filesystem \
- --with-boost-regex=boost_regex \
- --with-boost-system=boost_system \
%{?with_qt:--with-moc=/usr/bin/moc-qt5} \
%{?with_qt:--with-uic=/usr/bin/uic-qt5} \
--with-docbook-xsl-root=/usr/share/sgml/docbook/xsl-stylesheets
INSTALL="install -cp" \
DESTDIR=$RPM_BUILD_ROOT
-%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/sr_RS{,@latin}
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sr_RS{,@latin}
%find_lang %{name}
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README.md
-%attr(755,root,root) %{_bindir}/*
-%{_datadir}/mime/packages/mkvtoolnix.xml
-%{_desktopdir}/mkvinfo.desktop
-%{_desktopdir}/mkvtoolnix-gui.desktop
+%doc AUTHORS README.md NEWS.md
+%attr(755,root,root) %{_bindir}/mkvmerge
+%attr(755,root,root) %{_bindir}/mkvextract
+%attr(755,root,root) %{_bindir}/mkvpropedit
+%{_mandir}/man1/mkvmerge.1*
+%{_mandir}/man1/mkvextract.1*
+%{_mandir}/man1/mkvpropedit.1*
+%lang(ca) %{_mandir}/ca/man1/mkvmerge.1*
+%lang(ca) %{_mandir}/ca/man1/mkvextract.1*
+%lang(ca) %{_mandir}/ca/man1/mkvpropedit.1*
+%lang(de) %{_mandir}/de/man1/mkvmerge.1*
+%lang(de) %{_mandir}/de/man1/mkvextract.1*
+%lang(de) %{_mandir}/de/man1/mkvpropedit.1*
+%lang(es) %{_mandir}/es/man1/mkvmerge.1*
+%lang(es) %{_mandir}/es/man1/mkvextract.1*
+%lang(es) %{_mandir}/es/man1/mkvpropedit.1*
+%lang(ja) %{_mandir}/ja/man1/mkvmerge.1*
+%lang(ja) %{_mandir}/ja/man1/mkvextract.1*
+%lang(ja) %{_mandir}/ja/man1/mkvpropedit.1*
+%lang(ko) %{_mandir}/ko/man1/mkvmerge.1*
+%lang(ko) %{_mandir}/ko/man1/mkvextract.1*
+%lang(ko) %{_mandir}/ko/man1/mkvpropedit.1*
+%lang(nl) %{_mandir}/nl/man1/mkvmerge.1*
+%lang(nl) %{_mandir}/nl/man1/mkvextract.1*
+%lang(nl) %{_mandir}/nl/man1/mkvpropedit.1*
+%lang(pl) %{_mandir}/pl/man1/mkvmerge.1*
+%lang(pl) %{_mandir}/pl/man1/mkvextract.1*
+%lang(pl) %{_mandir}/pl/man1/mkvpropedit.1*
+%lang(uk) %{_mandir}/uk/man1/mkvmerge.1*
+%lang(uk) %{_mandir}/uk/man1/mkvextract.1*
+%lang(uk) %{_mandir}/uk/man1/mkvpropedit.1*
+%lang(zh_CN) %{_mandir}/zh_CN/man1/mkvmerge.1*
+%lang(zh_CN) %{_mandir}/zh_CN/man1/mkvextract.1*
+%lang(zh_CN) %{_mandir}/zh_CN/man1/mkvpropedit.1*
+
+%if %{without qt}
+%attr(755,root,root) %{_bindir}/mkvinfo
+%{_mandir}/man1/mkvinfo.1*
+%lang(ca) %{_mandir}/ca/man1/mkvinfo.1*
+%lang(de) %{_mandir}/de/man1/mkvinfo.1*
+%lang(es) %{_mandir}/es/man1/mkvinfo.1*
+%lang(ja) %{_mandir}/ja/man1/mkvinfo.1*
+%lang(ko) %{_mandir}/ko/man1/mkvinfo.1*
+%lang(nl) %{_mandir}/nl/man1/mkvinfo.1*
+%lang(pl) %{_mandir}/pl/man1/mkvinfo.1*
+%lang(uk) %{_mandir}/uk/man1/mkvinfo.1*
+%lang(zh_CN) %{_mandir}/zh_CN/man1/mkvinfo.1*
+%endif
+
+%if %{with qt}
+%files gui
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/mkvinfo
+%attr(755,root,root) %{_bindir}/mkvtoolnix-gui
+%dir %{_datadir}/mkvtoolnix
+%dir %{_datadir}/mkvtoolnix/sounds
+%{_datadir}/mkvtoolnix/sounds/finished-1.ogg
+%{_datadir}/mkvtoolnix/sounds/finished-2.ogg
+%{_datadir}/mkvtoolnix/sounds/finished-3.ogg
+%{_datadir}/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml
+%{_datadir}/mime/packages/org.bunkus.mkvtoolnix-gui.xml
+%{_desktopdir}/org.bunkus.mkvtoolnix-gui.desktop
%{_iconsdir}/hicolor/*/apps/mkvextract.png
%{_iconsdir}/hicolor/*/apps/mkvinfo.png
%{_iconsdir}/hicolor/*/apps/mkvmerge.png
%{_iconsdir}/hicolor/*/apps/mkvtoolnix-gui.png
%{_iconsdir}/hicolor/*/apps/mkvpropedit.png
-%{_mandir}/man1/*
-%lang(ca) %{_mandir}/ca/man1/*
-%lang(de) %{_mandir}/de/man1/*
-%lang(es) %{_mandir}/es/man1/*
-%lang(ja) %{_mandir}/ja/man1/*
-%lang(ko) %{_mandir}/ko/man1/*
-%lang(nl) %{_mandir}/nl/man1/*
-%lang(pl) %{_mandir}/pl/man1/*
-%lang(uk) %{_mandir}/uk/man1/*
-%lang(zh_CN) %{_mandir}/zh_CN/man1/*
+%{_mandir}/man1/mkvinfo.1*
+%{_mandir}/man1/mkvtoolnix-gui.1*
+%lang(ca) %{_mandir}/ca/man1/mkvinfo.1*
+%lang(ca) %{_mandir}/ca/man1/mkvtoolnix-gui.1*
+%lang(de) %{_mandir}/de/man1/mkvinfo.1*
+%lang(de) %{_mandir}/de/man1/mkvtoolnix-gui.1*
+%lang(es) %{_mandir}/es/man1/mkvinfo.1*
+%lang(es) %{_mandir}/es/man1/mkvtoolnix-gui.1*
+%lang(ja) %{_mandir}/ja/man1/mkvinfo.1*
+%lang(ja) %{_mandir}/ja/man1/mkvtoolnix-gui.1*
+%lang(ko) %{_mandir}/ko/man1/mkvinfo.1*
+%lang(ko) %{_mandir}/ko/man1/mkvtoolnix-gui.1*
+%lang(nl) %{_mandir}/nl/man1/mkvinfo.1*
+%lang(nl) %{_mandir}/nl/man1/mkvtoolnix-gui.1*
+%lang(pl) %{_mandir}/pl/man1/mkvinfo.1*
+%lang(pl) %{_mandir}/pl/man1/mkvtoolnix-gui.1*
+%lang(uk) %{_mandir}/uk/man1/mkvinfo.1*
+%lang(uk) %{_mandir}/uk/man1/mkvtoolnix-gui.1*
+%lang(zh_CN) %{_mandir}/zh_CN/man1/mkvinfo.1*
+%lang(zh_CN) %{_mandir}/zh_CN/man1/mkvtoolnix-gui.1*
+%endif