From c9a8fa21b1e887f4e7e34e78c3f73d40765c1b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Mon, 3 Nov 2014 13:06:09 +0100 Subject: [PATCH] Clean up spec file, autodetect stable/unstable download folder --- kf5-kunitconversion.spec | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/kf5-kunitconversion.spec b/kf5-kunitconversion.spec index 9e8d770..7451cb0 100644 --- a/kf5-kunitconversion.spec +++ b/kf5-kunitconversion.spec @@ -7,11 +7,14 @@ Summary: KDE Frameworks 5 Tier 2 addon for unit conversions 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 @@ -32,11 +35,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Requires: kf5-ki18n-devel Requires: kf5-kconfig-devel - %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. + %prep %setup -q -n %{framework}-%{version} @@ -53,10 +56,8 @@ make %{?_smp_mflags} -C %{_target_platform} %find_lang kunitconversion5_qt --with-qt --all-name %post -p /sbin/ldconfig - %postun -p /sbin/ldconfig - %files -f kunitconversion5_qt.lang %doc COPYING.LIB README.md %{_kf5_libdir}/libKF5UnitConversion.so.*