Clean up spec file, autodetect stable/unstable download folder

epel9
Dan Vrátil 10 years ago
parent 48327e2348
commit 4bd84f5ad6

@ -1,4 +1,3 @@
#%define snapshot 20140205
%define framework kparts %define framework kparts
Name: kf5-%{framework} Name: kf5-%{framework}
@ -8,12 +7,14 @@ Summary: KDE Frameworks 5 Tier 3 solution for KParts
License: GPLv2+ License: GPLv2+
URL: http://www.kde.org 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: kf5-rpm-macros
BuildRequires: extra-cmake-modules BuildRequires: extra-cmake-modules
@ -36,7 +37,6 @@ Requires: kf5-filesystem
%description %description
KDE Frameworks 5 Tier 3 solution for KParts KDE Frameworks 5 Tier 3 solution for KParts
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
@ -56,6 +56,7 @@ Requires: kf5-kxmlgui-devel
The %{name}-devel package contains libraries and header files for The %{name}-devel package contains libraries and header files for
developing applications that use %{name}. developing applications that use %{name}.
%prep %prep
%setup -q -n %{framework}-%{version} %setup -q -n %{framework}-%{version}
@ -71,11 +72,10 @@ make %{?_smp_mflags} -C %{_target_platform}
%make_install -C %{_target_platform} %make_install -C %{_target_platform}
%find_lang kparts5_qt --with-qt --all-name %find_lang kparts5_qt --with-qt --all-name
%post -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files -f kparts5_qt.lang %files -f kparts5_qt.lang
%doc COPYING.LIB README.md AUTHORS %doc COPYING.LIB README.md AUTHORS
%{_kf5_libdir}/libKF5Parts.so.* %{_kf5_libdir}/libKF5Parts.so.*

Loading…
Cancel
Save