From 4cd0997418a2d1ac21347faa9655d1cb7a1a14660563a4321630ca2cf61b8b55 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 25 Oct 2017 22:05:19 +0000 Subject: [PATCH] - Add default-xsession which fvogt@suse.com added to (now deprecated) lxqt-common in the past OBS-URL: https://build.opensuse.org/package/show/X11:LXQt/lxqt-session?expand=0&rev=7 --- lxqt-session.changes | 6 ++++++ lxqt-session.spec | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lxqt-session.changes b/lxqt-session.changes index 81f82c9..6bb6602 100644 --- a/lxqt-session.changes +++ b/lxqt-session.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 25 22:00:41 UTC 2017 - mvetter@suse.com + +- Add default-xsession which fvogt@suse.com added to + (now deprecated) lxqt-common in the past + ------------------------------------------------------------------- Mon Oct 23 11:37:19 UTC 2017 - mvetter@suse.com diff --git a/lxqt-session.spec b/lxqt-session.spec index 3a1a6bf..4b8aa11 100644 --- a/lxqt-session.spec +++ b/lxqt-session.spec @@ -38,6 +38,8 @@ BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(x11-xcb) BuildRequires: xdg-user-dirs +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: %{name}-lang Obsoletes: lxqt-common BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -61,6 +63,19 @@ make %{?_smp_mflags} %cmake_install %fdupes -s %{buildroot}/%{_datadir} +# for default-xsession +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +touch %{buildroot}%{_sysconfdir}/alternatives/default-xsession.desktop +ln -s %{_sysconfdir}/alternatives/default-xsession.desktop %{buildroot}%{_datadir}/xsessions/default.desktop + +%post +%{_sbindir}/update-alternatives --install %{_datadir}/xsessions/default.desktop \ + default-xsession.desktop %{_datadir}/xsessions/lxqt.desktop 20 + +%postun +[ -f %{_datadir}/xsessions/lxqt.desktop ] || %{_sbindir}/update-alternatives \ + --remove default-xsession.desktop %{_datadir}/xsessions/lxqt.desktop + %files %defattr(-,root,root) %doc AUTHORS LICENSE @@ -84,5 +99,8 @@ make %{?_smp_mflags} %{_datadir}/kdm/sessions/lxqt.desktop %{_mandir}/man1/startlxqt.1%{ext_man} %{_datadir}/xsessions/lxqt.desktop +# for default-xsession +%ghost %{_sysconfdir}/alternatives/default-xsession.desktop +%{_datadir}/xsessions/*.desktop %changelog