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

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


commit f36b4ff460d87bcc842a053fc60e2ad41a36e2d3
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Mon Nov 3 13:30:28 2014 +0100

    Clean up spec file, autodetect stable/unstable download folder

 kf5-kdeclarative.spec |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/kf5-kdeclarative.spec b/kf5-kdeclarative.spec
index 17460ed..442f481 100644
--- a/kf5-kdeclarative.spec
+++ b/kf5-kdeclarative.spec
@@ -1,4 +1,3 @@
-#%define snapshot 20140205
 %define framework kdeclarative
 
 Name:           kf5-%{framework}
@@ -8,11 +7,14 @@ Summary:        KDE Frameworks 5 Tier 3 addon for Qt declarative
 
 License:        GPLv2+ 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
@@ -35,7 +37,6 @@ Requires:       kf5-filesystem
 %description
 KDE Frameworks 5 Tier 3 addon for Qt declarative
 
-
 %package        devel
 Summary:        Development files for %{name}
 Requires:       %{name}%{?_isa} = %{version}-%{release}
@@ -53,6 +54,7 @@ Requires:       kf5-kio-devel
 The %{name}-devel package contains libraries and header files for
 developing applications that use %{name}.
 
+
 %prep
 %setup -q -n %{framework}-%{version}
 
@@ -68,11 +70,10 @@ make %{?_smp_mflags} -C %{_target_platform}
 %make_install -C %{_target_platform}
 %find_lang kdeclarative5_qt --with-qt --all-name
 
-%post -p /sbin/ldconfig
 
+%post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
-
 %files -f kdeclarative5_qt.lang
 %doc COPYING COPYING.LIB README.md
 %{_kf5_libdir}/libKF5Declarative.so.*
@@ -84,13 +85,13 @@ make %{?_smp_mflags} -C %{_target_platform}
 %{_kf5_qmldir}/org/kde/kio
 
 %files devel
-%doc
 %{_kf5_includedir}/kdeclarative_version.h
 %{_kf5_includedir}/KDeclarative
 %{_kf5_libdir}/libKF5Declarative.so
 %{_kf5_libdir}/cmake/KF5Declarative
 %{_kf5_archdatadir}/mkspecs/modules/qt_KDeclarative.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