Package gnome-globalmenu: Specfile

%define base_ver 0.7.9
%define git_version git20101126

# Needs X session
%def_disable tests

Name: gnome-globalmenu
Version: %base_ver
Release: alt5.%git_version
Summary: Global Menu for GNOME

Group: Graphical desktop/GNOME
License: %gpl2plus and %lgpl2plus

URL: http://code.google.com/p/gnome2-globalmenu/
Source: %name-%version.tar
Patch0: alt-xfce4-panel-48.patch

Packager: Alexey Rusakov <ktirf@altlinux.org>

BuildRequires(pre): rpm-build-licenses rpm-build-gnome

# From configure.ac
BuildPreReq: GConf2 libGConf-devel
BuildPreReq: intltool gettext-tools
BuildPreReq: vala >= 0.7.3
BuildPreReq: glib2-devel >= 2.10.0
BuildPreReq: libgtk+2-devel >= 2.10.0
BuildPreReq: libwnck-devel >= 2.16.0
BuildPreReq: libgnome-panel-devel >= 2.16.0
BuildPreReq: libgnome-menus-devel >= 2.16.0
BuildPreReq: libnotify-devel >= 0.4.0
BuildPreReq: libX11-devel >= 1.1.0
BuildPreReq: libxfce4panel-devel >= 4.8

%description
GNOME Global Menu is a centralized menu bar for all windows on a particular
screen/session. This package extends GTK and gnome panel so that Global
Menu can be enabled on all GTK applications.
This package contains shared data and libraries of various Global Menu 
packages. 
The Gtk Plugin Module of Global Menu adds global menu feature to any GTK 
applications on the fly without the need of modifying the source code.
gnome-applet-globalmenu or xfce-globalmenu-plugin should also be installed
depending on the desktop environment.

%package devel
Summary: Header files for writing Global Menu applets
Group: Development/GNOME and GTK+
Requires: gnome-globalmenu = %version-%release

%description devel
This package contains development files for writing Global Menu applets.

%package -n gnome-applets-extra-globalmenu
Summary: GNOME panel applet of Global Menu
Group: Graphical desktop/GNOME
Requires: gnome-panel
Requires: %name = %version-%release

%description -n gnome-applets-extra-globalmenu
The GNOME panel applet of Global Menu is a representation of Global Menu
with GTK widgets. The applet can be inserted to the default top panel to
provide access to the Global Menu of the applications.
The applet also provides limited window management functionality.
Please refer to %_docdir/%name-%version/README.GNOME
for post-installation configurations.

%package -n xfce4-globalmenu-plugin
Summary: XFCE panel applet of Global Menu
Group: Graphical desktop/GNOME
Requires: xfce4-panel
Requires: %name = %version-%release

%description -n xfce4-globalmenu-plugin
The XFCE panel applet of Global Menu is a representation of Global Menu
with GTK widgets. The applet can be inserted to the default top panel to
provide access to the Global Menu of the applications.
Please refer to %_docdir/%name-%version/README.XFCE
for post installation configuations.

%prep
%setup
%patch0 -p1
# Remove unneeded doc files copying
subst '/^doc_DATA/,/.*[^\\]$/d' Makefile.am

%build
# Someone's too inventive...
ACLOCAL="aclocal -I autotools" %autoreconf
%configure \
    --disable-schemas-install --disable-static \
    %{subst_enable tests} \
    --with-gnome-panel \
    --with-xfce4-panel \

%make_build

%install
%makeinstall_std
%find_lang %name

%if_enabled tests
%check
# Needs X session
%make check
%endif

%post
%gconf2_install %name

%preun
if [ $1 = 0 ]; then
    %gconf2_uninstall %name
fi

%files -f %name.lang
%_bindir/globalmenu-settings
%_libdir/libglobalmenu-server.so.*
%_libdir/gtk-2.0/modules/libglobalmenu-gnome-panel.so
%_libdir/gtk-2.0/modules/libglobalmenu-plugin.so
%gconf_schemasdir/%name.schemas
%_pixmapsdir/globalmenu.png
%_man1dir/%name.1*
%doc AUTHORS COPYING README*

%files devel
%_includedir/gnome-globalmenu
%_pkgconfigdir/globalmenu-server.pc
%_libdir/libglobalmenu-server.so

%files -n gnome-applets-extra-globalmenu
%bonobo_serversdir/GlobalMenu_PanelApplet.server
%_libexecdir/GlobalMenu.PanelApplet

%files -n xfce4-globalmenu-plugin
%_datadir/xfce4/panel/plugins/GlobalMenu_XFCEPlugin.desktop
%_libexecdir/xfce4/panel-plugins/GlobalMenu.XFCEPlugin
%_pixmapsdir/globalmenu-xfce.png

%exclude %_libdir/gtk-2.0/modules/*.la

%changelog
* Wed Feb 09 2011 Mikhail Efremov <sem@altlinux.org> 0.7.9-alt5.git20101126
- Fix build with xfce4-panel >= 4.8.

* Fri Nov 26 2010 Vitaly Kuznetsov <vitty@altlinux.ru> 0.7.9-alt4.git20101126
- upstream fixes to build with vala 0.11

* Wed May 19 2010 Vitaly Kuznetsov <vitty@altlinux.ru> 0.7.9-alt3.git20100520
- upstream fixes to build with new vala (instead of dirty hacks)

* Wed Apr 14 2010 Vitaly Kuznetsov <vitty@altlinux.ru> 0.7.9-alt2.git20100315
- dirty hacks to fix (ALT #23329), some functional regressions expected

* Mon Apr 05 2010 Vitaly Kuznetsov <vitty@altlinux.ru> 0.7.9-alt1.git20100315
- fix build with new vala

* Mon Mar 15 2010 Vitaly Kuznetsov <vitty@altlinux.ru> 0.7.9-alt0.git20100315
- 20090315 git snapshot

* Thu Oct 15 2009 Alexey Rusakov <ktirf@altlinux.org> 0.7.8-alt0.git20091008
- Use git snapshots for building.
- Fix crashes of various applications when gnome-globalmenu was enabled
  (ALT #21976).

* Tue Apr 28 2009 Alexey Rusakov <ktirf@altlinux.org> 0.7.5-alt1
- Thanks to Feng Yu <rainwoodman@gmail.com> for the original Fedora
  specfile and rpmcs utility for fixing the specfile up for ALT.
- Initial Sisyphus package.