Clean up spec file, autodetect stable/unstable download folder

epel9
Dan Vrátil 10 years ago
parent 86e4d13479
commit 79ed51e84c

@ -1,4 +1,3 @@
#%define snapshot 20140205
%define framework kdesu %define framework kdesu
Name: kf5-%{framework} Name: kf5-%{framework}
@ -8,11 +7,14 @@ Summary: KDE Frameworks 5 Tier 3 integration with su
License: LGPLv2+ License: LGPLv2+
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 | \ %global revision %(echo %{version} | cut -d. -f3)
# bzip2 -c > %{name}-%{version}-%{snapshot}git.tar.bz2 %if %{revision} >= 50
#Source0: %{name}-%{version}-%{snapshot}git.tar.bz2 %global stable unstable
Source0: http://download.kde.org/stable/frameworks/%{version}/%{framework}-%{version}.tar.xz %else
%global stable stable
%endif
Source0: http://download.kde.org/%{stable}/frameworks/%{version}/%{framework}-%{version}.tar.xz
BuildRequires: libX11-devel BuildRequires: libX11-devel
@ -29,7 +31,6 @@ Requires: kf5-filesystem
%description %description
KDE Frameworks 5 Tier 3 integration with su for elevated privileges. KDE Frameworks 5 Tier 3 integration with su for elevated privileges.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
@ -41,6 +42,7 @@ Requires: kf5-kpty-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}
@ -56,11 +58,10 @@ make %{?_smp_mflags} -C %{_target_platform}
%make_install -C %{_target_platform} %make_install -C %{_target_platform}
%find_lang kdesu5_qt --with-qt --all-name %find_lang kdesu5_qt --with-qt --all-name
%post -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files -f kdesu5_qt.lang %files -f kdesu5_qt.lang
%doc COPYING.LIB README.md %doc COPYING.LIB README.md
%{_kf5_libdir}/libKF5Su.so.* %{_kf5_libdir}/libKF5Su.so.*

Loading…
Cancel
Save