Accepting request 947723 from home:Vogtinator:plasma5.24

- Remove update-alternatives handling, package is not meant to be
  coinstallable (anymore)
- Drop unnecessary ldconfig calls
- Make %files more explicit
- Refresh BuildReq versions

OBS-URL: https://build.opensuse.org/request/show/947723
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kde-cli-tools5?expand=0&rev=328
This commit is contained in:
Luca Beltrame 2022-01-20 20:07:24 +00:00 committed by Git OBS Bridge
parent d07b43c3c5
commit 7c46fe76e5
2 changed files with 30 additions and 36 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Jan 19 17:07:13 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>
- Remove update-alternatives handling, package is not meant to be
coinstallable (anymore)
- Drop unnecessary ldconfig calls
- Make %files more explicit
- Refresh BuildReq versions
-------------------------------------------------------------------
Thu Jan 13 20:30:09 UTC 2022 - Fabian Vogt <fabian@ritter-vogt.de>

View File

@ -16,7 +16,7 @@
#
%define kf5_version 5.54.0
%define kf5_version 5.86.0
%bcond_without released
Name: kde-cli-tools5
Version: 5.23.90
@ -32,7 +32,7 @@ Source2: plasma.keyring
%endif
# PATCH-FIX-OPENSUSE kdesu-add-some-i18n-love.patch -- boo#852256
Patch0: kdesu-add-some-i18n-love.patch
BuildRequires: extra-cmake-modules >= 1.3.0
BuildRequires: extra-cmake-modules >= %{kf5_version}
BuildRequires: kf5-filesystem
BuildRequires: xz
BuildRequires: cmake(KF5Activities) >= %{kf5_version}
@ -49,17 +49,15 @@ BuildRequires: cmake(KF5Su) >= %{kf5_version}
BuildRequires: cmake(KF5WindowSystem) >= %{kf5_version}
# Needs KWorkSpace::detectPlatform
BuildRequires: cmake(LibKWorkspace) >= 5.12.4
BuildRequires: cmake(Qt5DBus) >= 5.4.0
BuildRequires: cmake(Qt5Svg) >= 5.4.0
BuildRequires: cmake(Qt5Test) >= 5.4.0
BuildRequires: cmake(Qt5Widgets) >= 5.4.0
BuildRequires: cmake(Qt5X11Extras) >= 5.4.0
BuildRequires: cmake(Qt5DBus) >= 5.15.0
BuildRequires: cmake(Qt5Svg)
BuildRequires: cmake(Qt5Test)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5X11Extras)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcb)
# for kquitapp5
Requires: kdbusaddons-tools
Requires(post): update-alternatives
Requires(postun):update-alternatives
%description
Additional CLI tools for KDE applications and workspaces.
@ -67,8 +65,7 @@ Additional CLI tools for KDE applications and workspaces.
%lang_package
%prep
%setup -q -n kde-cli-tools-%{version}
%autopatch -p1
%autosetup -p1 -n kde-cli-tools-%{version}
%build
%cmake_kf5 -d build
@ -80,27 +77,12 @@ Additional CLI tools for KDE applications and workspaces.
%find_lang %{name} --with-man --all-name
%kf5_find_htmldocs
%endif
ln -s %{_kf5_libexecdir}/kdesu %{buildroot}%{_kf5_bindir}/kdesu
# create a dummy target for /etc/alternatives/kdesu
install -d -m 755 %{buildroot}%{_sysconfdir}/alternatives/
touch %{buildroot}%{_sysconfdir}/alternatives/kdesu
chmod +x %{buildroot}%{_sysconfdir}/alternatives/kdesu
ln -s -f %{_sysconfdir}/alternatives/kdesu %{buildroot}%{_kf5_bindir}/kdesu
touch %{buildroot}%{_sysconfdir}/alternatives/kdesu.1%{?ext_man}
mv %{buildroot}%{_kf5_mandir}/man1/kdesu.1 %{buildroot}%{_kf5_mandir}/man1/kdesu-5.1
ln -s -f %{_sysconfdir}/alternatives/kdesu.1%{?ext_man} %{buildroot}%{_kf5_mandir}/man1/kdesu.1%{?ext_man}
%post
/sbin/ldconfig
%{_sbindir}/update-alternatives \
--install %{_kf5_bindir}/kdesu kdesu %{_kf5_libexecdir}/kdesu 25 \
--slave %{_kf5_mandir}/man1/kdesu.1.gz kdesu.1%{?ext_man} %{_kf5_mandir}/man1/kdesu-5.1%{?ext_man}
%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
%{_sbindir}/update-alternatives --remove kdesu \
%{_kf5_libexecdir}/kdesu
%pre
# Remove old update-alternatives entry
if [ -x "%{_sbindir}/update-alternatives" ]; then
%{_sbindir}/update-alternatives --remove kdesu %{_kf5_libexecdir}/kdesu
fi
%files
@ -119,14 +101,17 @@ fi
%{_kf5_bindir}/ktraderclient5
%{_kf5_bindir}/kbroadcastnotification
%{_kf5_bindir}/plasma-open-settings
%{_kf5_libexecdir}/
%{_kf5_libexecdir}/kdeeject
%{_kf5_libexecdir}/kdesu
%{_kf5_applicationsdir}/org.kde.keditfiletype.desktop
%{_kf5_applicationsdir}/org.kde.plasma.settings.open.desktop
%ghost %{_sysconfdir}/alternatives/kdesu
%{_kf5_plugindir}/
%ghost %{_sysconfdir}/alternatives/kdesu.1%{?ext_man}
%dir %{_kf5_plugindir}/
%dir %{_kf5_plugindir}/plasma/
%dir %{_kf5_plugindir}/plasma/kcms/
%dir %{_kf5_plugindir}/plasma/kcms/systemsettings_qwidgets/
%{_kf5_plugindir}/plasma/kcms/systemsettings_qwidgets/kcm_filetypes.so
%doc %{_kf5_htmldir}/en
%{_kf5_mandir}/man1/kdesu*.*
%{_kf5_mandir}/man1/kdesu*
%if %{with released}
%files lang -f %{name}.lang