From 0d4642709007241d8c17c42005873905571a07bee6a085ff5bb555c65efb1f28 Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Sat, 31 Mar 2012 10:19:07 +0000 Subject: [PATCH] - 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)