[desktop-discuss] Re: Simple spec file creation (spec-files-extra)
Damien Carbery
damien.carbery at sun.com
Wed May 31 07:00:45 PDT 2006
I suppose we should publish a few templates e.g. a basic one, a meta one (with multiple sub modules e.g. SUNWgnome-base-libs.spec) and one with pre/post install or class action scripts.
Here's a stab at a basic one, based on one that I happened to be using for testing the other day.
#
# A possible template spec file.
#
%include Solaris.inc
Name: SUNWname
Summary: A summary
Version: 1.0
Source: http://www.somewhere.com/download/name-%{version}.tar.bz2
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
%prep
%setup -q -n %name-%version
%build
# Determine how many CPUs on the system.
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir}
make -j$CPUS # Tell make to use $CPUS threads.
%install
make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, other)
# This is the hard part...
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%changelog
This message posted from opensolaris.org
More information about the desktop-discuss
mailing list