rdieter pushed to kbruch (master). "kf5-ize"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Apr 17 01:18:17 UTC 2015


>From 46446548c163a262aea514a8f5ba6cd4b3e7403b Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at math.unl.edu>
Date: Thu, 16 Apr 2015 20:18:05 -0500
Subject: kf5-ize


diff --git a/kbruch-15.04.0-dt.patch b/kbruch-15.04.0-dt.patch
new file mode 100644
index 0000000..fc4f750
--- /dev/null
+++ b/kbruch-15.04.0-dt.patch
@@ -0,0 +1,14 @@
+diff -up kbruch-15.04.0/src/CMakeLists.txt.dt kbruch-15.04.0/src/CMakeLists.txt
+--- kbruch-15.04.0/src/CMakeLists.txt.dt	2015-03-19 04:08:12.000000000 -0500
++++ kbruch-15.04.0/src/CMakeLists.txt	2015-04-16 20:17:17.914092059 -0500
+@@ -50,8 +50,8 @@ install(TARGETS kbruch  ${INSTALL_TARGET
+ 
+ ########### install files ###############
+ 
+-install( PROGRAMS org.kde.kbruch.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR}/kbruch )
+-install( FILES kbruch.kcfg  DESTINATION  ${KCFG_INSTALL_DIR}/kbruch )
++install( PROGRAMS org.kde.kbruch.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} )
++install( FILES kbruch.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
+ install( FILES kbruchui.rc  DESTINATION  ${KXMLGUI_INSTALL_DIR}/kbruch )
+ install( FILES AppMenuWidgetui.rc  DESTINATION  ${KXMLGUI_INSTALL_DIR}/kbruch )
+ install( FILES FractionRingWidgetui.rc  DESTINATION  ${KXMLGUI_INSTALL_DIR}/kbruch )
diff --git a/kbruch.spec b/kbruch.spec
index 89ac414..3e37242 100644
--- a/kbruch.spec
+++ b/kbruch.spec
@@ -13,10 +13,35 @@ URL:     https://projects.kde.org/projects/kde/kdeedu/%{name}
 %endif
 Source0: http://download.kde.org/%{stable}/applications/%{version}/src/%{name}-%{version}.tar.xz
 
-BuildRequires: desktop-file-utils
-BuildRequires: kdelibs4-devel >= 4.14
+## upstreamable patches
+Patch1: kbruch-15.04.0-dt.patch
 
-%{?kde_runtime_requires}
+BuildRequires: cmake
+BuildRequires: desktop-file-utils
+BuildRequires: extra-cmake-modules
+BuildRequires: gettext
+BuildRequires: kf5-rpm-macros
+BuildRequires: kf5-kcompletion-devel
+BuildRequires: kf5-kconfig-devel
+BuildRequires: kf5-kconfigwidgets-devel
+BuildRequires: kf5-kcoreaddons-devel
+BuildRequires: kf5-kdbusaddons-devel
+BuildRequires: kf5-kdeclarative-devel
+BuildRequires: kf5-kguiaddons-devel
+BuildRequires: kf5-ki18n-devel
+BuildRequires: kf5-kiconthemes-devel
+BuildRequires: kf5-kitemviews-devel
+BuildRequires: kf5-kio-devel
+BuildRequires: kf5-kjobwidgets-devel
+BuildRequires: kf5-knewstuff-devel
+BuildRequires: kf5-knotifyconfig-devel
+BuildRequires: kf5-knewstuff-devel
+BuildRequires: kf5-kservice-devel
+BuildRequires: kf5-kwindowsystem-devel
+BuildRequires: kf5-kwidgetsaddons-devel
+BuildRequires: kf5-kxmlgui-devel
+BuildRequires: pkgconfig(Qt5Widgets)
+BuildRequires: libappstream-glib
 
 # when split occurred
 Conflicts: kdeedu-math < 4.7.0-10
@@ -29,11 +54,13 @@ Conflicts: kdeedu-math < 4.7.0-10
 %prep
 %setup -q
 
+%patch1 -p1 -b .dt
+
 
 %build
-mkdir -p %{_target_platform}
+mkdir %{_target_platform}
 pushd %{_target_platform}
-%{cmake_kde4} ..
+%{cmake_kf5} ..
 popd
 
 make %{?_smp_mflags} -C %{_target_platform}
@@ -42,34 +69,39 @@ make %{?_smp_mflags} -C %{_target_platform}
 %install
 make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
 
-%find_lang %{name} --with-kde --without-mo
-
 
 %check
-desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/%{name}.desktop
+appstream-util validate-relax --nonet %{buildroot}%{_kf5_datadir}/*appdata/%{name}.appdata.xml ||:
+desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.%{name}.desktop ||:
 
 
 %post
-touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
-
-%posttrans
-gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
+touch --no-create %{_kf5_datadir}/icons/hicolor &> /dev/null || :
 
 %postun
 if [ $1 -eq 0 ] ; then
-touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
-gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
+touch --no-create %{_kf5_datadir}/icons/hicolor &> /dev/null
+gtk-update-icon-cache %{_kf5_datadir}/icons/hicolor &> /dev/null || :
 fi
 
-%files -f %{name}.lang
-%doc AUTHORS ChangeLog COPYING NEWS README TODO VERSION
-%{_kde4_bindir}/kbruch
-%{_kde4_datadir}/appdata/kbruch.appdata.xml
-%{_kde4_datadir}/applications/kde4/kbruch.desktop
-%{_kde4_datadir}/config.kcfg/kbruch.kcfg
-%{_kde4_iconsdir}/hicolor/*/*/kbruch.*
-%{_kde4_appsdir}/kbruch/
-%{_mandir}/man1/kbruch.*
+%posttrans
+gtk-update-icon-cache %{_kf5_datadir}/icons/hicolor &> /dev/null || :
+
+%files
+%doc COPYING*
+#doc README
+%{_kf5_bindir}/%{name}
+#{_sysconfdir}/xdg/%{name}.knsrc
+%{_kf5_datadir}/applications/org.kde.%{name}.desktop
+%{_kf5_datadir}/appdata/*%{name}.appdata.xml
+%{_kf5_datadir}/icons/hicolor/*/apps/%{name}.*
+%{_kf5_datadir}/%{name}/
+%{_kf5_docdir}/HTML/en/%{name}/
+#{_kf5_datadir}/kconf_update/%{name}*
+%{_kf5_datadir}/kxmlgui5/%{name}/
+#{_kf5_datadir}/sounds/%{name}/
+%{_kf5_datadir}/config.kcfg/%{name}.kcfg
+%{_mandir}/man1/kbruch.1*
 
 
 %changelog
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/kbruch.git/commit/?h=master&id=46446548c163a262aea514a8f5ba6cd4b3e7403b


More information about the scm-commits mailing list