From 37a0df5ab46ed71cc182401432ea49a6a800cb3a02615a5c38a298727b17ecbb Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 18 May 2018 13:36:11 +0000 Subject: [PATCH] - boo#1080494: Add update-alternative configuration - Run spec-cleaner OBS-URL: https://build.opensuse.org/package/show/X11:windowmanagers/fvwm2?expand=0&rev=41 --- fvwm2.changes | 6 ++++++ fvwm2.spec | 22 +++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/fvwm2.changes b/fvwm2.changes index ba5876e..154baa2 100644 --- a/fvwm2.changes +++ b/fvwm2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri May 18 13:24:18 UTC 2018 - mvetter@suse.com + +- boo#1080494: Add update-alternative configuration +- Run spec-cleaner + ------------------------------------------------------------------- Fri Feb 10 16:53:50 UTC 2017 - jengelh@inai.de diff --git a/fvwm2.spec b/fvwm2.spec index 8cff3de..645a92a 100644 --- a/fvwm2.spec +++ b/fvwm2.spec @@ -1,7 +1,7 @@ # # spec file for package fvwm2 # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ Name: fvwm2 Version: 2.6.7 Release: 0 Summary: The F Virtual Window Manager -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/GUI/Other Url: http://www.fvwm.org Source0: fvwm-%{version}.tar.bz2 @@ -68,13 +68,14 @@ Requires: mktemp Requires: wallpaper-branding Requires: xdg-menu Requires: xli +Requires(post): update-alternatives +Requires(postun): update-alternatives Provides: fvwm Provides: fvwmicns Provides: windowmanager Provides: xpmroot Obsoletes: fvwm Obsoletes: xpmroot -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description FVWM is a virtual desktop window manager for the X Window System. @@ -109,7 +110,6 @@ cp %{SOURCE7} bin/ # build %build -%{?suse_update_config:%{suse_update_config -f}} autoreconf -fi CFLAGS="%{optflags} -fno-strict-aliasing" \ LDFLAGS="-L/usr/%{_lib}" \ @@ -126,7 +126,7 @@ LDFLAGS="-L/usr/%{_lib}" \ make %{?_smp_mflags} %install -make %{?_smp_mflags} DESTDIR=%{buildroot} install +%make_install #make prefix=$RPM_BUILD_ROOT%{_xorg7prefix} \ # sysconfdir=$RPM_BUILD_ROOT/etc/X11/fvwm2 \ # install @@ -178,9 +178,17 @@ rm -f %{buildroot}/%{_docdir}/fvwm2/README.vms %find_lang fvwm %{name}.lang %find_lang FvwmScript %{name}.lang +%post +%{_sbindir}/update-alternatives --install %{_datadir}/xsessions/default.desktop \ + default-xsession.desktop %{_datadir}/xsessions/fvwm2.desktop 20 + +%postun +[ -f %{_datadir}/xsessions/lxqt.desktop ] || %{_sbindir}/update-alternatives \ + --remove default-xsession.desktop %{_datadir}/xsessions/fvwm2.desktop + %files -f %{name}.lang -%defattr(-,root,root) -%doc COPYING NEWS docs docu-module/* +%license COPYING +%doc NEWS docs docu-module/* %dir %{_sysconfdir}/X11/fvwm2 %config %{_sysconfdir}/X11/fvwm2/system.fvwm2rc %{_prefix}/%{_xorg7bin}/*