1997-09-05 02:28:41 +00:00
#!/bin/sh
1997-10-31 17:33:04 +00:00
# This file goes through all the necessary steps to build a release package.
# You may specify a OS major version number (4, 5, or 6) to specify which
# OS release to build. If no version number is given it will default to 6.
1998-05-08 17:30:48 +00:00
doclean = ""
1998-10-29 01:15:14 +00:00
SGI_ABI = -n32
1998-11-10 21:58:19 +00:00
CC = cc
export SGI_ABI CC
1998-05-08 17:30:48 +00:00
1998-04-29 13:45:27 +00:00
if [ " $1 " = "clean" ] ; then
1998-05-08 17:30:48 +00:00
doclean = $1
shift
fi
if [ " $doclean " = "clean" ] ; then
1998-04-29 13:45:27 +00:00
cd ../../source
1998-10-29 01:15:14 +00:00
if [ -f Makefile ] ; then
make distclean
fi
1998-04-29 13:45:27 +00:00
cd ../packaging/SGI
1998-05-08 17:30:48 +00:00
rm -rf bins catman html codepages swat samba.idb samba.spec
1998-04-29 13:45:27 +00:00
fi
1997-09-05 02:28:41 +00:00
# create the catman versions of the manual pages
#
1998-10-29 01:15:14 +00:00
if [ " $doclean " = "clean" ] ; then
echo Making manual pages
./mkman
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat making manual pages\n " ;
exit $errstat ;
fi
1997-12-01 14:50:52 +00:00
fi
1997-09-05 02:28:41 +00:00
1998-08-07 18:56:12 +00:00
cd ../../source
1998-10-29 01:15:14 +00:00
if [ " $doclean " = "clean" -o ! -f Makefile ] ; then
echo Create SGI specific Makefile
chmod +x configure
chmod +x configure.developer
chmod +x config.guess
chmod +x config.status
chmod +x config.sub
./configure --prefix= /usr --mandir= /usr/src/man
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat creating Makefile\n " ;
exit $errstat ;
fi
1997-12-01 14:50:52 +00:00
fi
1998-08-07 18:56:12 +00:00
# build the sources
#
echo Making binaries
if [ " $1 " = "5" ] ; then
1998-10-29 01:15:14 +00:00
myflags = "CFLAGS=-O -g3"
shift
1998-08-07 18:56:12 +00:00
else
1998-10-29 01:15:14 +00:00
myflags = "CFLAGS=-O -g3"
1998-08-07 18:56:12 +00:00
fi
1998-10-29 01:15:14 +00:00
make " $myflags " $*
1997-12-01 14:50:52 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat building sources\n " ;
exit $errstat ;
fi
1997-09-05 02:28:41 +00:00
cd ../packaging/SGI
# generate the packages
#
echo Generating Inst Packages
1997-10-31 17:33:04 +00:00
./spec.pl # create the samba.spec file
1997-12-01 14:50:52 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat creating samba.spec\n " ;
exit $errstat ;
fi
1997-10-31 17:33:04 +00:00
./idb.pl # create the samba.idb file
1997-12-01 14:50:52 +00:00
errstat = $?
if [ $errstat -ne 0 ] ; then
echo " Error $errstat creating samba.idb\n " ;
exit $errstat ;
fi
1997-09-05 02:28:41 +00:00
if [ ! -d bins ] ; then
mkdir bins
fi
1997-10-31 17:33:04 +00:00
# do the packaging
1998-08-07 19:01:59 +00:00
/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all
1997-09-05 02:28:41 +00:00