[kf5-karchive/f20] Clean up spec file, autodetect stable/unstable download folder

Daniel Vrátil dvratil at fedoraproject.org
Tue Nov 4 12:27:36 UTC 2014


commit b9caa2affa40a35bd0f48a0dc71e331ae4e8f99d
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Mon Nov 3 12:54:11 2014 +0100

    Clean up spec file, autodetect stable/unstable download folder

 kf5-karchive.spec |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/kf5-karchive.spec b/kf5-karchive.spec
index 3b91d3d..aee9d26 100644
--- a/kf5-karchive.spec
+++ b/kf5-karchive.spec
@@ -8,7 +8,13 @@ Summary:        KDE Frameworks 5 Tier 1 addon with archive functions
 License:        LGPLv2+ and BSD
 URL:            http://www.kde.org
 
-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:  zlib-devel
 BuildRequires:  bzip2-devel
@@ -47,11 +53,10 @@ make %{?_smp_mflags} -C %{_target_platform}
 %install
 %make_install -C %{_target_platform}
 
-%post -p /sbin/ldconfig
 
+%post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
-
 %files
 %doc AUTHORS COPYING COPYING.LIB README.md
 %{_kf5_libdir}/libKF5Archive.so.*
@@ -63,6 +68,7 @@ make %{?_smp_mflags} -C %{_target_platform}
 %{_kf5_libdir}/cmake/KF5Archive
 %{_kf5_archdatadir}/mkspecs/modules/qt_KArchive.pri
 
+
 %changelog
 * Mon Nov 03 2014 Daniel Vrátil <dvratil at redhat.com> - 5.4.0-1
 - KDE Frameworks 5.4.0


More information about the scm-commits mailing list