On Tue, 2008-06-17 at 18:20 +1200, Laszlo (Laca) Peter wrote:
> Hi Jeff,
> 
> > 
> > #
> > # spec file for package SUNWlibtasn1
> > #
> > # includes module(s): libtasn1
> > #
> > # Owner:jefftsai
> > %include Solaris.inc
> > 
> > %ifarch amd64 sparcv9
> > %include arch64.inc
> > %use libtasn164 = libtasn1.spec
> > %endif
> > 
> > %include base.inc
> > %use libtasn1 = libtasn1.spec
> > 
> > Name:                SUNWlibtasn1
> > Summary:             Tiny ASN.1 library
> > Version:             %{default_pkg_version}
> 
> When the package only contains one community module, please
> use the community versions, not default_pkg_version
> (this would make the package follow the GNOME version, which
> is clearly wrong since this package is not part of GNOME.
> 
> > SUNW_BaseDir:        %{_prefix}
> > SUNW_Copyright:      %{name}.copyright
> > BuildRoot:           %{_tmppath}/%{name}-%{version}-build
> > %include default-depend.inc
> 
> Any other dependencies?
It depends on SUNWlibC, I added it to the spec.
> 
> > %package devel
> > Summary:                 %{summary} - development files
> > SUNW_BaseDir:            %{_prefix}
> > %include default-depend.inc
> > Requires: %name
> > 
> > %prep
> > rm -rf %name-%version
> > mkdir -p %name-%version
> > %ifarch amd64 sparcv9
> > mkdir -p %name-%version/%_arch64
> > %libtasn164.prep -d %name-%version/%_arch64
> > %endif
> > 
> > mkdir -p %name-%version/%base_arch
> > %libtasn1.prep -d %name-%version/%base_arch
> > 
> > %build
> > export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
> 
> This shouldn't be needed.
If I removed this line, it will use the libtool under its own path while
not the one in cbe. Then an error will happen "
> 
> > export CXX="$CXX -norunpath"
> 
> Does this module include c++ code?  Is c++ code used to build
> libraries?

no, I'll remove this line.
> 
> > export CFLAGS="%optflags"
> > export CXXFLAGS="%cxx_optflags -staticlib=stlport4"
> 
> CFLAGS/CXXFLAGS will be different in 64-bit and 32-bit, so these
> should be set in the base spec.
I'll remove remove 64-bit stuff. Only one version is built.

> > export MSGFMT="/usr/bin/msgfmt"
> 
> Not needed.
ok.

Jeff
> 
> > %ifarch amd64 sparcv9
> > %libtasn164.build -d %name-%version/%_arch64
> > %endif
> > 
> > %libtasn1.build -d %name-%version/%base_arch
> > 
> > %install
> > rm -rf $RPM_BUILD_ROOT
> > %libtasn1.install -d %name-%version/%base_arch
> > %ifarch amd64 sparcv9
> > %libtasn164.install -d %name-%version/%_arch64
> > rm -r $RPM_BUILD_ROOT%{_bindir}/%_arch64/*
> > %endif
> > 
> > rm -rf $RPM_BUILD_ROOT/%{_bindir}/*
> > rm -rf $RPM_BUILD_ROOT%{_datadir}/info
> > rm -rf $RPM_BUILD_ROOT/usr/local
> > rm -rf $RPM_BUILD_ROOT%{_mandir}
> > 
> > 
> > %clean
> > rm -rf $RPM_BUILD_ROOT
> > 
> > %files
> > %defattr (-, root, bin)
> > %{_bindir}
> > %dir %attr (0755, root, bin) %{_libdir}
> > %{_libdir}/lib*.so*
> > %ifarch amd64 sparcv9
> > %{_libdir}/%{_arch64}/lib*.so*
> > %endif
> > 
> > %files devel
> > %defattr (-, root, bin)
> > %{_includedir}
> > %dir %attr (0755, root, bin) %{_libdir}
> > %dir %attr (0755, root, other) %{_libdir}/pkgconfig
> > %{_libdir}/pkgconfig/*
> > %ifarch amd64 sparcv9
> > %dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
> > %{_libdir}/%{_arch64}/pkgconfig/*
> > %endif
> > %dir %attr (0755, root, sys) %{_datadir}
> > %dir %attr (0755, root, other) %{_datadir}/aclocal
> > %{_datadir}/aclocal/*
> > 
> > %changelog
> > * Mon Jun 16 2008 - jeff.cai at sun.com
> > - Move spec files from SFE.
> > * Wed May 28 2008 - jeff.cai at sun.com
> > - Split to two spec files
> > * Fri Jul 27 2007 - dougs at truemail.co.th
> > - Initial spec
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > rpm spec file
> > attachment
> > (libtasn1.spec)
> > 
> > #
> > # License (c) 2008 Sun Microsystems Inc.
> 
> s/License (c)/Copyright/
> 
> > # This file and all modifications and additions to the pristine
> > # package are under the same license as the package itself.
> > #
> > # Owner: jefftsai
> > # bugdb:
> > http://sourceforge.net/tracker/index.php?func=detail&group_id=245&atid=100245&aid=
> > #
> > Name:           libtasn1
> > Version:        1.4
> > Release:        0
> > Vendor:         Sun Microsystems, Inc.
> > Distribution:   Java Desktop System
> > License:        LGPL
> > BuildRoot:      %{_tmppath}/%{name}-%{version}-build
> > Docdir:         %{_datadir}/doc
> > Autoreqprov:    on
> > URL:            http://www.sun.com/software/javadesktopsystem/
> > Epoch:          2
> > Source:         
> > ftp://ftp.gnutls.org/pub/gnutls/libtasn1/%{name}-%{version}.tar.gz
> > Summary:        Libtasn is a library written in C for manipulating
> > ASN.1 objects.
> 
> I would omit "written in C" from the Summary.
> 
> > %description
> > Libtasn is a library written in C for manipulating ASN.1 objects
> > including 
> > DER/BER encoding and DER/BER decoding. Libtasn is used by GnuTLS to
> > manipulate 
> > X.509 objects and by GNU Shishi to handle Kerberos V5 packets.
> > 
> > %package -n libtasn1-devel
> > Summary:        Static libraries and header files for libtasn1
> > Group:          Applications/Text
> > Requires:       libtasn1 => %{version}-%{release}
> > 
> > %description -n libtasn1-devel
> > The libtasn1-devel package includes the static libraries and header 
> > files needed for tasn1 development.
> > 
> > %files -n libtasn1-devel
> > %defattr(-, root, root)
> > %{_libdir}/*.so*
> > %{_includedir}/*
> > 
> > %prep
> > %setup  -q -n %{name}-%{version}
> > 
> > %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 -I m4 -I gl/m4
> > libtoolize --force --copy
> > autoconf
> > automake -a -c -f
> 
> This is where you should set CFLAGS, LDFLAGS.
> In it's present form, I doubt that this spec file builds any
> 64-bit objects at all.
> 
> Laca
> 
> > ./configure --prefix=%{_prefix}                        \
> >             --bindir=%{_bindir}                        \
> >             --libdir=%{_libdir}                        \
> >             --sysconfdir=%{_sysconfdir}                \
> >             --includedir=%{_includedir}        \
> >             --mandir=%{_mandir}                        \
> >            --infodir=%{_infodir}               \
> >            --disable-rpath                     \
> >            --disable-static                    \
> >            --enable-shared
> > 
> > 
> > 
> > make -j$CPUS
> > 
> > %install
> > make install DESTDIR=$RPM_BUILD_ROOT mkdir_p="mkdir -p"
> > 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
> > 
> > %changelog
> > * Mon Jun 16 2008 - jeff.cai at sun.com
> > - Move spec files from SFE
> > * Tue Mar 28 2007 - jeff.cai at sun.com
> > - Split to two spec files.
> > 
> 


Reply via email to