Clean up spec file, autodetect stable/unstable download folder

epel9
Dan Vrátil 10 years ago
parent 97dabdc37a
commit b4b5f097b4

@ -7,12 +7,14 @@ Summary: KDE Frameworks 5 Tier 3 with advanced embeddable text editor
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 | \
# bzip2 -c > %{name}-%{version}-%{snapshot}git.tar.bz2
# Source0: http://download.kde.org/unstable/frameworks/%{version}/%{framework}-%{version}.tar.xz
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
@ -49,6 +51,7 @@ Requires: kf5-kparts-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}
@ -64,6 +67,7 @@ make %{?_smp_mflags} -C %{_target_platform}
%make_install -C %{_target_platform} %make_install -C %{_target_platform}
%find_lang ktexteditor5_qt --with-qt --all-name %find_lang ktexteditor5_qt --with-qt --all-name
%post %post
/sbin/ldconfig /sbin/ldconfig
/usr/bin/update-desktop-database &> /dev/null || : /usr/bin/update-desktop-database &> /dev/null || :
@ -72,7 +76,6 @@ make %{?_smp_mflags} -C %{_target_platform}
/sbin/ldconfig /sbin/ldconfig
/usr/bin/update-desktop-database &> /dev/null || : /usr/bin/update-desktop-database &> /dev/null || :
%files -f ktexteditor5_qt.lang %files -f ktexteditor5_qt.lang
%doc COPYING.LIB README.md %doc COPYING.LIB README.md
%config %{_sysconfdir}/xdg/kate* %config %{_sysconfdir}/xdg/kate*

Loading…
Cancel
Save