From c139fd7e1d61fdcc96d0c641ab005e871178ee155143e3c9e5502fd50c1c31f7 Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Sat, 31 Mar 2012 09:35:11 +0000 Subject: [PATCH 1/2] - split off libxfce4ui-1-0 subpackage in order to conform to the shared library packaging policy - specfile cleanup - added libxfce4ui-fix-shortcut-handling.patch which normalizes string representation of keyboard shortcuts before comparing them in the libxfce4kbd-private shortcut matching code OBS-URL: https://build.opensuse.org/package/show/X11:xfce/libxfce4ui?expand=0&rev=30 --- libxfce4ui-fix-shortcut-handling.patch | 30 +++++++++ libxfce4ui.changes | 10 +++ libxfce4ui.spec | 89 ++++++++++++++++++-------- 3 files changed, 101 insertions(+), 28 deletions(-) create mode 100644 libxfce4ui-fix-shortcut-handling.patch diff --git a/libxfce4ui-fix-shortcut-handling.patch b/libxfce4ui-fix-shortcut-handling.patch new file mode 100644 index 0000000..890f3e8 --- /dev/null +++ b/libxfce4ui-fix-shortcut-handling.patch @@ -0,0 +1,30 @@ +--- libxfce4ui-4.8.0/libxfce4kbd-private/xfce-shortcuts-grabber.c 2011-01-16 10:01:09.000000000 -0500 ++++ hacked/libxfce4kbd-private/xfce-shortcuts-grabber.c 2011-12-18 00:29:58.343552611 -0500 +@@ -560,6 +560,9 @@ + { + gchar *name; + gboolean result = FALSE; ++ guint keycode; ++ guint modifiers; ++ gchar *shortcut2; + + g_return_val_if_fail (context != NULL, TRUE); + g_return_val_if_fail (context->xevent != NULL, TRUE); +@@ -569,13 +572,16 @@ + name = xfce_shortcuts_grabber_shortcut_name (context->grabber, context->xevent->keycode, + context->xevent->state); + +- if (G_UNLIKELY (g_str_equal (shortcut, name))) ++ xfce_shortcuts_grabber_parse_shortcut (context->grabber, shortcut, &keycode, &modifiers); ++ shortcut2 = xfce_shortcuts_grabber_shortcut_name (context->grabber, keycode, modifiers); ++ if (G_UNLIKELY (g_str_equal (shortcut2, name))) + { + context->result = shortcut; + result = TRUE; + } + + g_free (name); ++ g_free (shortcut2); + + gdk_flush (); + gdk_error_trap_pop (); diff --git a/libxfce4ui.changes b/libxfce4ui.changes index 1b7923d..8b32801 100644 --- a/libxfce4ui.changes +++ b/libxfce4ui.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sat Mar 24 18:02:52 UTC 2012 - gber@opensuse.org + +- split off libxfce4ui-1-0 subpackage in order to conform to the + shared library packaging policy +- specfile cleanup +- added libxfce4ui-fix-shortcut-handling.patch which normalizes + string representation of keyboard shortcuts before comparing them + in the libxfce4kbd-private shortcut matching code + ------------------------------------------------------------------- Fri Dec 23 19:44:01 UTC 2011 - gber@opensuse.org diff --git a/libxfce4ui.spec b/libxfce4ui.spec index abec51c..b326b83 100644 --- a/libxfce4ui.spec +++ b/libxfce4ui.spec @@ -1,7 +1,7 @@ # # spec file for package libxfce4ui # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,34 +15,53 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + +%define libname libxfce4ui-1-0 + Name: libxfce4ui Version: 4.8.1 Release: 0 Summary: Widgets Library for the Xfce Desktop Environment License: LGPL-2.1+ Group: System/Libraries -Url: http://www.xfce.org/projects/libxfce4/ -Source0: %{name}-%{version}.tar.bz2 +Url: http://www.xfce.org/ +Source0: http://archive.xfce.org/src/xfce/libxfce4ui/4.8/%{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM libxfce4ui-fix-shortcut-handling.patch rh#768704 gber@opensuse.org -- Normalizes string representation of keyboard shortcuts before comparing them in the libxfce4kbd-private shortcut matching code +Patch0: libxfce4ui-fix-shortcut-handling.patch BuildRequires: gtk-doc BuildRequires: intltool BuildRequires: pkgconfig(gladeui-1.0) -BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(libstartup-notification-1.0) BuildRequires: pkgconfig(libxfce4util-1.0) BuildRequires: pkgconfig(libxfconf-0) -Requires: %{name}-branding >= %{version} +BuildRequires: pkgconfig(sm) BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The libxfce4ui library provides a number of widgets commonly used by Xfce applications. +%package -n %{libname} +Summary: Widgets Library for the Xfce Desktop Environment +License: LGPL-2.1+ +Group: System/Libraries +# -branding is not really a dependency but it must be dragged in at a low level +Requires: %{name}-branding >= %{version} +Provides: %{name} = %{version} +Obsoletes: %{name} <= 4.8.1 +Recommends: %{name}-lang = %{version} + +%description -n %{libname} +The libxfce4ui library provides a number of widgets commonly used by Xfce +applications. + %package -n glade3-catalog-libxfce4ui -Summary: libxfce4ui Glade Catalog +Summary: Glade Catalog for libxfce4ui License: LGPL-2.1+ Group: Development/Tools/GUI Builders -Requires: %{name} = %{version} +Requires: %{libname} = %{version} Requires: glade3 Supplements: packageand(glade3:%{name}-devel) @@ -54,13 +73,7 @@ Xfce widgets in Glade. Summary: Development Files for the libxfce4ui Library License: LGPL-2.1+ Group: Development/Libraries/C and C++ -Requires: libxfce4ui = %{version} -Requires: pkgconfig(gladeui-1.0) -Requires: pkgconfig(glib-2.0) -Requires: pkgconfig(gtk+-2.0) -Requires: pkgconfig(libstartup-notification-1.0) -Requires: pkgconfig(libxfce4util-1.0) -Requires: pkgconfig(libxfconf-0) +Requires: %{libname} = %{version} Recommends: %{name}-doc = %{version} %description devel @@ -71,7 +84,7 @@ the libxfce4ui library. Summary: Documentation for the libxfce4ui Library License: LGPL-2.1+ Group: Documentation/HTML -Requires: libxfce4ui = %{version} +BuildArch: noarch %description doc This package provides the documentation for the libxfce4ui library. @@ -84,14 +97,28 @@ Group: System/GUI/XFCE # BRAND: for the Xfce desktop. Conflicts: otherproviders(%{name}-branding) Provides: %{name}-branding = %{version} -Supplements: packageand(%{name}:branding-upstream) +Supplements: packageand(%{libname}:branding-upstream) BuildArch: noarch %description branding-upstream -This package provides the upstream look and feel for the libxfce4ui library. +This package provides the upstream look and feel for libxfce4ui. + +# this should be replaced by %%lang_package once bnc#513786 is resolved +%package lang +Summary: Languages for package %{name} +License: LGPL-2.1+ +Group: System/Localization +Requires: %{libname} = %{version} +Provides: %{name}-lang-all = %{version} +Supplements: packageand(bundle-lang-other:%{libname}) +BuildArch: noarch + +%description lang +Provides translations to the package %{name} %prep %setup -q +%patch0 -p1 %build export CFLAGS="%{optflags} -fno-strict-aliasing" @@ -103,26 +130,30 @@ make %{?_smp_mflags} V=1 %install %make_install + rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/libglade/2.0/*.la rm -f %{buildroot}%{_libdir}/glade3/modules/*.la + +# remove unsupported locales rm -rf %{buildroot}%{_datadir}/locale/{ast,kk,tl_PH,ur_PK} -%find_lang %{name} + +%find_lang %{name} %{?no_lang_C} %clean rm -rf %{buildroot} -%post -p /sbin/ldconfig +%post -n %{libname} -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig -%files -f %{name}.lang +%files -n %{libname} %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO -%dir %{_sysconfdir}/xdg/xfce4 -%dir %{_sysconfdir}/xdg/xfce4/xfconf -%dir %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml -%{_libdir}/lib*.so.* +%{_libdir}/libxfce4ui-*.so.* +%{_libdir}/libxfce4kbd-private-*.so.* + +%files lang -f %{name}.lang %files -n glade3-catalog-libxfce4ui %defattr(-, root, root) @@ -132,8 +163,10 @@ rm -rf %{buildroot} %files devel %defattr(-, root, root) -%{_libdir}/lib*.so -%{_libdir}/pkgconfig/*.pc +%{_libdir}/libxfce4ui-*.so +%{_libdir}/libxfce4kbd-private-*.so +%{_libdir}/pkgconfig/libxfce4ui-*.pc +%{_libdir}/pkgconfig/libxfce4kbd-private-*.pc %dir %{_includedir}/xfce4/libxfce4ui-1 %{_includedir}/xfce4/libxfce4ui-1/libxfce4ui/ %dir %{_includedir}/xfce4/libxfce4kbd-private-2 @@ -141,7 +174,7 @@ rm -rf %{buildroot} %files doc %defattr(-, root, root) -%{_datadir}/gtk-doc/html/libxfce4ui/ +%doc %{_datadir}/gtk-doc/html/libxfce4ui/ %files branding-upstream %defattr(-, root, root) From b792131ce1a8e7f23571a1c75e0c12c93e2c257871bf5fdc7cc115489befd437 Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Sat, 31 Mar 2012 16:54:34 +0000 Subject: [PATCH 2/2] - recommending the branding package is enough OBS-URL: https://build.opensuse.org/package/show/X11:xfce/libxfce4ui?expand=0&rev=31 --- libxfce4ui.changes | 5 +++++ libxfce4ui.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libxfce4ui.changes b/libxfce4ui.changes index 8b32801..9470d3d 100644 --- a/libxfce4ui.changes +++ b/libxfce4ui.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 31 16:54:23 UTC 2012 - gber@opensuse.org + +- recommending the branding package is enough + ------------------------------------------------------------------- Sat Mar 24 18:02:52 UTC 2012 - gber@opensuse.org diff --git a/libxfce4ui.spec b/libxfce4ui.spec index b326b83..9779409 100644 --- a/libxfce4ui.spec +++ b/libxfce4ui.spec @@ -48,7 +48,7 @@ Summary: Widgets Library for the Xfce Desktop Environment License: LGPL-2.1+ Group: System/Libraries # -branding is not really a dependency but it must be dragged in at a low level -Requires: %{name}-branding >= %{version} +Recommends: %{name}-branding = %{version} Provides: %{name} = %{version} Obsoletes: %{name} <= 4.8.1 Recommends: %{name}-lang = %{version}