500f6d
%global ALTERNATIVES            %{_sbindir}/alternatives
500f6d
500f6d
Summary: POSIX File System Archiver
500f6d
Name: pax
500f6d
Version: 3.4
fdb9b5
Release: 19%{?dist}
500f6d
License: BSD
500f6d
Group: Applications/Archiving
500f6d
Source: ftp://ftp.suse.com/pub/people/kukuk/pax/%{name}-%{version}.tar.bz2
500f6d
URL:    ftp://ftp.suse.com/pub/people/kukuk/pax/
500f6d
#use Linux PATH_MAX (4092) for maximum PATHLENGTH instead of pax default 3072
500f6d
Patch0: pax-3.0-PATHMAX.patch
500f6d
#fix bug with archiving files of filename length exactly 100 chars
500f6d
Patch1: pax-3.4-abs100.patch
500f6d
#do not truncate names when extracting
500f6d
Patch2: pax-3.4-rdtruncate.patch
500f6d
#do not fail with gcc-4.6+
500f6d
Patch3: pax-gcc46.patch
500f6d
500f6d
# manpage edits - s/pax/opax/, add cross references
500f6d
Patch4: pax-3.4-manpage.patch
500f6d
500f6d
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
500f6d
Requires(post):  %{ALTERNATIVES}
500f6d
Requires(preun): %{ALTERNATIVES}
500f6d
500f6d
%description
500f6d
The 'pax' utility is the POSIX standard archive tool.  It supports the two most
500f6d
common forms of standard Unix archive (backup) files - CPIO and TAR.
500f6d
500f6d
# "desired" alternative constants
500f6d
%global ALT_NAME                pax
500f6d
%global ALT_LINK                %{_bindir}/pax
500f6d
%global ALT_SL1_NAME            pax-man
500f6d
%global ALT_SL1_LINK            %{_mandir}/man1/pax.1.gz
500f6d
500f6d
# "local" alternative constants ("opax" - OpenBSD pax)
500f6d
%global ALT_PATH                %{_bindir}/opax
500f6d
%global ALT_SL1_PATH            %{_mandir}/man1/opax.1.gz
500f6d
500f6d
# helpers for alternatives
500f6d
%global ALT_MAN_ORIG            %{_mandir}/man1/pax.1
500f6d
%global ALT_MAN_NEW             %{_mandir}/man1/opax.1
500f6d
500f6d
%prep
500f6d
%setup -q
500f6d
%patch0 -p1 -b .PATHMAX
500f6d
%patch1 -p1 -b .abs100
500f6d
%patch2 -p1 -b .rdtruncate
500f6d
%patch3 -p1 -b .gcc46
500f6d
%patch4 -p1 -b .manpage
500f6d
500f6d
%build
500f6d
%configure
500f6d
make %{?_smp_mflags}
500f6d
500f6d
%install
500f6d
rm -rf %{buildroot}
500f6d
make DESTDIR=%{buildroot} install
500f6d
mv %{buildroot}%{ALT_LINK} %{buildroot}%{ALT_PATH}
500f6d
mv %{buildroot}%{ALT_MAN_ORIG} %{buildroot}%{ALT_MAN_NEW}
500f6d
ln -s %{ALT_PATH} %{buildroot}%{ALT_LINK}
500f6d
ln -s %{ALT_MAN_NEW} %{buildroot}%{ALT_MAN_ORIG}
500f6d
500f6d
%clean
500f6d
rm -rf %{buildroot}
500f6d
500f6d
%files
500f6d
%defattr(-,root,root,-)
500f6d
%doc ABOUT-NLS AUTHORS ChangeLog COPYING NEWS README THANKS
500f6d
%{ALT_PATH}
500f6d
%doc %{ALT_SL1_PATH}
500f6d
%ghost %verify(not md5 size mode mtime) %{ALT_LINK}
500f6d
%ghost %verify(not md5 size mode mtime) %{ALT_SL1_LINK}
500f6d
500f6d
%post
500f6d
# We need to remove old /usr/bin/pax binary because the following
500f6d
# 'update-alternatives' step does not do it itself.  We may remove this once we
500f6d
# are sure that pax >= 3.4-16 is installed on the system.
500f6d
test -f %{ALT_LINK} && test ! -h %{ALT_LINK} && rm -rf %{ALT_LINK}
500f6d
500f6d
%{ALTERNATIVES} \
500f6d
    --install   %{ALT_LINK}     %{ALT_NAME}     %{ALT_PATH}     33 \
500f6d
    --slave     %{ALT_SL1_LINK} %{ALT_SL1_NAME} %{ALT_SL1_PATH} \
500f6d
500f6d
%preun
500f6d
if [ $1 -eq 0 ]; then
500f6d
    # only on pure uninstall (not upgrade)
500f6d
    %{ALTERNATIVES} --remove %{ALT_NAME} %{ALT_PATH}
500f6d
fi
500f6d
500f6d
%changelog
fdb9b5
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 3.4-19
fdb9b5
- Mass rebuild 2014-01-24
fdb9b5
fdb9b5
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.4-18
fdb9b5
- Mass rebuild 2013-12-27
fdb9b5
500f6d
* Thu Jun 06 2013 Pavel Raiskup <praiskup@redhat.com> - 3.4-17
500f6d
- remove old %%{_bindir}/pax binary if existent during update
500f6d
500f6d
* Wed May 15 2013 Pavel Raiskup <praiskup@redhat.com> - 3.4-16
500f6d
- setup the 'alternatives' template (#929349)
500f6d
500f6d
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-15
500f6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
500f6d
500f6d
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-14
500f6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
500f6d
500f6d
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-13
500f6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
500f6d
500f6d
* Wed Jun 29 2011 Ondrej Vasik <ovasik@redhat.com> - 3.4-12
500f6d
- fix FTBFS with gcc4.6+ - (#715754)
500f6d
500f6d
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-11
500f6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
500f6d
500f6d
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-10
500f6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
500f6d
500f6d
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-9
500f6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
500f6d
500f6d
* Mon Jan 19 2009 Ondrej Vasik <ovasik@redhat.com> - 3.4-8
500f6d
- Merge review #226235: fix use of %%makeinstall as well
500f6d
500f6d
* Mon Jan 19 2009 Ondrej Vasik <ovasik@redhat.com> - 3.4-7
500f6d
- Merge review #226235: do ship doc files,
500f6d
  do comment patches, use better buildroot and
500f6d
  defaults for attributes, allow parallel builds
500f6d
500f6d
* Fri Aug 29 2008 Ondrej Vasik <ovasik@redhat.com> - 3.4-6
500f6d
- removed duplicate Source0
500f6d
500f6d
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.4-5
500f6d
- Autorebuild for GCC 4.3
500f6d
500f6d
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 3.4-4
500f6d
- Rebuild for selinux ppc32 issue.
500f6d
500f6d
* Mon Jul 16 2007 Radek Brich <rbrich@redhat.com> - 3.4-3
500f6d
- do not truncate file names when extracting (#205324)
500f6d
500f6d
* Wed Jun 20 2007 Radek Brich <rbrich@redhat.com> - 3.4-2
500f6d
- applied patch for #239000 (pax fails creation of ustar
500f6d
  if an absolute name is exactly 100 characters long)
500f6d
500f6d
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3.4-1.2.2
500f6d
- rebuild
500f6d
500f6d
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.4-1.2.1
500f6d
- bump again for double-long bug on ppc(64)
500f6d
500f6d
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.4-1.2
500f6d
- rebuilt for new gcc4.1 snapshot and glibc changes
500f6d
500f6d
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
500f6d
- rebuilt
500f6d
500f6d
* Mon Aug 15 2005 Peter Vrabec <pvrabec@redhat.com> 3.4-1
500f6d
- upgrade 3.4
500f6d
500f6d
* Fri Mar 18 2005 Peter Vrabec <pvrabec@redhat.com> 3.0-11
500f6d
- rebuilt
500f6d
500f6d
* Thu Oct 21 2004 Peter Vrabec <pvrabec@redhat.com>
500f6d
- fix PAXPATHLEN (#132857)
500f6d
500f6d
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
500f6d
- rebuilt
500f6d
500f6d
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
500f6d
- rebuilt
500f6d
500f6d
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
500f6d
- rebuilt
500f6d
500f6d
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
500f6d
- rebuilt
500f6d
500f6d
* Thu Dec 12 2002 Tim Powers <timp@redhat.com> 3.0-5
500f6d
- rebuild on all arches
500f6d
500f6d
* Wed Jul 03 2002 Karsten Hopp <karsten@redhat.de>
500f6d
- fix documentation (#63671)
500f6d
500f6d
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
500f6d
- automated rebuild
500f6d
500f6d
* Thu May 23 2002 Tim Powers <timp@redhat.com>
500f6d
- automated rebuild
500f6d
500f6d
* Tue Mar  5 2002 Matt Wilson <msw@redhat.com>
500f6d
- pull PAX source tarball from the SuSE package (which is based off
500f6d
  this one yet claims copyright on the spec file)
500f6d
500f6d
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
500f6d
- Bump release + rebuild.
500f6d
500f6d
* Fri Feb 23 2001 Jakub Jelinek <jakub@redhat.com>
500f6d
- make it build under glibc 2.2.2
500f6d
500f6d
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
500f6d
- automatic rebuild
500f6d
500f6d
* Fri Jun 30 2000 Preston Brown <pbrown@redhat.com>
500f6d
- debian version, which is a port from OpenBSD's latest.
500f6d
500f6d
* Tue Jun 13 2000 Preston Brown <pbrown@redhat.com>
500f6d
- FHS paths
500f6d
500f6d
* Tue May 30 2000 Preston Brown <pbrown@redhat.com>
500f6d
- adopted for Winston.
500f6d