Debian Codegraph @

packages/mac/mac.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # $Id$
3
4 dbase=`dirnamescip-shell system . . dirname. $0`
5 base=`cd $dbase && pwdscip-shell system . . pwd.`
6 config=${base}/../../configure
7
8 destdir=`pwdscip-shell system . . pwd.`/destdir
9 builddir=`pwdscip-shell system . . pwd.`/builddir
10 imgdir=`pwdscip-shell system . . pwd.`/imgdir
11
12 rmscip-shell system . . rm. -rf ${destdir} ${builddir} ${imgdir} || exit 1
13 mkdirscip-shell system . . mkdir. ${destdir} || exit 1
14 mkdirscip-shell system . . mkdir. ${builddir} || exit 1
15 mkdirscip-shell system . . mkdir. ${imgdir} || exit 1
16
17 cd ${builddir} || exit 1
18
19 version=`shscip-shell system . . sh. ${config} --help 2>/dev/nullscip-shell filesystem . . `/dev/null`. | headscip-shell system . . head. -1 | sedscip-shell system . . sed. 's/.*Heimdal \([^ ]*\).*/\1/'`
20
21 echoscip-shell system . . echo. "Building Mac universal binary package for Heimdal ${version}"
22 echoscip-shell system . . echo. "Configure"
23 envscip-shell system . . env. \
24 CFLAGS="-arch i386 -arch x86_64" \
25 LDFLAGS="-arch i386 -arch x86_64" \
26 ${config} --disable-dependency-tracking > log || exit 1
27
28 echoscip-shell system . . echo. "Build"
29 envscip-shell system . . env. \
30 CODE_SIGN_IDENTITY="Developer ID Application:" \
31 make all > /dev/nullscip-shell filesystem . . `/dev/null`. || exit 1
32
33 echoscip-shell system . . echo. "Run regression suite"
34 makescip-shell system . . make. check > /dev/nullscip-shell filesystem . . `/dev/null`. || exit 1
35 echoscip-shell system . . echo. "Install"
36 makescip-shell system . . make. install DESTDIR=${destdir} > /dev/nullscip-shell filesystem . . `/dev/null`. || exit 1
37
38 echoscip-shell system . . echo. "Build package"
39 xcrun productbuild \
40 --identifier org.h5l.heimdal \
41 --version ${version} \
42 --root ${destdir} /scip-shell filesystem . . `/`. \
43 --resources ${base}/Resources \
44 --sign 'Developer ID Installer:' \
45 ${imgdir}/Heimdal-${version}.pkg
46
47 cd ..
48 echoscip-shell system . . echo. "Build disk image"
49 rmscip-shell system . . rm. "heimdal-${version}.dmg"
50 /usr/bin/hdiutilscip-shell filesystem . . `/usr/bin/hdiutil`. create -volname "Heimdal-${version}" -srcfolder ${imgdir} "heimdal-${version}.dmg" || exit 1
51
52 echoscip-shell system . . echo. "Clean"
53 rmscip-shell system . . rm. -rf ${destdir} ${builddir} ${imgdir} || exit 1
54
55 echoscip-shell system . . echo. "Done!"
56 exit 0