Build with KF5/Qt5 on F-26+

This commit is contained in:
Ville Skyttä 2017-01-02 01:17:29 +02:00
parent f2ddbc3ca7
commit 5b78b08cbd
1 changed files with 30 additions and 1 deletions

View File

@ -1,6 +1,11 @@
%if 0%{?fedora} < 25
%global update_desktop_database update-desktop-database %{_datadir}/applications &>/dev/null
%endif
%if 0%{?fedora} < 26
%bcond_without kf5
%else
%bcond_with kf5
%endif
# keep this in sync with phonon-backend-gstreamer
%global gstversion 1.0
@ -13,7 +18,12 @@ License: GPLv2+
URL: http://kid3.sourceforge.net/
Source0: http://downloads.sourceforge.net/kid3/%{name}-%{version}.tar.gz
%if %{with kf5}
BuildRequires: kf5-kio-devel
BuildRequires: kf5-kdoctools-devel
%else
BuildRequires: kdelibs4-devel
%endif
BuildRequires: cmake
BuildRequires: id3lib-devel
BuildRequires: taglib-devel >= 1.4
@ -65,7 +75,12 @@ built without KDE dependencies.
%build
%if %{with kf5}
%cmake_kf5 \
%{?_cmake_lib_suffix64} \
%else
%cmake_kde4 \
%endif
-DWITH_GSTREAMER_VERSION=%{gstversion} \
-DWITH_NO_MANCOMPRESS=ON \
.
@ -79,7 +94,15 @@ built without KDE dependencies.
install -dm 755 $RPM_BUILD_ROOT%{_pkgdocdir}
install -pm 644 AUTHORS ChangeLog README $RPM_BUILD_ROOT%{_pkgdocdir}
%if %{with kf5}
%find_lang %{name} --with-man
# --with-kde doesn't work with kf5 yet
# https://github.com/rpm-software-management/rpm/pull/112
echo "%%lang(de) %%{_kf5_datadir}/doc/HTML/de/kid3/" >> %{name}.lang
echo "%%lang(en) %%{_kf5_datadir}/doc/HTML/en/kid3/" >> %{name}.lang
%else
%find_lang %{name} --with-kde --with-man
%endif
mv %{name}.lang %{name}-kde.lang
%find_lang %{name}-qt --with-man
%find_lang %{name}-cli --with-man
@ -128,10 +151,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files -f %{name}-kde.lang
%{_bindir}/kid3
%{_datadir}/appdata/kid3.appdata.xml
%{_datadir}/applications/kde4/kid3.desktop
%{_datadir}/icons/hicolor/*x*/apps/kid3.png
%{_datadir}/icons/hicolor/scalable/apps/kid3.svgz
%if %{with kf5}
%{_datadir}/applications/kid3.desktop
%{_datadir}/kxmlgui5/
%else
%{_datadir}/applications/kde4/kid3.desktop
%{_kde4_appsdir}/kid3/
%endif
%files common -f %{name}-cli.lang
%{_bindir}/kid3-cli
@ -158,6 +186,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
* Sun Jan 1 2017 Ville Skyttä <ville.skytta@iki.fi> - 3.4.4-1
- Update to 3.4.4
- Build with KF5/Qt5 on F-26+
* Tue Nov 1 2016 Ville Skyttä <ville.skytta@iki.fi> - 3.4.3-1
- Update to 3.4.3