Home | History | Annotate | Download | only in gnome-2-16
      1 #
      2 # spec file for package gnome-menu-editor
      3 #
      4 # Copyright (c) 2005 Sun Microsystems, Inc.
      5 # This file and all modifications and additions to the pristine
      6 # package are under the same license as the package itself.
      7 #
      8 # Owner: harrylu
      9 #
     10 %define python_version 2.4
     11 
     12 Name:         alacarte
     13 Version:      0.10.1
     14 Release:      1
     15 Summary:      Simple menu editor for GNOME
     16 
     17 Group:        System/GUI/GNOME
     18 License:      GPL
     19 URL:          http://www.realistanew.com/projects/alacarte/
     20 Distribution: java-desktop-system
     21 Vendor:       Sun Microsystems, Inc.
     22 Source:       http://ftp.gnome.org/pub/GNOME/sources/alacarte/0.10/alacarte-%{version}.tar.bz2
     23 # date:2006-08-23 bugster:6460249 owner:harrylu type:feature
     24 Patch1:       alacarte-01-force-reload.diff
     25 #date:2006-11-15 owner:calumb bugster:6489289 bugzilla:375629 type:bug
     26 Patch2:	      alacarte-02-launch-menu-item.diff
     27 
     28 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
     29 
     30 BuildRequires:  pygtk2.0-devel
     31 BuildRequires: 	desktop-file-utils
     32 BuildRequires:  gnome-menus-devel >= 2.15.4.1
     33 BuildRequires:  perl-XML-Parser
     34 Requires: 	pygtk2.0, gnome-python-gconf, gnome-python
     35 Requires: 	python-gnome-menus
     36 Obsoletes:      smeg
     37 Provides:       smeg %{version}-%{release}
     38 
     39 %description
     40 Alacarte is a menu editor for GNOME that lets you get things done,
     41 simply and quickly.
     42 
     43 Just click and type to edit, add, and delete any menu entry.
     44 
     45 %prep
     46 %setup -q
     47 %patch1 -p0
     48 %patch2 -p1
     49 
     50 %build
     51 %ifos linux
     52 if [ -x /usr/bin/getconf ]; then
     53   CPUS=`getconf _NPROCESSORS_ONLN`
     54 fi
     55 %else
     56   CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     57 %endif
     58 if test "x$CPUS" = "x" -o $CPUS = 0; then
     59   CPUS=1
     60 fi
     61 
     62 glib-gettextize -f
     63 libtoolize --copy --force
     64 aclocal $ACLOCAL_FLAGS
     65 automake -a -c -f 
     66 autoconf
     67 
     68 ./configure --prefix=%{_prefix} --mandir=%{_mandir} \
     69             --libdir=%{_libdir}              \
     70             --libexecdir=%{_libexecdir}      \
     71             --sysconfdir=%{_sysconfdir}
     72 make -j $CPUS \
     73     pyexecdir=%{_libdir}/python%{python_version}/vendor-packages \
     74     pythondir=%{_libdir}/python%{python_version}/vendor-packages
     75 
     76 %install
     77 rm -rf $RPM_BUILD_ROOT
     78 make DESTDIR=$RPM_BUILD_ROOT install \
     79     pyexecdir=%{_libdir}/python%{python_version}/vendor-packages \
     80     pythondir=%{_libdir}/python%{python_version}/vendor-packages
     81 find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
     82 find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
     83 find $RPM_BUILD_ROOT -type f -name "*.pyo" -exec rm -f {} ';'
     84 find $RPM_BUILD_ROOT -type f -name "*.pyc" -exec rm -f {} ';'
     85 
     86 %post
     87 %update_menus
     88 %update_icon_cache hicolor
     89 
     90 %postun
     91 %clean_menus
     92 %clean_icon_cache hicolor
     93 
     94 %clean
     95 rm -rf $RPM_BUILD_ROOT
     96 
     97 %files -f %{name}.lang
     98 %defattr (-, root, root)
     99 %doc README AUTHORS COPYING
    100 %{_libdir}/python?.?/vendor-packages/*
    101 %{_bindir}/*
    102 %{_datadir}/applications/*
    103 %{_datadir}/%name/*
    104 %{_datadir}/icons/*
    105 %{_libdir}/menu/%{name}
    106 
    107 %changelog
    108 * Fri Nov 17 2006 - damien.carbery@sun.com
    109 - Change patch2 to use p1.
    110 * Wed Nov 15 2006 - calum.benson@sun.com
    111   Change menu item to match latest UI spec.
    112 * Tue Oct 03 2006 - damien.carbery@sun.com
    113 - Bump to 0.10.0.
    114 * Mon Sep 04 2006 - damien.carbery@sun.com
    115 - Bump to 0.10.0.
    116 * Thu Aug 24 2006 - laca@sun.com
    117 - remove autoheader call since there is AC_CONFIG_HEADER in configure.in
    118 * Tue Aug 22 2006 - halton.huo@sun.com
    119 - Divide SFEgnome-menu-editor.spec into alacarte.spec
    120   and SUNWgnome-menu-editor.spec
    121 * Wed Aug 16 2006 - harry.lu@sun.com
    122 - bump up to 0.9.90 and add patch alacarte-01-force-reload.diff to make
    123   it work on solaris.
    124 * Wed Jul  5 2006 - laca@sun.com
    125 - rename to gnome-menu-editor
    126 - delete share subpkg
    127 * Fri Apr 21 2006 - glynn.foster@sun.com
    128 - Initial spec file
    129