Hi,

On Thu, 2006-04-20 at 17:00 +0100, Calum Benson wrote:
> Wonder if we should pull this into Vermillion to replace
> gmenu-simple-editor too?  It would probably be relatively easy (for
> anyone who knows Python, at least) to patch it to make the quickstart
> part of our Launch menu editable... which is a function we badly need,
> and isn't really an option with gmenu-simple-editor.

Attached is a spec file for it, currently in jds-spec-files-extra. It
needs a patch to gnome-menus.spec in SUNWgnome-panel, also attached.
Please note, it currently crashes and burns for me - I don't know enough
Python to be able to debug what's going on yet though.


Glynn
-------------- next part --------------
#
# spec file for package SUNWgnome-menu-editor.spec
#
# includes module(s): alacarte
#
# Copyright (c) 2004 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%include Solaris.inc
%define python_version 2.4

Name:                    SUNWgnome-menu-editor
Summary:                 GNOME menu editor
Version:                 0.9
Source:                  
http://dev.realistanew.com/alacarte/releases/0.9/alacarte-0.9.tar.gz
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-python-libs-devel
BuildRequires: CBEbison
BuildRequires: SUNWPython
Requires: SUNWgnome-libs
Requires: SUNWgnome-python-libs

%package share
Summary:                 GNOME menu editor - platform independent files, 
/usr/share
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc

%prep
%setup -q -n alacarte-%version

%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
    CPUS=1
fi
export CFLAGS="%optflags -I/usr/sfw/include -DANSICPP"
export RPM_OPT_FLAGS="$CFLAGS"
export PYTHON="/usr/bin/python"
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
export PERL5LIB=%{_prefix}/perl5/site_perl/5.6.1/sun4-solaris-64int
export CPPFLAGS="-I/usr/xpg4/include -I/usr/include/python2.4"
export LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib"
export MSGFMT="/usr/bin/msgfmt"

glib-gettextize -f
libtoolize --copy --force
aclocal $ACLOCAL_FLAGS
autoheader
automake -a -c -f 
autoconf

./configure --prefix=%{_prefix} --mandir=%{_mandir} \
            --libdir=%{_libdir}              \
            --libexecdir=%{_libexecdir}      \
            --sysconfdir=%{_sysconfdir}
make -j $CPUS \
    pyexecdir=%{_libdir}/python%{python_version}/vendor-packages \
    pythondir=%{_libdir}/python%{python_version}/vendor-packages

%install
make DESTDIR=$RPM_BUILD_ROOT install \
    pyexecdir=%{_libdir}/python%{python_version}/vendor-packages \
    pythondir=%{_libdir}/python%{python_version}/vendor-packages
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.pyo" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.pyc" -exec rm -f {} ';'

%clean
rm -rf $RPM_BUILD_ROOT

%post share
( echo 'test -x /usr/bin/gtk-update-icon-cache || exit 0';
  echo 'ls -d %{_datadir}/icons/* | xargs -l1 /usr/bin/gtk-update-icon-cache'
) | $PKG_INSTALL_ROOT/usr/lib/postrun -b -u -t 15

%files
%defattr(-, root, bin)
%{_bindir}/
%attr (-, root, bin) %{_libdir}/python*

%files share
%defattr (-, root, other)
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/applications
%{_datadir}/icons
%{_datadir}/alacarte

%changelog
* Fri Apr 21 2006 - glynn.foster at sun.com
- Initial spec file

Reply via email to