Hi Ghee,

Some comments below.

On Mon, 2008-02-18 at 17:51 +0000, Ghee Teo wrote:

> #URL:                     http://cairographics.org/cairomm/
> #Source:                  
> http://cairographics.org/releases/cairomm-%{version}.tar.gz

You can delete these.

> SUNW_BaseDir:            %{_basedir}
> BuildRoot:               %{_tmppath}/%{name}-%{version}-build
> %include default-depend.inc
> Requires: SUNWgnome-base-libs
> BuildRequires: SUNWgnome-base-libs-devel
> Requires: SUNWsigcpp
> BuildRequires: SUNWsigcpp-devel
> 
> %package devel
> Summary:                 %{summary} - development files
> SUNW_BaseDir:            %{_basedir}
> %include default-depend.inc
> Requires: %name
> Requires: SUNWgnome-base-libs-devel

Should probably require SUNWsigcpp-devel.

> %prep
> rm -rf %name-%version
> mkdir %name-%version
> %cairomm.prep -d %name-%version

> cd %{_builddir}/%name-%version

This isn't needed.

> %if %cc_is_gcc
> %else
> export CXX="${CXX} -norunpath"
> %endif
> export CXXFLAGS="%cxx_optflags"
> export PERL_PATH=/usr/perl5/bin/perl
> %cairomm.build -d %name-%version

> %clean
> #rm -rf $RPM_BUILD_ROOT

uncomment please.

> 
> 
> 
> 
> 
> 
> rpm spec file
> attachment
> (cairomm.spec)
> 
> #
> # spec file for package cairomm 
> #
> # Copyright 2008 Sun Microsystems, Inc.
> # This file and all modifications and additions to the pristine
> # package are under the same license as the package itself.
> #
> # Owner: gheet
> #
> Name:                    cairomm
> License:                 LGPL
> Group:                   System/Libraries
> Version:                 1.4.6
> Release:                 1
> Distribution:            Java Desktop System
> Vendor:                  Sun Microsystems, Inc.
> Summary:                 cairomm - C++ API for the Cairo Graphics
> Library
> URL:                     http://cairographics.org/cairomm/
> Source:
> http://cairographics.org/releases/cairomm-%{version}.tar.gz

> SUNW_BaseDir:            %{_basedir}

Don't need this in the base spec.

> BuildRoot:               %{_tmppath}/%{name}-%{version}-build

> %include default-depend.inc
> Requires: SUNWgnome-base-libs
> BuildRequires: SUNWgnome-base-libs-devel
> Requires: SUNWsigcpp
> BuildRequires: SUNWsigcpp-devel

Nor these.
You can add Requires: cairo for completeness, but it's not really
used in the build.

> %package devel
> Summary:                 %{summary} - development files

> SUNW_BaseDir:            %{_basedir}
> %include default-depend.inc
> Requires: %name
> Requires: SUNWgnome-base-libs-devel

Same comments as above.

> %prep
> %setup -q -n cairomm-%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


> %if %cc_is_gcc
> %else
> export CXX="${CXX} -norunpath"
> %endif
> export CXXFLAGS="%cxx_optflags"
> export PERL_PATH=/usr/perl5/bin/perl

These are already set in the SUNW spec file.


> ./configure --prefix=%{_prefix} --mandir=%{_mandir} \
>             --libdir=%{_libdir}              \
>             --libexecdir=%{_libexecdir}      \
>             --sysconfdir=%{_sysconfdir}         \
>             --disable-python            \
>             --disable-docs
> make -j$CPUS 
> 
> %install
> rm -rf $RPM_BUILD_ROOT

don't rm -rf in %install in the base spec file, it causes problems
in aggregate packages.

Thanks,
Laca



Reply via email to