05c64b12fc42900714f9acc737950c5af9115df0
[samba.git] / packaging / SGI / mkrelease.sh
1 #!/bin/sh
2
3 # This file goes through all the necessary steps to build a release package.
4 # You may specify a OS major version number (4, 5, or 6) to specify which
5 # OS release to build. If no version number is given it will default to 6.
6
7 if [ "$1" = "clean" ]; then
8   cd ../../source
9   make clean
10   cd ../packaging/SGI
11   shift
12   rm -rf bins catman html codepages swat Makefile samba.idb samba.spec
13 fi
14
15 # create the catman versions of the manual pages
16 #
17 echo Making manual pages
18 ./mkman
19 errstat=$?
20 if [ $errstat -ne 0 ]; then
21   echo "Error $errstat making manual pages\n";
22   exit $errstat;
23 fi
24
25 # build the sources
26 #
27 echo Making binaries
28 ./makefile.pl $1                # create the Makefile for the specified OS ver
29 errstat=$?
30 if [ $errstat -ne 0 ]; then
31   echo "Error $errstat creating Makefile\n";
32   exit $errstat;
33 fi
34
35 cd ../../source
36 # make -f ../packaging/SGI/Makefile clean
37 make -f ../packaging/SGI/Makefile all
38 errstat=$?
39 if [ $errstat -ne 0 ]; then
40   echo "Error $errstat building sources\n";
41   exit $errstat;
42 fi
43
44 cd ../packaging/SGI
45
46 # generate the packages
47 #
48 echo Generating Inst Packages
49 ./spec.pl                       # create the samba.spec file
50 errstat=$?
51 if [ $errstat -ne 0 ]; then
52   echo "Error $errstat creating samba.spec\n";
53   exit $errstat;
54 fi
55
56 ./idb.pl                        # create the samba.idb file
57 errstat=$?
58 if [ $errstat -ne 0 ]; then
59   echo "Error $errstat creating samba.idb\n";
60   exit $errstat;
61 fi
62
63 if [ ! -d bins ]; then
64    mkdir bins
65 fi
66
67 # do the packaging
68 /usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all
69