On Fri, 2008-07-11 at 17:14 +0800, jerry tan wrote:
> plain text document attachment (cdrdao.spec)
> #
> # spec file for package cdrdao
> #
> # 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:jerrytan
> #
> 
> Name:                 cdrdao
> License:              BSD
> Group:                        Applications/Internet
> Version:              1.2.1
> Distribution:         Java Desktop System
> Vendor:                       Sun Microsystems, Inc.
> Summary:              records audio or data CD-Rs in disk-at-once (DAO) mode 
> based on a textual description of the CD contents
> Source:                 
> http://dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
> #owner:jerrytan date:2008-07-07 type:branding
> Patch1:                 cdrdao-1-lvolmgt.diff
Normally, we use 01 instead of 1.
> URL:                  http://cdrdao.sourceforge.net/
> BuildRoot:            %{_tmppath}/%{name}-%{version}-build
> Docdir:                       %{_defaultdocdir}/doc
> Autoreqprov:          on
> 
> 
> 
> %description
> Cdrdao records audio or data CD-Rs in disk-at-once (DAO) mode based on a 
> textual description of the CD contents
> 
> %prep
> %setup -q
> %patch1 -p1
> 
> %build
> %ifos linux
> if [ -x /usr/bin/getconf ]; then
>   CPUS=`getconf _NPROCESSORS_ONLN`
> fi
> %else
>   CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
> %endif
> if test "x$CPUS" = "x" -o $CPUS = 0; then
>   CPUS=1
> fi
> 
> aclocal $ACLOCAL_FLAGS
> autoheader
> automake -a -f -c 
> autoconf
> 
> 
> CFLAGS="$RPM_OPT_FLAGS"
> ./configure --prefix=%{_prefix}         \
>             --mandir=%{_mandir}         \
>             --libdir=%{_libdir}         \
>             --libexecdir=%{_libexecdir} \
>             --sysconfdir=%{_sysconfdir} 
> 
> 
> make -j $CPUS
> 
> %install
> make install DESTDIR=$RPM_BUILD_ROOT
> find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
> find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
> 
> %clean
> rm -rf $RPM_BUILD_ROOT
> 
> 
> %files
> %defattr(-, root, root)
> %doc Bonus ChangeLog NEWS README TODO doc doc-jp
> %{_bindir}/*
> %{_mandir}/man1/*
> /usr/share/cdrdao/*
> 
> %changelog
> * Fri Jul 11 2008 - jerry.tan at sun.com
> - Created Spec for cdrdao
> plain text document attachment (SUNWcdrdao.spec)
> #
> # spec file for package SUNWcdrdao
> #
> # includes module(s): cdrdao
> #
> # 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: jerrytan
> #
> 
> %include Solaris.inc
> 
> %use cdrdao= cdrdao.spec
> 
> Name:                    SUNWcdrdao
> Summary:                 cdrdao- records audio or data CD-Rs in disk-at-once 
> (DAO) mode based on a textual description of the CD contents 
> Version:                 %{cdrdao.version}
> SUNW_Copyright:          %{name}.copyright
> SUNW_BaseDir:            %{_basedir}
> BuildRoot:               %{_tmppath}/%{name}-%{version}-build
> %include default-depend.inc
> 
> %package devel
> Summary:                 %{summary} - development files
> SUNW_BaseDir:            %{_basedir}
> %include default-depend.inc
> Requires: %name
> 
> 
> %prep
> rm -rf %name-%version
> mkdir -p %name-%version
> %cdrdao.prep -d %name-%version
> 
> %build
> export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
> export CFLAGS="%optflags"
> export RPM_OPT_FLAGS="$CFLAGS"
> export LDFLAGS="%_ldflags"
> 
> %cdrdao.build -d %name-%version
> 
> %install
> rm -rf $RPM_BUILD_ROOT
> %cdrdao.install -d %name-%version
> 
> 
> %clean
> rm -rf $RPM_BUILD_ROOT
> 
> %files
> %defattr(-, root, root)
> %doc Bonus ChangeLog NEWS README TODO doc doc-jp
Never seen %doc part in SUNW spec. 

> %{_bindir}/*
> %{_mandir}/man1/*
> /usr/share/cdrdao/*
???Should use %{_datadir} here. Like:
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/cdrdao

-Halton.
> 
> 
> %changelog
> * Fri Jul 11 2008 - jerry.tan at sun.com
> - Created Spec for cdrdao
> 


Reply via email to