#!/bin/bash # # rdiff-backup and libraries, for RHEL5 AMD64 # (change /lib64/ for /lib/ for 32-bit). # Nathaniel, 2007-09-21, mod for v1.2 2008-10-0[68]. # Rather than building rpms, the minimum necessary # work is done to get the packages installed. # The build is done in vmware, then /usr/local/* files # are tarred up and copied to the system for installation. # cd "`dirname "$0"`" || exit 12 [ -d work ] || mkdir work base=/usr/local mkdir -pv $base/{bin,include,lib,lib64/python2.4/site-packages,share/{doc,man/man{1,3}}} line=" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " t=1 cd work || exit 13 echo "$line" # rhel5 seems not to have python-setuptools now...? rpmbuild --rebuild ../orig/python-setuptools-0.6c5-1.el5.src.rpm mv /usr/src/redhat/RPMS/noarch/python-setuptools-0.6c5-1.noarch.rpm ./ rpm -iv python-setuptools-0.6c5-1.noarch.rpm echo "$line" tar -xzf ../orig/pylibacl-0.4.0.tar.gz cd pylibacl-0.4.0 || exit 14 ./setup.py build sleep $t mv -iv build/lib.*/*.so $base/lib64/python2.4/site-packages/ sleep $t cd .. echo "$line" tar -xzf ../orig/pyxattr-0.4.0.tar.gz cd pyxattr-0.4.0 || exit 15 ./setup.py build sleep $t mv -iv build/lib.*/*.so $base/lib64/python2.4/site-packages/ sleep $t cd .. echo "$line" # librsync: static and shared tar -xzf ../orig/librsync-0.9.7.tar.gz cd librsync-0.9.7 || exit 16 patch -p1 <../../orig/librsync-0.9.7_4GBbug.patch ./configure --enable-shared && make sleep $t mv -iv rdiff $base/bin/ mv -iv doc/rdiff.1 $base/share/man/man1/ mv -iv doc/librsync.3 $base/share/man/man3/ mv -iv librsync{,-config}.h $base/include/ ./libtool --mode=install cp librsync.la $base/lib64/ cp -v .libs/librsync.so.1.0.2 $base/lib64/ (cd $base/lib64 && rm -fv librsync.so.1 && ln -sv librsync.so.1.0.2 librsync.so.1) (cd $base/lib64 && rm -fv librsync.so && ln -sv librsync.so.1.0.2 librsync.so) sleep $t cd .. echo "$line" # rdiff-backup python scripts and manual/doc tar -xzf ../orig/rdiff-backup-1.2.1.tar.gz cd rdiff-backup-1.2.1 || exit 17 ./setup.py bdist_dumb sleep $t tar -xzf dist/*.tar.gz mv -iv usr/bin/* $base/bin/ mv -iv usr/share/doc/* $base/share/doc/ mv -iv usr/share/man/man1/* $base/share/man/man1/ mv -iv usr/lib*/python*/site-packages/rdiff_backup $base/lib64/python2.4/site-packages/ cd .. echo "$line" # Put the /usr/local additions to python into python's path echo "$base/lib64/python2.4/site-packages $base/lib64/python2.4/site-packages/rdiff_backup " >>/usr/lib64/python2.4/site-packages/rdiff_ets.pth # Make sure /usr/local is on LD_LIBRARY_PATH (not default on RHEL5) echo $base/lib64 >>/etc/ld.so.conf.d/librsync.conf /sbin/ldconfig