From b4b5f097b425f1ae05fc172131745ea0053f99a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Mon, 3 Nov 2014 13:30:28 +0100 Subject: [PATCH] Clean up spec file, autodetect stable/unstable download folder --- kf5-ktexteditor.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/kf5-ktexteditor.spec b/kf5-ktexteditor.spec index a668bdb..0f6d6ac 100644 --- a/kf5-ktexteditor.spec +++ b/kf5-ktexteditor.spec @@ -7,12 +7,14 @@ Summary: KDE Frameworks 5 Tier 3 with advanced embeddable text editor 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: http://download.kde.org/unstable/frameworks/%{version}/%{framework}-%{version}.tar.xz -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 @@ -49,6 +51,7 @@ Requires: kf5-kparts-devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. + %prep %setup -q -n %{framework}-%{version} @@ -64,6 +67,7 @@ make %{?_smp_mflags} -C %{_target_platform} %make_install -C %{_target_platform} %find_lang ktexteditor5_qt --with-qt --all-name + %post /sbin/ldconfig /usr/bin/update-desktop-database &> /dev/null || : @@ -72,7 +76,6 @@ make %{?_smp_mflags} -C %{_target_platform} /sbin/ldconfig /usr/bin/update-desktop-database &> /dev/null || : - %files -f ktexteditor5_qt.lang %doc COPYING.LIB README.md %config %{_sysconfdir}/xdg/kate*