Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWgnu-findutils
      3 #
      4 # Copyright (c) 2008 Sun Microsystems, Inc.
      5 # This file and all modifications and additions to the pristine
      6 # package are under the same license as the package itself.
      7 #
      8 %define owner kevmca
      9 #
     10 
     11 %include Solaris.inc
     12 
     13 %define OSR 9641:4.2.32
     14 
     15 %define _gnudir %{_basedir}/gnu
     16 %define _gnubin %{_gnudir}/bin
     17 %define _gnudata %{_gnudir}/share
     18 %define _gnuman %{_gnudata}/man
     19 
     20 # Do NOT bump past 4.2.31.  Later versions are GPLv3 and this needs to be
     21 # reviewed and approved before we can release with the newer license.
     22 
     23 Name:           SUNWgnu-findutils
     24 License:        GPLv2
     25 Summary:        GNU utilities find and xargs
     26 Version:        4.2.31
     27 Source:         http://ftp.gnu.org/pub/gnu/findutils/findutils-%{version}.tar.gz
     28 %if %build_l10n
     29 Source1:        l10n-configure.sh
     30 # owner:mattman date:2009-02-27 type:branding
     31 Patch1:         gnu-findutils-01-manpages.diff
     32 %endif
     33 URL:            http://www.gnu.org/software/findutils/
     34 SUNW_BaseDir:   %{_basedir}
     35 SUNW_Copyright: %{name}.copyright
     36 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
     37 %include default-depend.inc
     38 
     39 %if %build_l10n
     40 %package l10n
     41 Summary:        %{summary} - l10n files
     42 SUNW_BaseDir:   %{_basedir}
     43 %include default-depend.inc
     44 Requires:       %{name}
     45 %endif
     46 
     47 %description
     48 The GNU Find Utilities are the basic directory searching utilities of 
     49 the GNU operating system. These programs are typically used in 
     50 conjunction with other programs to provide modular and powerful 
     51 directory search and file locating capabilities to other commands. The 
     52 tools supplied with this package are: find - search for files in a 
     53 directory hierarchy and xargs - build and execute command lines from standard input.
     54 
     55 %prep
     56 %setup -q -n findutils-%version
     57 %if %build_l10n
     58 %patch1 -p1
     59 %endif
     60 
     61 %build
     62 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     63 if test "x$CPUS" = "x" -o $CPUS = 0; then
     64      CPUS=1
     65 fi
     66 
     67 export CFLAGS="%optflags"
     68 
     69 %if %build_l10n
     70 sh %SOURCE1 --enable-copyright
     71 %endif
     72 ./configure --prefix=%{_basedir} \
     73             --program-prefix=g \
     74             --mandir=%{_mandir} \
     75 	    --infodir=%{_datadir}/info \
     76             --libexecdir=%{_libexecdir}
     77 
     78 make -j$CPUS
     79 
     80 %install
     81 rm -rf $RPM_BUILD_ROOT
     82 
     83 make install DESTDIR=$RPM_BUILD_ROOT
     84 rmdir $RPM_BUILD_ROOT%{_basedir}%{_localstatedir}
     85 rm -rf $RPM_BUILD_ROOT%{_basedir}/lib/charset.alias
     86 
     87 #remove unused files
     88 rm -rf $RPM_BUILD_ROOT%{_libdir}
     89 rm -rf $RPM_BUILD_ROOT%{_datadir}/info/dir
     90 rm -rf $RPM_BUILD_ROOT%{_bindir}/glocate
     91 rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/glocate.1
     92 rm -rf $RPM_BUILD_ROOT%{_bindir}/gupdatedb
     93 rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/gupdatedb.1
     94 rm -rf $RPM_BUILD_ROOT%{_mandir}/man5
     95 
     96 #create links in gnu dir
     97 mkdir -p $RPM_BUILD_ROOT%{_gnubin}
     98 ln -s ../../bin/gfind $RPM_BUILD_ROOT%{_gnubin}/find
     99 ln -s ../../bin/gxargs $RPM_BUILD_ROOT%{_gnubin}/xargs
    100 mkdir -p $RPM_BUILD_ROOT%{_gnuman}/man1
    101 ln -s ../../../../share/man/man1/gfind.1 $RPM_BUILD_ROOT%{_gnuman}/man1/find.1
    102 ln -s ../../../../share/man/man1/gxargs.1 $RPM_BUILD_ROOT%{_gnuman}/man1/xargs.1
    103 
    104 %if %build_l10n
    105 %else
    106 # REMOVE l10n FILES
    107 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
    108 %endif
    109 
    110 %clean
    111 rm -rf $RPM_BUILD_ROOT
    112 
    113 %files
    114 %doc COPYING AUTHORS NEWS ChangeLog README THANKS
    115 %dir %attr (0755, root, other) %{_datadir}/doc
    116 %defattr (-, root, bin)
    117 %dir %attr (0755, root, bin) %{_bindir}
    118 %{_bindir}/*
    119 %dir %attr (0755, root, sys) %{_datadir}
    120 %{_datadir}/info
    121 %{_mandir}
    122 %dir %attr (0755, root, bin) %{_gnubin}
    123 %{_gnubin}/*
    124 %dir %attr (0755, root, sys) %{_gnudata}
    125 %{_gnuman}
    126 
    127 %if %build_l10n
    128 %files l10n
    129 %defattr (-, root, bin)
    130 %dir %attr (0755, root, sys) %{_datadir}
    131 %attr (-, root, other) %{_datadir}/locale
    132 %endif
    133 
    134 %changelog
    135 * Tue Aug 25 2009 - brian.cameron@sun.com
    136 - Rever to 4.2.31.  Newer versions are GPLv3.
    137 * Tue Aug 25 2009 - brian.cameron@sun.com
    138 - Bump to 4.2.33.
    139 * Fri Feb 27 2009 - matt.keenan@sun.com
    140 - Add manpage patch for Attributes and ARC Comment
    141 * Thu Sep 11 2008 - kevin.mcareavey@sun.com
    142 - Add %doc to %files for copyright
    143 * Fri Aug 15 2008 - kevin.mcareavey@sun.com
    144 - Cleanup for spec-files-other integration
    145 - Rollback to 4.2.31 for GPLv2
    146 - Create links in gnu directory
    147 - Remove unused files
    148 * Thu Feb 21 2008 - nonsea@users.sourceforge.net
    149 - Bump to 4.2.33
    150 * Thu Nov 15 2007 - daymobrew@users.sourceforge.net
    151 - Correct path to charset.alias file.
    152 * Sun Oct 14 2007 - laca@sun.com
    153 - fix l10n installation
    154 * Tue Sep 18 2007 - nonsea@users.sourceforge.net
    155 - Bump to 4.2.31
    156 * Sun Sep 24 2006 - Eric Boutilier
    157 - Initial spec
    158