%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Summary: A GNU file archiving program Name: tar Version: 1.29 %if %{p7build} Release: 1.p7 %else Release: 1 %endif License: GPLv3+ Group: Applications/Archiving URL: http://www.gnu.org/software/tar/ Source0: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.bz2 Source1: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.bz2.sig Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc >= 4.5.4-1 BuildRequires: libiconv >= 1.14-3 BuildRequires: gettext Requires: /sbin/install-info, info, gettext Requires: libiconv >= 1.14-3 %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %description The GNU tar program saves many files together in one archive and can restore individual files (or all of the files) from that archive. Tar can also be used to add supplemental files to an archive and to update or list files in the archive. Tar includes multivolume support, automatic archive compression/decompression, the ability to perform remote archives, and the ability to perform incremental and full backups. If you want to use tar for remote backups, you also need to install the rmt package. %prep %setup -q %build # starting with version 1.27 we need GNU GCC to compile export CC="gcc -D_LARGE_FILES" export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -D_LINUX_SOURCE_COMPAT -O -I/opt/freeware/include" # we are building this as root export FORCE_UNSAFE_CONFIGURE=1 ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --enable-largefile make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : gzip --best ${RPM_BUILD_ROOT}%{_infodir}/%{name}* rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir ln -sf tar ${RPM_BUILD_ROOT}%{_bindir}/gtar ( cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/tar gtar cd - mkdir -p usr/linux/bin cd usr/linux/bin ln -sf ../../..%{_bindir}/tar tar ln -sf ../../..%{_bindir}/tar gtar ) %post /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS ChangeLog ChangeLog.1 NEWS README THANKS TODO %{_bindir}/* %{_infodir}/* /usr/bin/* /usr/linux/bin/* %changelog * Tue May 17 2016 Michael Perzl - 1.29-1 - updated to version 1.29 * Mon Jul 28 2014 Michael Perzl - 1.28-1 - updated to version 1.28 * Mon Nov 18 2013 Michael Perzl - 1.27.1-1 - updated to version 1.27.1 * Sun Oct 06 2013 Michael Perzl - 1.27-1 - updated to version 1.27 * Sat Mar 12 2011 Michael Perzl - 1.26-1 - updated to version 1.26 * Mon Nov 08 2010 Michael Perzl - 1.25-1 - updated to version 1.25 * Mon Oct 25 2010 Michael Perzl - 1.24-1 - updated to version 1.24 * Thu Jul 01 2010 Michael Perzl - 1.23-2 - removed dependency on gettext >= 0.17 * Wed Mar 10 2010 Michael Perzl - 1.23-1 - updated to version 1.23 * Wed Mar 11 2009 Michael Perzl - 1.22-1 - updated to version 1.22 * Sun Dec 28 2008 Michael Perzl - 1.21-1 - updated to version 1.21 * Thu Apr 17 2008 Michael Perzl - 1.20-1 - updated to version 1.20 * Wed Mar 26 2008 Michael Perzl - 1.19-1 - first version for AIX V5.1 and higher