From 1b55a877f0d59d52fad7f142ff0fe2e6502a81da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Mon, 3 Nov 2014 12:54:11 +0100 Subject: [PATCH] Clean up spec file, autodetect stable/unstable download folder --- kf5-kitemmodels.spec | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/kf5-kitemmodels.spec b/kf5-kitemmodels.spec index 24044fb..dc10ee4 100644 --- a/kf5-kitemmodels.spec +++ b/kf5-kitemmodels.spec @@ -1,4 +1,3 @@ -#%define snapshot 20140205 %define framework kitemmodels Name: kf5-%{framework} @@ -8,11 +7,14 @@ Summary: KDE Frameworks 5 Tier 1 addon with item models License: LGPLv2+ 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 @@ -47,11 +49,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 COPYING.LIB README.md %{_kf5_libdir}/libKF5ItemModels.so.*