Finish afscell implementation work
[openafs.git] / src / packaging / MacOS / buildpkg.sh.in
index 9c1e272..0dc9ac3 100644 (file)
@@ -125,13 +125,13 @@ if [ $firstpass = yes ]; then
     cp $CURDIR/CellServDB $PKGROOT/private/var/db/openafs/etc/CellServDB.master
     echo grand.central.org > $PKGROOT/private/var/db/openafs/etc/ThisCell.sample
     if [ $majorvers -ge 7 ]; then
-       echo /afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
+       echo /afs:/var/db/openafs/cache:100000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
         cp -RP $PKGROOT/Library/OpenAFS/Tools/etc/afssettings $PKGROOT/private/var/db/openafs/etc/config
        cp settings.plist $PKGROOT/private/var/db/openafs/etc/config/settings.plist.orig
     else
        echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
     fi
-    echo '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > $PKGROOT/private/var/db/openafs/etc/config/afsd.options.sample
+    cp afs.conf $PKGROOT/private/var/db/openafs/etc/config/afs.conf.sample
 
     strip -X -S $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
 
@@ -210,14 +210,6 @@ if [ $secondpass = yes ]; then
     cp CellServDB.list $PKGRES
     chown -R root${SEP}wheel $PKGRES
     rm -rf $CURDIR/OpenAFS.pkg
-
-    # once we have cm cleanup in 10.4 this can go
-    if [ $majorvers -le 8 ]; then
-       cat $RESSRC/OpenAFS.info|sed 's/RequiresReboot NO/RequiresReboot YES/'>$RESSRC/OpenAFS.info.new
-       rm -f $RESSRC/OpenAFS.info
-       mv $RESSRC/OpenAFS.info.new $RESSRC/OpenAFS.info
-    fi
-
     if [ $majorvers -ge 7 ]; then
        echo $package -build -p $CURDIR/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
            -i OpenAFS.Info.plist -d OpenAFS.Description.plist
@@ -237,9 +229,26 @@ if [ $secondpass = yes ]; then
     fi
 
     rm -rf $PKGROOT $PKGRES
+
+    # here we want to build installer plugin and install
+    # for Tiger and later only
+    if [ $majorvers -ge 8 ]; then
+       AFSCELLBUNDLE=$BINDEST/installer/afscell.bundle
+       cd $CURDIR
+       if [ -d $AFSCELLBUNDLE -a -f $BINDEST/installer/InstallerSections.plist ]; then
+           mkdir -p $CURDIR/OpenAFS.pkg/Contents/Plugins
+           cp -R $AFSCELLBUNDLE $CURDIR/OpenAFS.pkg/Contents/Plugins
+           cp $BINDEST/installer/InstallerSections.plist $CURDIR/OpenAFS.pkg/Contents/Plugins
+       else
+           echo "afscell.bundle not built successfully"
+           echo "... or InstallerSections.plist file not found"
+           exit 1
+       fi
+    fi
+
     mkdir $CURDIR/dmg
     mv $CURDIR/OpenAFS.pkg $CURDIR/dmg
-    rm -rf $CURDIR/OpenAFS.dmg
+    rm -rf $CURDIR/OpenAFS-@VERSION@-$RELNAME.dmg
     cp Uninstall $CURDIR/dmg/Uninstall.command
     cp DS_Store $CURDIR/dmg/.DS_Store
     mkdir $CURDIR/dmg/.background