From 250725b7fa443e08e89a0ad8da487b02f8cf7aef 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-kdoctools.spec | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/kf5-kdoctools.spec b/kf5-kdoctools.spec index cbbb0aa..ad5c185 100644 --- a/kf5-kdoctools.spec +++ b/kf5-kdoctools.spec @@ -1,4 +1,3 @@ -# %define snapshot 20140315 %define framework kdoctools Name: kf5-%{framework} @@ -8,11 +7,14 @@ Summary: KDE Frameworks 5 Tier 2 addon for generating documentation 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: libxslt-devel BuildRequires: libxml2-devel @@ -32,7 +34,6 @@ Requires: kf5-filesystem %description Provides tools to generate documentation in various format from DocBook files. - %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -53,7 +54,6 @@ Documentation and user help for %{name}. %prep %setup -q -n %{framework}-%{version} - %build mkdir -p %{_target_platform} pushd %{_target_platform} @@ -75,16 +75,15 @@ make %{?_smp_mflags} -C %{_target_platform} %{_kf5_datadir}/man/man8/* %{_kf5_datadir}/kf5/kdoctools - %files devel %{_kf5_includedir}/XsltKde %{_kf5_libdir}/libKF5XsltKde.a %{_kf5_libdir}/cmake/KF5DocTools - %files doc %{_kf5_docdir}/HTML/*/kdoctools5-common + %changelog * Mon Nov 03 2014 Daniel Vrátil - 5.4.0-1 - KDE Frameworks 5.4.0