Differences From Artifact [04fe9e319d]:
- Executable file build/cackey_osx_build/build_osx.sh — part of check-in [62f39ca124] at 2012-07-25 02:30:23 on branch dodcerts-on-seperate-slot — Merged from trunk (user: rkeene, size: 9744) [annotate] [blame] [check-ins using] [more...]
To Artifact [b98bcd81f7]:
- Executable file
build/cackey_osx_build/build_osx.sh
— part of check-in
[059330a9a5]
at
2011-08-25 04:00:27
on branch trunk
— Fixed bug in UUID of package
Added PKCS11.tokend package to CACKey on Mac OS X
Removed legacy (pre-Mac OS X 10.5) build support (user: rkeene, size: 8259) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
12 13 14 15 16 17 18 |
# Usage function
usage() {
echo "Usage: build_osx.sh <target>"
echo Where target is one of:
echo " leopard - (Builds Universal 10.5 Library for PPCG4/i386)"
echo " snowleopard - (Builds Universal 10.6 Library for i386/x86_64)"
echo " lion - (Builds Universal 10.7 Library for i386/x86_64)"
| < | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# Usage function
usage() {
echo "Usage: build_osx.sh <target>"
echo Where target is one of:
echo " leopard - (Builds Universal 10.5 Library for PPCG4/i386)"
echo " snowleopard - (Builds Universal 10.6 Library for i386/x86_64)"
echo " lion - (Builds Universal 10.7 Library for i386/x86_64)"
echo " all - (Builds for all supported targets)"
echo " clean - (Cleans up)"
echo "Run from CACKey Build Root."
exit $?
}
# Clean up function
|
| ︙ | ︙ | |||
41 42 43 44 45 46 47 | LIBTOOLDIR=/Developer/usr/share/libtool/config fi if [ ! -d macbuild ]; then mkdir macbuild mkdir macbuild/Leopard mkdir macbuild/Snowleopard mkdir macbuild/Lion | < | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
LIBTOOLDIR=/Developer/usr/share/libtool/config
fi
if [ ! -d macbuild ]; then
mkdir macbuild
mkdir macbuild/Leopard
mkdir macbuild/Snowleopard
mkdir macbuild/Lion
mkdir macbuild/pkg
fi
if [ ! -f config.guess ]; then
cp ${LIBTOOLDIR}/config.guess .
fi
if [ ! -f config.sub ]; then
cp ${LIBTOOLDIR}/config.sub .
|
| ︙ | ︙ | |||
115 116 117 118 119 120 121 | for HOST in i386-apple-darwin11 x86_64-apple-darwin11; do genbuild done libbuild pkgbuild } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
for HOST in i386-apple-darwin11 x86_64-apple-darwin11; do
genbuild
done
libbuild
pkgbuild
}
# Generic build function
genbuild() {
make distclean
ARCH=`echo ${HOST} | cut -d "-" -f 1`
if [ ${ARCH} == "powerpc" ]; then
if [ ${OSX} == "Leopard" ]; then
ARCH="ppc -mcpu=G4"
else
ARCH="ppc -mcpu=G3"
fi
fi
if [ "${LIONBUILD}" = 1 ]; then
if [ "${ARCH}" == "ppc -mcpu=G4" ]; then
CC=powerpc-apple-darwin11-gcc-4.2.1 CPP=powerpc-apple-darwin11-cpp-4.2.1 CFLAGS="-m32 -I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/powerpc-apple-darwin10/4.2.1/include -isysroot /Developer/SDKs/MacOSX10.5.sdk" CPPFLAGS="-D_LIBC_LIMITS_H_" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST}
else
CFLAGS="-arch ${ARCH}" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST}
fi
else
CFLAGS="-arch ${ARCH}" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST}
fi
make
cp libcackey.dylib macbuild/${OSX}/libcackey.dylib.`echo ${ARCH} | cut -d ' ' -f 1`
cp libcackey_g.dylib macbuild/${OSX}/libcackey_g.dylib.`echo ${ARCH} | cut -d ' ' -f 1`
}
# Library build function
|
| ︙ | ︙ | |||
234 235 236 237 238 239 240 |
mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
done
EXT=pkg
if [ ${OSX} == "Snowleopard" ]; then
cat build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml | sed 's|for Mac OS X Snowleopard|for Mac OS X SnowLeopard|g' > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new
mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml
fi
| < < < < | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
done
EXT=pkg
if [ ${OSX} == "Snowleopard" ]; then
cat build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml | sed 's|for Mac OS X Snowleopard|for Mac OS X SnowLeopard|g' > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new
mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml
fi
/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -d build/cackey_osx_build/${OSX}_pmbuild.pmdoc -o macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
tar --create --directory macbuild/pkg/ --file macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}.tar CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
gzip -9 macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}.tar
rm -rf macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
rm -f build/cackey_osx_build/cackey.dylib
rm -rf build/cackey_osx_build/PKCS11.tokend
echo "${OSX} build complete"
|
| ︙ | ︙ | |||
271 272 273 274 275 276 277 | ;; "lion") ./autogen.sh lion exit $? ;; | < < < < < < > | | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | ;; "lion") ./autogen.sh lion exit $? ;; "all") ./autogen.sh leopard snowleopard lion echo "" echo "All builds complete." exit $? ;; "clean") clean |
| ︙ | ︙ |