From 0d4642709007241d8c17c42005873905571a07bee6a085ff5bb555c65efb1f28 Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Sat, 31 Mar 2012 10:19:07 +0000 Subject: [PATCH 1/3] - specfile cleanup - corrected dependencies - split off libxfsm-4_6-0, -doc and -lang subpackages - added xfce4-session-respect-session-save-setting.patch in order to respect the value of the "/general/SaveOnExit" option from xfce4-session in the logout panel plugin as well (bxo#7915) OBS-URL: https://build.opensuse.org/package/show/X11:xfce/xfce4-session?expand=0&rev=89 --- ...session-respect-session-save-setting.patch | 74 ++++++++++++++ xfce4-session.changes | 10 ++ xfce4-session.spec | 97 ++++++++++++------- 3 files changed, 148 insertions(+), 33 deletions(-) create mode 100644 xfce4-session-respect-session-save-setting.patch diff --git a/xfce4-session-respect-session-save-setting.patch b/xfce4-session-respect-session-save-setting.patch new file mode 100644 index 0000000..7fd5eb8 --- /dev/null +++ b/xfce4-session-respect-session-save-setting.patch @@ -0,0 +1,74 @@ +From d7311f2dcedd96f5833acceb27f9d17275893e1e Mon Sep 17 00:00:00 2001 +From: Lionel Le Folgoc +Date: Thu, 25 Aug 2011 14:22:24 +0200 +Subject: Do not always save session with xfce4-logout-plugin (Bug #7915) + +Respect the value of the "/general/SaveOnExit" option from xfce4-session in the +logout panel plugin as well. + +Bug: https://bugzilla.xfce.org/show_bug.cgi?id=7915 +--- + panel-plugin/Makefile.am | 2 ++ + panel-plugin/xfsm-logout-plugin.c | 14 +++++++++++++- + 2 files changed, 15 insertions(+), 1 deletions(-) + +diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am +index 0675e2e..fd0609b 100644 +--- a/panel-plugin/Makefile.am ++++ b/panel-plugin/Makefile.am +@@ -18,6 +18,7 @@ libxfsm_logout_plugin_la_SOURCES = \ + libxfsm_logout_plugin_la_CFLAGS = \ + $(LIBX11_CFLAGS) \ + $(LIBXFCE4PANEL_CFLAGS) \ ++ $(XFCONF_CFLAGS) \ + $(LIBXFCE4UTIL_CFLAGS) \ + $(LIBXFCE4UI_CFLAGS) \ + $(GTK_CFLAGS) \ +@@ -26,6 +27,7 @@ libxfsm_logout_plugin_la_CFLAGS = \ + libxfsm_logout_plugin_la_LIBADD = \ + $(LIBX11_LIBS) \ + $(LIBXFCE4PANEL_LIBS) \ ++ $(XFCONF_LIBS) \ + $(LIBXFCE4UTIL_LIBS) \ + $(LIBXFCE4UI_LIBS) \ + $(GTK_LIBS) \ +diff --git a/panel-plugin/xfsm-logout-plugin.c b/panel-plugin/xfsm-logout-plugin.c +index b8e25ab..12dec0f 100644 +--- a/panel-plugin/xfsm-logout-plugin.c ++++ b/panel-plugin/xfsm-logout-plugin.c +@@ -43,6 +43,7 @@ + + #include + #include ++#include + #include + + #include "xfsm-logout-plugin-ui.h" +@@ -207,12 +208,23 @@ static void + xfsm_logout_plugin_show_confirmation_dialog(XfsmLogoutPlugin *logout_plugin, + XfsmShutdownType type) + { ++ GError *error = NULL; ++ XfconfChannel *channel; + gint resp = GTK_RESPONSE_ACCEPT; + + g_return_if_fail(logout_plugin != NULL); + g_return_if_fail(type >= XFSM_SHUTDOWN_LOGOUT && type <= XFSM_SHUTDOWN_HIBERNATE); + +- logout_plugin->allow_save = TRUE; ++ if (G_UNLIKELY (!xfconf_init (&error))) { ++ g_warning ("Unable to contact settings server: %s", error->message); ++ g_error_free (error); ++ logout_plugin->allow_save = TRUE; ++ } ++ else { ++ channel = xfconf_channel_get ("xfce4-session"); ++ logout_plugin->allow_save = xfconf_channel_get_bool (channel, "/general/SaveOnExit", TRUE); ++ xfconf_shutdown (); ++ } + + if(type != XFSM_SHUTDOWN_SUSPEND && type != XFSM_SHUTDOWN_HIBERNATE) { + GtkWidget *dialog, *topvbox, *hbox, *image, *label; +-- +1.7.2.5 + diff --git a/xfce4-session.changes b/xfce4-session.changes index 937e5e0..ef79a72 100644 --- a/xfce4-session.changes +++ b/xfce4-session.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Mar 30 14:03:39 UTC 2012 - gber@opensuse.org + +- specfile cleanup +- corrected dependencies +- split off libxfsm-4_6-0, -doc and -lang subpackages +- added xfce4-session-respect-session-save-setting.patch in order + to respect the value of the "/general/SaveOnExit" option from + xfce4-session in the logout panel plugin as well (bxo#7915) + ------------------------------------------------------------------- Mon Feb 20 13:20:27 UTC 2012 - gber@opensuse.org diff --git a/xfce4-session.spec b/xfce4-session.spec index 806c06e..3e76f82 100644 --- a/xfce4-session.spec +++ b/xfce4-session.spec @@ -16,65 +16,79 @@ # +%define libname libxfsm-4_6-0 + Name: xfce4-session Version: 4.8.3 Release: 0 Summary: Xfce Session Manager License: GPL-2.0+ Group: System/GUI/XFCE -Url: http://www.xfce.org/projects/xfce4-session/ -Source: %{name}-%{version}.tar.bz2 +Url: http://docs.xfce.org/xfce/xfce4-session/start +Source: http://archive.xfce.org/src/xfce/xfce4-session/4.8/%{name}-%{version}.tar.bz2 # PATCH-FEATURE-OPENSUSE xfce4-session-simple-splash-remove-shadows.patch gber@opensuse.org -- Improves readability of the simple splash engine text by removing the text shadows Patch0: xfce4-session-simple-splash-remove-shadows.patch # PATCH-FIX-UPSTREAM xfce4-session-fix-gnome-mode.patch bnc#710038 bxo#8014 gber@opensuse.org -- Removes obsolete GNOME compatibility code, treats GNOME-/KDE-only autostart files as inactive, and allows to enable them through xfce4-session-settings Patch1: xfce4-session-fix-gnome-mode.patch # PATCH-FEATURE-UPSTREAM xfce4-session-lock-screen-on-suspend-hibernate.patch bxo#6019 gber@opensuse.org -- Try to lock the screen when hibernating/suspending Patch2: xfce4-session-lock-screen-on-suspend-hibernate.patch -BuildRequires: docbook-xsl-stylesheets -BuildRequires: docbook_4 +# PATCH-FIX-UPSTREAM xfce4-session-respect-session-save-setting.patch bxo#7915 gber@opensuse.org -- Respect the value of the "/general/SaveOnExit" option from xfce4-session in the logout panel plugin as well (backported from upstream git) +Patch3: xfce4-session-respect-session-save-setting.patch BuildRequires: intltool -BuildRequires: libxslt -BuildRequires: perl-XML-Parser BuildRequires: update-desktop-files BuildRequires: xfce4-dev-tools -BuildRequires: xml2po BuildRequires: xorg-x11 +BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(gconf-2.0) +BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: pkgconfig(gnome-keyring-1) +BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(libwnck-1.0) BuildRequires: pkgconfig(libxfce4panel-1.0) BuildRequires: pkgconfig(libxfce4ui-1) BuildRequires: pkgconfig(libxfce4util-1.0) -BuildRequires: pkgconfig(libxfcegui4-1.0) -BuildRequires: pkgconfig(libxfconf-0) BuildRequires: pkgconfig(sm) -Requires: %{name}-branding >= %{version} +Requires: %{name}-branding = %{version} Requires: xfce-utils +Requires: xfce4-settings +Requires: xfconf +Recommends: %{name}-doc = %{version} +Recommends: %{name}-lang = %{version} +# for xfce4-tips Recommends: fortune BuildRoot: %{_tmppath}/%{name}-%{version}-build %description xfce4-session is the session manager for the Xfce desktop environment. +%package -n %{libname} +Summary: Shared Library for xfce4-session Splash Screen Engines +Group: System/Libraries + +%description -n %{libname} +This package contains the shared library for xfce4-session splash screen +engines. + %package devel -Summary: Development files for xfce4-session +Summary: Development Files for xfce4-session Group: Development/Libraries/C and C++ Requires: %{name} = %{version} -Requires: pkgconfig(dbus-glib-1) -Requires: pkgconfig(libwnck-1.0) -Requires: pkgconfig(libxfce4ui-1) -Requires: pkgconfig(libxfce4util-1.0) -Requires: pkgconfig(libxfcegui4-1.0) -Requires: pkgconfig(libxfconf-0) %description devel -xfce4-session is the session manager for the Xfce desktop environment. +This package contains development files needed to develop custom splash screen +engines for the xfce4-session. -This package contains development files needed to develop custom splash themes. +%package doc +Summary: Documentation for xfce4-session +Group: Documentation/HTML +BuildArch: noarch + +%description doc +This package includes the documentation for xfce4-session. %package branding-upstream -Summary: Upstream branding of xfce4-session +Summary: Upstream Branding of xfce4-session Group: System/GUI/XFCE Supplements: packageand(%{name}:branding-upstream) Provides: %{name}-branding = %{version} @@ -88,11 +102,14 @@ BuildArch: noarch %description branding-upstream This package provides the upstream look and feel for the Xfce Session Manager. +%lang_package + %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build xdt-autogen @@ -101,34 +118,38 @@ xdt-autogen --disable-static \ --enable-session-screenshots \ --enable-gnome \ - --enable-libgnome-keyring \ - --enable-gen-doc + --enable-libgnome-keyring make %{?_smp_mflags} V=1 %install %make_install + %suse_update_desktop_file xfce-session-settings %suse_update_desktop_file xfce4-session-logout %suse_update_desktop_file xfce4-tips-autostart + rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,tl_PH,ur_PK} + %find_lang %{name} + rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/xfce4/session/splash-engines/*.la %clean rm -rf %{buildroot} +%post -n %{libname} -p /sbin/ldconfig + +%postun -n %{libname} -p /sbin/ldconfig + %post -%run_suseconfig -m gtk2 -/sbin/ldconfig %desktop_database_post %icon_theme_cache_post %postun -/sbin/ldconfig %desktop_database_postun %icon_theme_cache_postun -%files -f %{name}.lang +%files %defattr(-,root,root) %doc AUTHORS BUGS COPYING ChangeLog NEWS README TODO %{_bindir}/xfce4-session @@ -136,22 +157,32 @@ rm -rf %{buildroot} %{_bindir}/xfce4-session-settings %{_bindir}/xfce4-tips %{_libdir}/xfce4 -%{_libdir}/*.so.* -%{_mandir}/*/* %{_datadir}/themes/* -%{_datadir}/applications/* -%{_datadir}/icons/*/* +%{_datadir}/applications/*.desktop +%{_datadir}/icons/*/*/* %{_datadir}/xfce4/panel-plugins/xfsm-logout-plugin.desktop %{_datadir}/xfce4/tips/ +%doc %{_mandir}/man1/xfce4-session*.1* + +%files -n %{libname} +%defattr(-,root,root) +%doc COPYING +%{_libdir}/libxfsm-*.so.* + +%files doc +%defattr(-,root,root) %dir %{_datadir}/xfce4 %dir %{_datadir}/xfce4/xfce4-session %doc %{_datadir}/xfce4/xfce4-session/html/ +%files lang -f %{name}.lang + %files devel %defattr(-,root,root) -%{_includedir}/xfce4/*/ -%{_libdir}/pkgconfig/* -%{_libdir}/*.so +%dir %{_includedir}/xfce4 +%{_includedir}/xfce4/xfce4-session-*/ +%{_libdir}/pkgconfig/xfce4-session-*.pc +%{_libdir}/libxfsm-*.so %files branding-upstream %defattr(-,root,root) From 2d1ee65514cd7afcbb396fdf83460344e5bb4799b891adba9ac508416ded3bca Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Thu, 19 Apr 2012 08:43:00 +0000 Subject: [PATCH 2/3] - let -devel depend on libxfsm-4_6-0 rather than the main package OBS-URL: https://build.opensuse.org/package/show/X11:xfce/xfce4-session?expand=0&rev=90 --- xfce4-session.changes | 5 +++++ xfce4-session.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xfce4-session.changes b/xfce4-session.changes index ef79a72..0fc4596 100644 --- a/xfce4-session.changes +++ b/xfce4-session.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 19 08:43:03 UTC 2012 - gber@opensuse.org + +- let -devel depend on libxfsm-4_6-0 rather than the main package + ------------------------------------------------------------------- Fri Mar 30 14:03:39 UTC 2012 - gber@opensuse.org diff --git a/xfce4-session.spec b/xfce4-session.spec index 3e76f82..b6c8320 100644 --- a/xfce4-session.spec +++ b/xfce4-session.spec @@ -73,7 +73,7 @@ engines. %package devel Summary: Development Files for xfce4-session Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} +Requires: %{libname} = %{version} %description devel This package contains development files needed to develop custom splash screen From b3921b1a0e70be8438ed8804004802ad0df3c05c8c764acfd1d47e605305e29c Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Thu, 19 Apr 2012 13:01:43 +0000 Subject: [PATCH 3/3] - change license to GPL-2.0 (bnc#758033) - let -devel depend on libxfsm-4_6-0 rather than the main package OBS-URL: https://build.opensuse.org/package/show/X11:xfce/xfce4-session?expand=0&rev=91 --- xfce4-session.changes | 7 ++++++- xfce4-session.spec | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/xfce4-session.changes b/xfce4-session.changes index 0fc4596..971ec89 100644 --- a/xfce4-session.changes +++ b/xfce4-session.changes @@ -1,7 +1,12 @@ +------------------------------------------------------------------- +Thu Apr 19 12:59:20 UTC 2012 - gber@opensuse.org + +- change license to GPL-2.0 (bnc#758033) + ------------------------------------------------------------------- Thu Apr 19 08:43:03 UTC 2012 - gber@opensuse.org -- let -devel depend on libxfsm-4_6-0 rather than the main package +- let -devel depend on libxfsm-4_6-0 rather than the main package ------------------------------------------------------------------- Fri Mar 30 14:03:39 UTC 2012 - gber@opensuse.org diff --git a/xfce4-session.spec b/xfce4-session.spec index b6c8320..ca57803 100644 --- a/xfce4-session.spec +++ b/xfce4-session.spec @@ -22,7 +22,7 @@ Name: xfce4-session Version: 4.8.3 Release: 0 Summary: Xfce Session Manager -License: GPL-2.0+ +License: GPL-2.0 Group: System/GUI/XFCE Url: http://docs.xfce.org/xfce/xfce4-session/start Source: http://archive.xfce.org/src/xfce/xfce4-session/4.8/%{name}-%{version}.tar.bz2