diff --git a/dist-sx86.sh b/dist-sx86.sh new file mode 100755 index 0000000..d09077e --- /dev/null +++ b/dist-sx86.sh @@ -0,0 +1,67 @@ +#!/bin/sh + +# Create an archive 'gpsunx86-115-*.zip' (gpsunx86-115-YMMDD.zip) +# with binary SunOS x86 build installable package + +pkgdir=bin/pkg +vendor=`grep "#define __GVER_VENDOR_NAME__" golded3/mygolded.h | sed -e "s/#define __GVER_VENDOR_NAME__ //" -e "s/\"//g"` +email=`grep "#define __GVER_VENDOR_EMAIL__" golded3/mygolded.h | sed -e "s/#define __GVER_VENDOR_EMAIL__ //" -e "s/\"//g"` +date=`date +%Y%m%d` +name=bin/gpsunx86-115-${date}.zip +pkgname=golded-plus-x86-115-${date}.pkg + +gsed -i.orig -e "s/\#define __GVER_POSTVERSION__ .*/\#define __GVER_POSTVERSION__ \"-b${date}\"/" golded3/mygolded.h + +printf "GoldED+1.1.5 [`uname` `uname -i` pkg]\r\n" >bin/File_ID.Diz +printf 'Snapshot (development version)\r\n' >>bin/File_ID.Diz +printf 'This is unstable release and\r\n' >>bin/File_ID.Diz +printf 'it should be used for testing.\r\n' >>bin/File_ID.Diz +printf '------------------------------\r\n' >>bin/File_ID.Diz +printf 'GoldED+ is a successor of the\r\n' >>bin/File_ID.Diz +printf 'wellknown GoldED mail editor.\r\n' >>bin/File_ID.Diz +printf '------------------------------\r\n' >>bin/File_ID.Diz +printf '*golded-plus.sourceforge.net* \r\n' >>bin/File_ID.Diz + +# make binaries + +gmake PLATFORM=sun clean +gmake PLATFORM=sun +gmake PLATFORM=sun strip +gmake docs + +# creating package +if [ -d "$pkgdir" ] ; then rm -rf $pkgdir ; fi +mkdir $pkgdir +(echo "i pkginfo=./pkginfo" ;\ + echo "i depend=./depend" ;\ + echo "d none bin 0755 root root" ;\ + echo "d none share 0755 root root" ;\ + echo "d none share/golded+ 0755 root root" ;\ + echo "d none share/man 0755 root root" ;\ + echo "d none share/man/man1 0755 root root" ;\ + ((pkgproto bin/gedsun=bin/golded bin/gnsun=bin/goldnode bin/rddtsun=bin/rddt ;\ + for i in docs/*.1 ; do pkgproto $i=share/man/man1/`basename $i` ; done ;\ + pkgproto cfgs=share/golded+/cfgs ;\ + (pkgproto docs=share/golded+/docs | grep -v building.txt | grep -v linux | grep -v "\.1=" | grep -v "\.html=") ;\ + (pkgproto manuals=share/golded+/manuals | grep -v "\.tei=") ) | grep -v CVS | grep -v File_id.diz | grep -v Makefile |\ + gsed "s/\.\(chs\|bbs\|cfg\|esc\) 0755 /.\1 0644 /" | awk '{print $1 " " $2 " " $3 " " $4 " root root"}' )) \ + >$pkgdir/Prototype +echo 'P CSWncurses ncurses - ncurses library and utilities' > $pkgdir/depend +echo 'ARCH="i386"' > $pkgdir/pkginfo +echo 'CATEGORY="application"' >> $pkgdir/pkginfo +echo 'NAME="GoldED+1.1.5 - FTN mail editor"' >> $pkgdir/pkginfo +echo 'PKG="CSWgolded+"' >> $pkgdir/pkginfo +echo 'CLASSES="none"' >> $pkgdir/pkginfo +echo 'VERSION="1.1.5"' >> $pkgdir/pkginfo +echo 'BASEDIR="/opt/csw"' >> $pkgdir/pkginfo +echo "EMAIL=\"$email\"" >> $pkgdir/pkginfo +echo "VENDOR=\"http://golded-plus.sourceforge.net/ packaged by $vendor\"" >> $pkgdir/pkginfo +echo 'HOTLINE="http://golded-plus.sourceforge.net"' >> $pkgdir/pkginfo +cd $pkgdir +pkgmk -o -d . -f ./Prototype -r ../.. +echo 1|pkgtrans -s . ../$pkgname +cd ../.. +rm -rf $pkgdir + +# zipping +zip -9DXj ${name} bin/File_ID.Diz bin/$pkgname