2 # $Heimdal: mac.sh 22177 2007-12-05 01:43:30Z lha $
6 base
=`cd $dbase && pwd`
7 config
=${base}/..
/..
/configure
10 builddir
=`pwd`/builddir
13 rm -rf ${destdir} ${builddir} ${imgdir} ||
exit 1
14 mkdir
${destdir} ||
exit 1
15 mkdir
${builddir} ||
exit 1
16 mkdir
${imgdir} ||
exit 1
18 cd ${builddir} ||
exit 1
20 version
=`sh ${config} --help 2>/dev/null | head -1 | sed 's/.*Heimdal \([^ ]*\).*/\1/'`
22 echo "Building Mac universal binary package for Heimdal ${version}"
25 CFLAGS
="-arch i386 -arch ppc" \
26 LDFLAGS
="-arch i386 -arch ppc" \
27 ${config} > log ||
exit 1
29 make all
> /dev
/null ||
exit 1
30 echo "Run regression suite"
31 make check
> /dev
/null ||
exit 1
33 make install DESTDIR
=${destdir} > /dev
/null ||
exit 1
36 /Developer
/usr
/bin
/packagemaker \
37 --version "${version}" \
39 --info ${base}/Info.plist \
40 --out ${imgdir}/Heimdal.pkg \
41 --resources ${base}/Resources \
42 --domain system ||
exit 1
45 echo "Build disk image"
46 rm "heimdal-${version}.dmg"
47 /usr
/bin
/hdiutil create
-volname "Heimdal-${version}" -srcfolder ${imgdir} "heimdal-${version}.dmg" ||
exit 1
50 rm -rf ${destdir} ${builddir} ${imgdir} ||
exit 1