Halton Huo wrote:
> Hi Simon,
>
> Please seem my comments in lines.
>   
>> plain text document attachment (SUNWtack.spec)
>> #
>> # spec file for package SUNWtack
>> #
>> # includes module(s): tack 
>> #
>> # Copyright (c) 2008 Sun Microsystems, Inc.
>>     
> Should be 2009.
>
>   
>> BuildRoot:               %{_tmppath}/%{name}-%{version}-build
>> SUNW_Copyright:          %{name}.copyright
>> Requires: SUNWncurses
>> BuildRequires: SUNWncurses-devel
>>
>> %include default-depend.inc
>>     
> No more dependencies? I think you need run check-deps.pl for the correct
> dependency list.
>
>   
>> #%package devel
>> #Summary:                 %{summary} - development files
>> #SUNW_BaseDir:            %{_basedir}
>>     
> If there is no -devel pkg, remove it.
>
>   
>> %include default-depend.inc
>>     
> Also should be removed.
>
>   
>> %build
>>
>> export PKG_CONFIG_PATH=%{_pkg_config_path}
>> export CFLAGS="-I/usr/include/ncurses %optflags"
>> export RPM_OPT_FLAGS="$CFLAGS -I/usr/include/ncurses"
>>     
> -I/usr/include/ncurses need not be included twice.
>   
>> #export EXTRA_LDFLAGS="%_ldflags -L/usr/gnu/lib -R/usr/gnu/lib"
>>     
> Remove EXTRA_LDFLAGS if you do not use it.
>   
>> export LDFLAGS="%_ldflags -L/usr/gnu/lib -R/usr/gnu/lib -lncurses"
>> %tack.build -d %name-%version/%{base_arch}
>>
>> %ifarch amd64 sparcv9
>> if [ "x`basename $CC`" != xgcc ]
>> then
>>   FLAG64="-xarch=generic64"
>> else
>>   FLAG64="-m64"
>> fi
>> export LDFLAGS="$FLAG64 -L/usr/gnu/lib/sparcv9 -R/usr/gnu/lib/sparcv9 
>> -lncurses "
>>     
> I suppose this should be wrong under amd64 platform. Possible fix is
> s/sparcv9/%{_arch64}
>
>   
>> export CXXFLAGS="-g -m64"
>>     
> Does tack has C++ file?
>   
>> export CFLAGS="-I/usr/include/ncurses %optflags64"
>> #export EXTRA_LDFLAGS="%_ldflags -L/usr/gnu/lib -R/usr/gnu/lib"
>>     
> Remove EXTRA_LDFLAGS if you do not use it.
>   
>> export RPM_OPT_FLAGS="$CFLAGS -I/usr/include/ncurses"
>>     
> -I/usr/include/ncurses need not be included twice.
>   
>> %tack_64.build -d %name-%version/%{_arch64}
>> %endif
>>
>> %install
>>
>> rm -rf $RPM_BUILD_ROOT
>>
>> %ifarch amd64 sparcv9
>> %tack_64.install -d %name-%version/%{_arch64}
>> %endif
>>
>> %tack.install -d %name-%version/%{base_arch}
>>
>> # install man page
>> #rm -rf $RPM_BUILD_ROOT%{_mandir}
>> #cd %{_builddir}/%name-%version/sun-manpages
>> #make install DESTDIR=$RPM_BUILD_ROOT
>>     
> I bet you need work out man page.
>
>   
>> plain text document attachment (tack.spec)
>> #
>> # spec file for package tack 
>> #
>> # Copyright (c) 2008 Sun Microsystems, Inc.
>>     
> Same as above, use 2009 instead.
>
>   
>> %define _preincludedir  /usr/include/ncurses
>>     
> Does not CFLAGS set in SUNWtack.spec take effect?
>   
>> CFLAGS="$RPM_OPT_FLAGS"                  \
>> ./configure  --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} 
>> --includedir=%{_preincludedir} --datadir=%{_datadir} --bindir=%{_bindir} 
>> --libdir=%{_libdir} --enable-widec         
>>   #--with-ncursesw 
>>     
> Why disable ncursesw option? If no use, remove it then.
>   
>>           
>>
>> make -j $CPUS
>>  
>> %install
>> make DESTDIR=$RPM_BUILD_ROOT install \
>>     SITEPREFIX=/dummy VENDORPREFIX=/dummy PERLPREFIX=/dummy
>>     
> Could you explain why those PREFIX set to /dummy, does this module
> introduce any perl or python module?
>   
>> rm -rf $RPM_BUILD_ROOT/%{_prefix}/man
>> rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a
>>     
> Usually we use following command for more cleanup of static libraries.
> find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
> find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
>
>
>   
Hi Halton&Ghee
    Thanks for the thoughtful comments.Revised the spec files according 
to your advice.

BR,
simon




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SUNWtack.spec
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20090801/a40af99c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tack.spec
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20090801/a40af99c/attachment-0001.ksh>

Reply via email to