Return to build_pkg.sh CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / rsync / packaging / solaris |
1.1 ! misho 1: #!/bin/sh ! 2: # Shell script for building Solaris package of rsync ! 3: # Author: Jens Apel <jens.apel@web.de> ! 4: # License: GPL ! 5: # ! 6: # BASEDIR is /usr/local and should be the same as the ! 7: # --prefix parameter of configure ! 8: # ! 9: # this script should be copied under ! 10: # packaging/solaris/5.8/build_pkg.sh ! 11: ! 12: # Definitions start here ! 13: # you can edit this, if you like ! 14: ! 15: # The Package name under which rsync will b installed ! 16: PKGNAME=SMBrsync ! 17: ! 18: # Extract common info requires for the 'info' part of the package. ! 19: # This should be made generic and generated by the configure script ! 20: # but for now it is hard coded ! 21: BASEDIR=/usr/local ! 22: VERSION="2.5.5" ! 23: ARCH=`uname -p` ! 24: NAME=rsync ! 25: ! 26: # Definitions end here ! 27: # Please do not edit below this line or you know what you do. ! 28: ! 29: ## Start by faking root install ! 30: echo "Creating install directory (fake $BASEDIR)..." ! 31: START=`pwd` ! 32: FAKE_ROOT=$START/${PKGNAME} ! 33: mkdir $FAKE_ROOT ! 34: ! 35: # copy the binary and the man page to their places ! 36: mkdir $FAKE_ROOT/bin ! 37: mkdir -p $FAKE_ROOT/doc/rsync ! 38: mkdir -p $FAKE_ROOT/man/man1 ! 39: mkdir -p $FAKE_ROOT/man/man5 ! 40: ! 41: cp ../../../rsync $FAKE_ROOT/bin/rsync ! 42: cp ../../../rsync.1 $FAKE_ROOT/man/man1/rsync.1 ! 43: cp ../../../rsyncd.conf.5 $FAKE_ROOT/man/man5/rsyncd.conf.5 ! 44: cp ../../../README $FAKE_ROOT/doc/rsync/README ! 45: cp ../../../COPYING $FAKE_ROOT/doc/rsync/COPYING ! 46: cp ../../../tech_report.pdf $FAKE_ROOT/doc/rsync/tech_report.pdf ! 47: cp ../../../COPYING $FAKE_ROOT/COPYING ! 48: ! 49: ## Build info file ! 50: echo "Building pkginfo file..." ! 51: cat > $FAKE_ROOT/pkginfo << EOF_INFO ! 52: PKG=$PKGNAME ! 53: NAME=$NAME ! 54: DESC="Program for efficient remote updates of files." ! 55: VENDOR="Samba Team URL: http://samba.anu.edu.au/rsync/" ! 56: BASEDIR=$BASEDIR ! 57: ARCH=$ARCH ! 58: VERSION=$VERSION ! 59: CATEGORY=application ! 60: CLASSES=none ! 61: EOF_INFO ! 62: ! 63: ## Build prototype file ! 64: cat > $FAKE_ROOT/prototype << EOFPROTO ! 65: i copyright=COPYING ! 66: i pkginfo=pkginfo ! 67: d none bin 0755 bin bin ! 68: f none bin/rsync 0755 bin bin ! 69: d none doc 0755 bin bin ! 70: d none doc/$NAME 0755 bin bin ! 71: f none doc/$NAME/README 0644 bin bin ! 72: f none doc/$NAME/COPYING 0644 bin bin ! 73: f none doc/$NAME/tech_report.pdf 0644 bin bin ! 74: d none man 0755 bin bin ! 75: d none man/man1 0755 bin bin ! 76: f none man/man1/rsync.1 0644 bin bin ! 77: d none man/man5 0755 bin bin ! 78: f none man/man5/rsyncd.conf.5 0644 bin bin ! 79: EOFPROTO ! 80: ! 81: ## And now build the package. ! 82: OUTPUTFILE=$PKGNAME-$VERSION-sol8-$ARCH-local.pkg ! 83: echo "Building package.." ! 84: echo FAKE_ROOT = $FAKE_ROOT ! 85: cd $FAKE_ROOT ! 86: pkgmk -d . -r . -f ./prototype -o ! 87: pkgtrans -os . $OUTPUTFILE $PKGNAME ! 88: ! 89: mv $OUTPUTFILE .. ! 90: cd .. ! 91: ! 92: # Comment this out if you want to see, which file structure has been created ! 93: rm -rf $FAKE_ROOT ! 94: