Clean up spec file, autodetect stable/unstable download folder

epel8
Dan Vrátil 10 years ago
parent 1c9eeeb889
commit 8306632df0

@ -1,4 +1,3 @@
#%define snapshot 20140205
%define framework kservice %define framework kservice
Name: kf5-%{framework} Name: kf5-%{framework}
@ -8,11 +7,14 @@ Summary: KDE Frameworks 5 Tier 3 solution for advanced plugin and service
License: GPLv2+ and LGPLv2+ License: GPLv2+ and 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: kf5-rpm-macros BuildRequires: kf5-rpm-macros
BuildRequires: extra-cmake-modules BuildRequires: extra-cmake-modules
@ -31,7 +33,6 @@ Requires: kf5-filesystem
KDE Frameworks 5 Tier 3 solution for advanced plugin and service KDE Frameworks 5 Tier 3 solution for advanced plugin and service
introspection. introspection.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
@ -46,6 +47,7 @@ Requires: kf5-kdoctools-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}
@ -63,11 +65,10 @@ make %{?_smp_mflags} -C %{_target_platform}
mv %{buildroot}/%{_kf5_sysconfdir}/xdg/menus/applications.menu %{buildroot}/%{_kf5_sysconfdir}/xdg/menus/kf5-applications.menu mv %{buildroot}/%{_kf5_sysconfdir}/xdg/menus/applications.menu %{buildroot}/%{_kf5_sysconfdir}/xdg/menus/kf5-applications.menu
%post -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files -f kservice5_qt.lang %files -f kservice5_qt.lang
%doc COPYING COPYING.LIB README.md %doc COPYING COPYING.LIB README.md
%config %{_kf5_sysconfdir}/xdg/menus/kf5-applications.menu %config %{_kf5_sysconfdir}/xdg/menus/kf5-applications.menu

Loading…
Cancel
Save