# 2003 10 07 Mouse # Ensure LOCALROOT is set : ${LOCALROOT:=/local} # Version number VER=2.5.6 # Unpack the distribution gunzip < DIST/rsync-${VER}.tar.gz | mtar xfppSjFF - # Work relative to that directory cd rsync-$VER # Check for weirdness: mfind . ! -type f ! -type d -ls mfind . ! -perm 07000/0 -ls # Normalize permissions: mfind . -type d -print | xargs chmod 755 mfind . -type f -perm 0111/0 -print | xargs chmod 644 mfind . -type f ! -perm 0111/0 -print | xargs chmod 755 # Configure it. The damn thing has caught the all-too-ubiquitous configure # disease, but in this case, configure seems to mostly guess right enough. ./configure # Apply patches ( cd ../patches ; find . -type f -print ) | while read fn do patch $fn < ../patches/$fn && : mv $fn.orig $fn.original done # Build it. make # Install it. Rather than try to bludgeon configure into getting the paths # right, above, we just install it by hand. None of those paths get # compiled into anything, fortunately, so we can let it remain happy in # its delusions about appropriate installation directories. mkdir -p $LOCALROOT/.bin/rsync-$VER install -c rsync $LOCALROOT/.bin/rsync-$VER/rsync mkdir -p $LOCALROOT/.man/rsync-$VER/man1 $LOCALROOT/.man/rsync-$VER/man5 cp rsync.1 $LOCALROOT/.man/rsync-$VER/man1 cp rsyncd.conf.5 $LOCALROOT/.man/rsync-$VER/man5 # Clean up. cd .. rm -rf rsync-$VER