Clean up spec file, autodetect stable/unstable download folder

This commit is contained in:
Dan Vrátil 2014-11-03 12:54:11 +01:00
parent e418915094
commit 1f4b09bcb5

View File

@ -1,4 +1,3 @@
#%define snapshot 20140205
%define framework kimageformats
Name: kf5-%{framework}
@ -8,11 +7,14 @@ Summary: KDE Frameworks 5 Tier 1 addon with additional image plugins for
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: jasper-devel
BuildRequires: OpenEXR-devel
@ -44,11 +46,10 @@ make %{?_smp_mflags} -C %{_target_platform}
%install
%make_install -C %{_target_platform}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc COPYING.LIB README.md
%{_kf5_qtplugindir}/imageformats/*.so