macos-packaging-fixes-20060323
authorDerrick Brashear <shadow@dementia.org>
Thu, 23 Mar 2006 16:07:30 +0000 (16:07 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 23 Mar 2006 16:07:30 +0000 (16:07 +0000)
update to make sure we have a cellservdb, that we shut down afs before an upgrade, and install the universal binary build script

src/packaging/MacOS/OpenAFS.post_install
src/packaging/MacOS/OpenAFS.pre_upgrade
src/packaging/MacOS/buildpkg.sh
src/packaging/MacOS/universal.sh [new file with mode: 0755]

index a7c42f9..88e3e9f 100644 (file)
@@ -47,7 +47,7 @@ if [ ! -f CellServDB -a -f CellServDB.save -a -f CellServDB.master.last ]; then
 fi
 
 # upgrading between 2 post-1.2.7 releases (or the testing case)
-if [ -f CellServDB.master.last ]; then
+if [ -f CellServDB.master.last -a  -f CellServDB ]; then
   if cmp -s CellServDB.master.last CellServDB.master ; then
     echo No CellServDB updates
     done=1
index 43056e7..7925519 100644 (file)
@@ -22,3 +22,5 @@ if [ -f config/afsd.options -a -f config/afsd.options.sample ]; then
     rm -f config/afsd.options
   fi
 fi
+
+/Library/StartupItems/OpenAFS/OpenAFS stop
index 788229e..18bbfb3 100644 (file)
@@ -112,9 +112,7 @@ if [ $firstpass = yes ]; then
     if [ $majorvers -ge 7 ]; then
        echo /afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
        (cd $CURDIR && \
-       make -f $RESSRC/Makefile AFSINCLUDE="-I$BINDEST/include" && \
-       cp afssettings $PKGROOT/private/var/db/openafs/etc/config && \
-       make -f $RESSRC/Makefile clean)
+       cp 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
@@ -145,6 +143,9 @@ if [ $firstpass = yes ]; then
 
     ln -s ../../Library/OpenAFS/Tools/root.client/usr/vice/etc/afsd $PKGROOT/usr/sbin/afsd
 
+    mkdir -p $PKGROOT/Library/Kerberos\ Plug-Ins
+    ln -s ../../Library/OpenAFS/Tools/root.client/Library/Kerberos\ Plug-Ins/aklog.loginLogout $PKGROOT/Library/Kerberos\ Plug-Ins/
+
     chown -R root${SEP}wheel $PKGROOT/usr
     chmod -R og-w $PKGROOT/usr
 fi
diff --git a/src/packaging/MacOS/universal.sh b/src/packaging/MacOS/universal.sh
new file mode 100755 (executable)
index 0000000..5eeb227
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+    echo Usage: universal topdir
+    exit 1
+fi
+
+BINDEST=`cd $1 && pwd`
+CURDIR=`pwd`
+majorvers=`uname -r | sed 's/\..*//'`
+
+DIRLIST="root.server/usr/afs/bin bin etc lib root.client/usr/vice/etc/afsd root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs"
+mkdir $CURDIR/u_darwin_80
+
+(cd $BINDEST/ppc_darwin_80; tar cf - .)|(cd $CURDIR/u_darwin_80; tar xf -)
+(cd $BINDEST/x86_darwin_80; tar cf - .)|(cd $CURDIR/u_darwin_80; tar xf -)
+
+for d in $DIRLIST; do
+    for f in `cd $CURDIR/u_darwin_80/dest && find $d -type f -print`; do
+       /bin/rm -f $CURDIR/u_darwin_80/dest/$f
+       lipo $BINDEST/ppc_darwin_80/dest/$f $BINDEST/x86_darwin_80/dest/$f -create -output $CURDIR/u_darwin_80/dest/$f
+    done
+done