SUNWgnu-findutils.spec revision 19126
#
# spec file for package SUNWgnu-findutils
#
# Copyright (c) 2008 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%define owner kevmca
#
%include Solaris.inc
%define OSR 9641:4.2.32
%define _gnudir %{_basedir}/gnu
%define _gnubin %{_gnudir}/bin
%define _gnudata %{_gnudir}/share
%define _gnuman %{_gnudata}/man
# Do NOT bump past 4.2.31. Later versions are GPLv3 and this needs to be
# reviewed and approved before we can release with the newer license.
Name: SUNWgnu-findutils
IPS_package_name: file/gnu-findutils
Meta(info.classification): %{classification_prefix}:Applications/System Utilities
License: GPLv2
Vendor: www.gnu.org/software/findutils
Summary: GNU utilities find and xargs
Version: 4.2.31
Source: http://ftp.gnu.org/pub/gnu/findutils/findutils-%{version}.tar.gz
%if %build_l10n
Source1: l10n-configure.sh
# owner:mattman date:2009-02-27 type:branding
Patch1: gnu-findutils-01-manpages.diff
%endif
URL: http://www.gnu.org/software/findutils/
SUNW_BaseDir: %{_basedir}
SUNW_Copyright: %{name}.copyright
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
%if %build_l10n
%package l10n
IPS_package_name: file/gnu-findutils/l10n
Summary: %{summary} - l10n files
SUNW_BaseDir(relocate_from:%{_prefix}): %{_dto_il10n_basedir}
%include default-depend.inc
Requires: %{name}
%endif
%description
The GNU Find Utilities are the basic directory searching utilities of
the GNU operating system. These programs are typically used in
conjunction with other programs to provide modular and powerful
directory search and file locating capabilities to other commands. The
tools supplied with this package are: find - search for files in a
directory hierarchy and xargs - build and execute command lines from standard input.
%prep
%setup -q -n findutils-%version
%if %build_l10n
%patch1 -p1
%endif
%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
export CFLAGS="%optflags"
%if %build_l10n
sh %SOURCE1 --enable-copyright
%endif
./configure --prefix=%{_basedir} \
--program-prefix=g \
--mandir=%{_mandir} \
--infodir=%{_datadir}/info \
--libexecdir=%{_libexecdir}
make -j$CPUS
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rmdir $RPM_BUILD_ROOT%{_basedir}%{_localstatedir}
rm -rf $RPM_BUILD_ROOT%{_basedir}/lib/charset.alias
#remove unused files
rm -rf $RPM_BUILD_ROOT%{_libdir}
rm -rf $RPM_BUILD_ROOT%{_datadir}/info/dir
rm -rf $RPM_BUILD_ROOT%{_bindir}/glocate
rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/glocate.1
rm -rf $RPM_BUILD_ROOT%{_bindir}/gupdatedb
rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/gupdatedb.1
rm -rf $RPM_BUILD_ROOT%{_mandir}/man5
#create links in gnu dir
mkdir -p $RPM_BUILD_ROOT%{_gnubin}
ln -s ../../bin/gfind $RPM_BUILD_ROOT%{_gnubin}/find
ln -s ../../bin/gxargs $RPM_BUILD_ROOT%{_gnubin}/xargs
mkdir -p $RPM_BUILD_ROOT%{_gnuman}/man1
ln -s ../../../../share/man/man1/gfind.1 $RPM_BUILD_ROOT%{_gnuman}/man1/find.1
ln -s ../../../../share/man/man1/gxargs.1 $RPM_BUILD_ROOT%{_gnuman}/man1/xargs.1
%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%doc COPYING AUTHORS NEWS ChangeLog README THANKS
%dir %attr (0755, root, other) %{_datadir}/doc
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/info
%{_mandir}
%dir %attr (0755, root, bin) %{_gnubin}
%{_gnubin}/*
%dir %attr (0755, root, sys) %{_gnudata}
%{_gnuman}
%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif
%changelog
* Tue Aug 25 2009 - brian.cameron@sun.com
- Rever to 4.2.31. Newer versions are GPLv3.
* Tue Aug 25 2009 - brian.cameron@sun.com
- Bump to 4.2.33.
* Fri Feb 27 2009 - matt.keenan@sun.com
- Add manpage patch for Attributes and ARC Comment
* Thu Sep 11 2008 - kevin.mcareavey@sun.com
- Add %doc to %files for copyright
* Fri Aug 15 2008 - kevin.mcareavey@sun.com
- Cleanup for spec-files-other integration
- Rollback to 4.2.31 for GPLv2
- Create links in gnu directory
- Remove unused files
* Thu Feb 21 2008 - nonsea@users.sourceforge.net
- Bump to 4.2.33
* Thu Nov 15 2007 - daymobrew@users.sourceforge.net
- Correct path to charset.alias file.
* Sun Oct 14 2007 - laca@sun.com
- fix l10n installation
* Tue Sep 18 2007 - nonsea@users.sourceforge.net
- Bump to 4.2.31
* Sun Sep 24 2006 - Eric Boutilier
- Initial spec