gnome-menus.spec
author dermotm
Mon, 24 Jul 2006 12:30:39 +0000
branchgnome-2-10
changeset 19949 94f49bf19351
parent 19719 d184ca39d269
permissions -rw-r--r--
access control test #4

#
# spec file for package gnome-menus
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
Name:			gnome-menus
License:		LGPL
Group:			System/GUI/GNOME
Version:		2.10.1
Release:		2
Distribution:		Java Desktop System
Vendor:			Sun Microsystems, Inc.
Summary:		Implementation of Desktop Menu Specification for GNOME
Source:			http://ftp.gnome.org/pub/GNOME/sources/%{name}/2.10/%{name}-%{version}.tar.bz2
Patch1:                 gnome-menus-01-uninstalled_pc.diff
URL:			http://www.gnome.org
BuildRoot:		%{_tmppath}/%{name}-%{version}-build
Docdir:			%{_defaultdocdir}/%{name}
Autoreqprov:		on
Prereq:                 /sbin/ldconfig
Prereq:                 GConf

%define gnome_vfs_version 2.8.2

BuildRequires: gnome-vfs >= %{gnome_common_version}
BuildRequires: intltool

%description
This package implements the freedesktop.org desktop menu specification for the GNOME
desktop. Also contained in this package, are the menu layout configuration files, .directory
and assorted menu utility programs.

%package devel
Summary:      Implementation of Desktop Menu Specification for GNOME
Group:        System/Libraries/GNOME
Autoreqprov:  on
Requires:     %name = %version
Requires:     gnome-vfs-devel >= %{gnome_vfs_version}

%description devel
This package implements the freedesktop.org desktop menu specification for the GNOME
desktop. Also contained in this package, are the menu layout configuration files, .directory
and assorted menu utility programs.

%prep
%setup -q
%patch1 -p1 


%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

aclocal $ACLOCAL_FLAGS
automake -a -c -f
autoconf
./configure --prefix=%{_prefix}			\
	    --sysconfdir=%{_sysconfdir}		\
            --mandir=%{_mandir}
make -j $CPUS

%install
make DESTDIR=$RPM_BUILD_ROOT install
rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm $RPM_BUILD_ROOT%{_libdir}/*.la
# FIXME: Giga-hack part 1 of 2 follows...
# file /etc/xdg/menus/applications.menu conflicts with desktop-data-SLES
# Only on SuSE Linux !!
%ifos linux
mv $RPM_BUILD_ROOT%{_sysconfdir}/xdg/menus/applications.menu \
   $RPM_BUILD_ROOT%{_sysconfdir}/xdg/menus/applications.menu.new
%endif

%post
/sbin/ldconfig
# FIXME: Giga-hack part 2 of 2 follows...
# file /etc/xdg/menus/applications.menu conflicts with desktop-data-SLES
MENU=/etc/xdg/menus/applications.menu
cp $MENU $MENU.SuSE
cp $MENU.new $MENU

%postun
/sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/libgnome-menu.so.*
%{_datadir}/desktop-directories/*
%config %{_sysconfdir}/xdg/menus/*
%{_datadir}/locale/*/LC_MESSAGES/*.mo

%files devel
%defattr(-, root, root)
%{_libdir}/pkgconfig/*
%{_libdir}/libgnome-menu.so
%{_includedir}/gnome-menus/*

%changelog
* Fri May 13 2005 - [email protected]
- Add unisntalled-pc files since they are needed on Solaris to build.

* Tue May 10 2005 - [email protected] 
- Initial spec file for gnome-menus