From 9e8c8556dba88d6a8008e5105032cb2c6885ab4f Mon Sep 17 00:00:00 2001 From: Dan Vrátil Date: Nov 03 2014 12:55:38 +0000 Subject: Clean up spec file, autodetect stable/unstable download folder --- diff --git a/kf5-kconfigwidgets.spec b/kf5-kconfigwidgets.spec index 398a333..709bccf 100644 --- a/kf5-kconfigwidgets.spec +++ b/kf5-kconfigwidgets.spec @@ -1,4 +1,3 @@ -#%define snapshot 20140205 %define framework kconfigwidgets Name: kf5-%{framework} @@ -8,11 +7,14 @@ Summary: KDE Frameworks 5 Tier 3 addon for creating configuration dialogs License: GPLv2+ and LGPLv2+ and MIT URL: http://www.kde.org -# git archive --format=tar --prefix=%{framework}-%{version}/ \ -# --remote=git://anongit.kde.org/%{framework}.git master | \ -# bzip2 -c > %{name}-%{version}-%{snapshot}git.tar.bz2 -#Source0: %{name}-%{version}-%{snapshot}git.tar.bz2 -Source0: http://download.kde.org/stable/frameworks/%{version}/%{framework}-%{version}.tar.xz + +%global revision %(echo %{version} | cut -d. -f3) +%if %{revision} >= 50 +%global stable unstable +%else +%global stable stable +%endif +Source0: http://download.kde.org/%{stable}/frameworks/%{version}/%{framework}-%{version}.tar.xz BuildRequires: kf5-rpm-macros BuildRequires: extra-cmake-modules @@ -33,7 +35,6 @@ Requires: kf5-filesystem KConfigWidgets provides easy-to-use classes to create configuration dialogs, as well as a set of widgets which uses KConfig to store their settings. - %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -50,6 +51,7 @@ Requires: kf5-kwidgetsaddons-devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. + %prep %setup -q -n %{framework}-%{version} @@ -65,11 +67,10 @@ make %{?_smp_mflags} -C %{_target_platform} %make_install -C %{_target_platform} %find_lang kconfigwidgets5_qt --with-qt --all-name -%post -p /sbin/ldconfig +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig - %files -f kconfigwidgets5_qt.lang %doc COPYING COPYING.LIB README.md %{_kf5_libdir}/libKF5ConfigWidgets.so.* @@ -79,7 +80,6 @@ make %{?_smp_mflags} -C %{_target_platform} %{_kf5_datadir}/locale/*/kf5_entry.desktop %files devel -%doc %{_kf5_includedir}/kconfigwidgets_version.h %{_kf5_includedir}/KConfigWidgets %{_kf5_libdir}/libKF5ConfigWidgets.so