# Tests by default. No tests: rpm -ba --define 'dotests 0' gnutls*.spec %{!?dotests: %define dotests 1} Summary: A program for synchronizing files over a network. Name: rsync Version: 3.2.3 Release: 1 Group: Applications/Internet URL: http://rsync.samba.org Source0: http://download.samba.org/pub/rsync/src/rsync-%{version}.tar.gz #Source1: ftp://rsync.samba.org/pub/%{name}/%{name}-%{version}.tar.gz.asc Source2: ftp://rsync.samba.org/pub/%{name}/%{name}-patches-%{version}.tar.gz ##Source3: ftp://rsync.samba.org/pub/%{name}/%{name}-patches-%{version}.tar.gz.asc #Patch0: %{name}-%{version}-aix_plat.patch Patch1: %{name}-3.2.3-aix-acl.patch Patch2: %{name}-3.2.3-aix-acl-new.patch Patch3: %{name}-3.2.3-libpath.patch License: GPLv3+ BuildRequires: patch make BuildRequires: lz4-devel >= 1.9.2 #Requires: popt Requires: libiconv >= 1.14 Requires: lz4 >= 1.9.2 %description Rsync uses a reliable algorithm to bring remote and host files into sync very quickly. Rsync is fast because it just sends the differences in the files over the network instead of sending the complete files. Rsync is often used as a very powerful mirroring process or just as a more capable replacement for the rcp command. A technical report which describes the rsync algorithm is included in this package. %prep export PATH=/opt/freeware/bin:$PATH %setup -q -b 2 #%patch0 -p1 -b .aix_plat %patch1 -p1 %patch2 %patch3 # Duplicate source for 32 & 64 bits rm -rf /tmp/%{name}-%{version}-32bit cp -pr . /tmp/%{name}-%{version}-32bit rm -fr * mv /tmp/%{name}-%{version}-32bit 32bit cp -pr 32bit 64bit %build #Build on 64bit mode cd 64bit export CC="gcc -maix64" export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --libdir=%{_libdir}64 \ --enable-acl-support \ --with-included-popt \ --disable-xxhash \ --disable-zstd # manually remove MKSTEMP from config.h perl -i.bak -pe 's/#define HAVE_SECURE_MKSTEMP 1/\/* #undef HAVE_SECURE_MKSTEMP *\//' config.h gmake %{?_smp_mflags} if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi #Build on 32bit mode cd ../32bit export CC="gcc" export OBJECT_MODE=32 export CFLAGS="-maix32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --enable-largefile \ --enable-acl-support \ --with-included-popt \ --disable-xxhash \ --disable-zstd # manually remove MKSTEMP from config.h perl -i.bak -pe 's/#define HAVE_SECURE_MKSTEMP 1/\/* #undef HAVE_SECURE_MKSTEMP *\//' config.h gmake %{?_smp_mflags} if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} #Install on 64bit mode cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 done ) /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : #Install on 32bit mode cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_32 ln -sf "$fic"_64 $fic done ) /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/COPYING 32bit/INSTALL.md 32bit/NEWS.md 32bit/README.md 32bit/TODO %{_bindir}/* %{_mandir}/man?/* %changelog * Wed Aug 19 2020 Rishita Saha - 3.2.3-1 - Update to version 3.2.3 * Wed Apr 01 2020 Ayappan P - 3.1.3-5 - Apply acl patch for AIX. See below bug report - https://bugzilla.samba.org/show_bug.cgi?id=12955 * Tue Oct 01 2019 Ayappan P - 3.1.3-4 - Set proper LDFLAGS * Wed Sep 11 2019 Ayappan P - 3.1.3-3 - Remove unwanted flags for 64bit build * Thu Mar 01 2018 Reshma V Kumar - 3.1.3-1 - Update to latest version to fix security vulnerability * Thu Apr 14 2016 Ayappan P - 3.1.2-1 - Update to version 3.1.2 * Tue Mar 26 2013 Gerard Visiedo - 3.0.9-1 - Initial port on Aix6.1