summaryrefslogtreecommitdiff
path: root/packaging/SGI/mkrelease.sh
blob: d298095ae9e62e0ae99552e3ec384089b808124e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/sh

# 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.

doclean=""

if [ "$1" = "clean" ]; then
  doclean=$1
  shift
fi

if [ "$doclean" = "clean" ]; then
  cd ../../source
  make distclean
  cd ../packaging/SGI
  rm -rf bins catman html codepages swat samba.idb samba.spec
fi

# create the catman versions of the manual pages
#
echo Making manual pages
./mkman
errstat=$?
if [ $errstat -ne 0 ]; then
  echo "Error $errstat making manual pages\n";
  exit $errstat;
fi

cd ../../source
echo Create SGI specific Makefile
./configure --prefix=/usr --mandir=/usr/src/man
errstat=$?
if [ $errstat -ne 0 ]; then
  echo "Error $errstat creating Makefile\n";
  exit $errstat;
fi


# build the sources
#
echo Making binaries

if [ "$1" = "5" ]; then
  make "CFLAGS=-O -g3" all
else
  make "CFLAGS=-O -g3 -n32" all
fi

errstat=$?
if [ $errstat -ne 0 ]; then
  echo "Error $errstat building sources\n";
  exit $errstat;
fi

cd ../packaging/SGI

# generate the packages
#
echo Generating Inst Packages
./spec.pl			# create the samba.spec file
errstat=$?
if [ $errstat -ne 0 ]; then
  echo "Error $errstat creating samba.spec\n";
  exit $errstat;
fi

./idb.pl			# create the samba.idb file
errstat=$?
if [ $errstat -ne 0 ]; then
  echo "Error $errstat creating samba.idb\n";
  exit $errstat;
fi

if [ ! -d bins ]; then
   mkdir bins
fi

# do the packaging
/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all