5 # make use of Studio 11 or 12 compiler
10 INSTALL_BASE=/opt/bacula
11 SBIN_DIR=$INSTALL_BASE/sbin
12 MAN_DIR=$INSTALL_BASE/man
13 SYSCONF_DIR=$INSTALL_BASE/etc
14 SCRIPT_DIR=$INSTALL_BASE/etc
15 WORKING_DIR=/var/bacula
20 # Try to guess the distribution base
21 DISTR_BASE=`dirname \`pwd\` | sed -e 's@/platforms$@@'`
22 echo "Distribution base: $DISTR_BASE"
24 TMPINSTALLDIR=/tmp/`basename $DISTR_BASE`-build
25 echo "Temp install dir: $TMPINSTALLDIR"
26 echo "Install directory: $INSTALL_BASE"
30 if [ "x$1" = "xbuild" ]; then
31 ./configure --prefix=$INSTALL_BASE \
33 --sysconfdir=$SYSCONF_DIR \
35 --with-scriptdir=$SCRIPT_DIR \
36 --with-working-dir=$WORKING_DIR \
37 --with-subsys-dir=/var/lock/subsys \
38 --with-pid-dir=/var/run \
42 --enable-client-only \
48 if [ -d $TMPINSTALLDIR ]; then
53 make DESTDIR=$TMPINSTALLDIR install
55 # copy additional files to install-dir
59 # change conf-files that they won't be overwritten by install
61 cd $TMPINSTALLDIR/$SYSCONF_DIR
67 # cd back to my start-dir
71 #cp prototype.master prototype
72 sed -e "s|__PKGSOURCE__|$CWD|" prototype.master > prototype
74 pkgproto $TMPINSTALLDIR/$INSTALL_BASE=. >> prototype
76 pkgmk -o -d /tmp -b $TMPINSTALLDIR/$INSTALL_BASE -f prototype
79 pkgtrans /tmp bacula-$VERSION.pkg Bacula
80 echo "Package has been created in /tmp"