On Fri, 2007-01-26 at 19:02 +0800, Chris Wang wrote: > # Copyright (c) 2005 Sun Microsystems, Inc.
It's 2007. > # > # Owner: chriswang This is not your opensolaris.org id, please make sure you use the one listed here: http://opensolaris.org/os/project/jds/observers/ > Summary: gDesklets > Source: http:/gdesklets.org/downloads/%name-%version.tar.bz2 > Patch1: gdesklets.diff The patch naming convention is gdesklets-01-what-the-patch-does.diff. > URL: http://www.gdesklets.org/ > BuildRoot: %{_tmppath}/%{name}-%{version}-build > %install > if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi; It's usually better not to do this in Linux spec files %use'd by Solaris spec files, because if you combine multiple packages, there may already be something in $RPM_BUILD_ROOT that needs to be there. > make DESTDIR=$RPM_BUILD_ROOT install \ > SITEPREFIX=/dummy VENDORPREFIX=/dummy PERLPREFIX=/dummy Is this for disabling perl bindings? If so, why? > %files > %defattr(-, root, root) > %{_bindir}/* > %{_libdir}/gdesklets/*%{_datadir}/locale/*/*/* missing \n > %{_datadir}/pixmaps/* > %{_datadir}/applications/* > %{_datadir}/icon/*/*/*/* > plain text document attachment (gdesklets-extra.spec) > # This file and all modifications and additions to the pristine > # package are under the same license as the package itself. > # > # Owner: chris wang again, use your opensolaris.org user id. > %install > > rm -rf $RPM_BUILD_ROOT Again, only do this in the Solaris spec file > %files > %defattr (-, root, bin) > %dir %attr (0755, root, sys) %{_datadir} > %dir %attr (0755, root, other) %{_datadir}/gdesklets Linux spec files use root:root owners for everything. > plain text document attachment (SUNWgnome-desklets.spec) > # # spec file for package SUNWgnome-desklets > # > # includes module(s): gdesklets > # > # Copyright (c) 2004 Sun Microsystems, Inc. 2007 > # This file and all modifications and additions to the pristine > # package are under the same license as the package itself. > # > # Owner: chris wang user id > %include Solaris.inc > > %use gdesklets = gdesklets.spec > > Name: SUNWgnome-desklets > Summary: GNOME desklets hmm... ideally the Summary should be more descriptive than the package name. (; > Version: %{default_pkg_version} > SUNW_BaseDir: %{_basedir} > BuildRoot: %{_tmppath}/%{name}-%{version}-build > %include default-depend.inc > Requires: SUNWPython > Requires: SUNWgnome-libs > Requires: SUNWlibrsvg Doesn't it need SUNWgnome-python-desktop or SUNWgnome-python-libs? Just checking... > %build > export PKG_CONFIG_PATH=%{_pkg_config_path} > export ACLOCAL_FLAGS="-I %{_datadir}/aclocal" This is probably not needed. > export CFLAGS="%optflags -DHAVE_ALLOCA_H" If you need to set -DHAVE_ALLOCA_H it's probably a bug in the module's configure script. > %install This is where you need rm -rf $RPM_BUILD_ROOT > %gdesklets.install -d %name-%version > #make install DESTDIR=$RPM_BUILD_ROOT delete the commented line? > plain text document attachment (SUNWgnome-desklets-extra.spec) > # > # spec file for package SUNWgnome-desklets-extra > # > # > # Copyright (c) 2006 Sun Microsystems, Inc. 2007 > # This file and all modifications and additions to the pristine > # package are under the same license as the package itself. > # > # Owner: chris wang user id > %include Solaris.inc > %use gdesklets = gdesklets-extra.spec > > Name: SUNWgnome-desklets-extra > Summary: GNOME desklets extra package summary > #%prep > #rm -rf %name-%version > #mkdir %name-%version > #%gdesklets.prep -d %name-%version > > #%gdesklets.setup -d %name-%version delete the commented lines? > %build > # we just get the bits tarball from developer > %gdesklets.build -d %name-%version > > %install > %gdesklets.install -d %name-%version > > %clean > rm -rf $RPM_BUILD_ROOT > > %post > ( echo 'test -x /usr/bin/update-desktop-database || exit 0'; > echo '/usr/bin/update-desktop-database' > ) | $BASEDIR/lib/postrun -b -u -c JDS_wait > ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0'; > echo '/usr/bin/scrollkeeper-update' > ) | $BASEDIR/lib/postrun -b -u -c JDS You probably need a %postun that too. > %files > %defattr (-, root, bin) > %dir %attr (0755, root, sys) %{_datadir} > %dir %attr (0755, root, other) %{_datadir}/gdesklets Why root:other? Make it root:bin please. > plain text document attachment (gdesklets-01-Solaris.diff) > diff -Nrup gDesklets-0.35.3/autogen.sh ../gDesklets-0.35.3/autogen.sh > --- gDesklets-0.35.3/autogen.sh 2005-01-08 20:13:42.000000000 +0800 > +++ ../gDesklets-0.35.3/autogen.sh 2006-12-18 16:01:14.923916000 +0800 > @@ -5,7 +5,7 @@ srcdir=`dirname $0` > test -z "$srcdir" && srcdir=. > > PKG_NAME="gDesklets" > -ACLOCAL_FLAGS="-I macros $ACLOCAL_FLAGS" > +#ACLOCAL_FLAGS="-I macros $ACLOCAL_FLAGS" Why is this needed? Normally, we don't run autogen.sh, btw, but execute the autotools commands directly, i.e. something like aclocal $ACLOCAL_FLAGS autoheader autoconf automake ... Alan already commented on the interfaces (or non-interfaces) used in the patch. Laca
