osx: target 10.9 (a free upgrade to anyone using 10.6+) from now on.
This commit is contained in:
parent
2b45194f4b
commit
6e255a9503
|
@ -1,27 +1,35 @@
|
|||
#!/bin/bash
|
||||
# Building the installer is only tested and supported on 10.7 with Xcode 4.2.1
|
||||
# Built package targets 10.6, 10.7 and 10.8
|
||||
# Building should also work on other versions, YMMV
|
||||
# Building the installer is only tested and supported on 10.9 with Xcode 5.0.1
|
||||
# Command line tools for Xcode required, isntall with "xcode-select --install"
|
||||
# PackageMaker comes from Auxiliary Tools for Xcode - Late July 2012
|
||||
# Download from https://developer.apple.com/downloads/index.action?name=packagemaker#
|
||||
# Built package targets 10.9+
|
||||
# Building should also work on older versions with older revisions or slight changes, YMMV
|
||||
|
||||
set -ex
|
||||
test -x ./configure || ./bootstrap
|
||||
BUILDPATH=${PWD}
|
||||
|
||||
# Use new locations for SDK on 10.8 with Xcode 4.6 (?)
|
||||
# Use new locations for SDK on 10.8+
|
||||
OSX_RELEASE=`sw_vers -productVersion`
|
||||
case ${OSX_RELEASE:0:4} in
|
||||
"10.8")
|
||||
SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"
|
||||
PKGMAKER="/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"
|
||||
PKGMAKER="/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"
|
||||
export CFLAGS="-isysroot $SYSROOT -arch x86_64 -mmacosx-version-min=10.8"
|
||||
;;
|
||||
"10.9")
|
||||
SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
|
||||
PKGMAKER="/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"
|
||||
export CFLAGS="-isysroot $SYSROOT -arch x86_64 -mmacosx-version-min=10.9"
|
||||
;;
|
||||
*)
|
||||
SYSROOT="/Developer/SDKs/MacOSX10.6.sdk"
|
||||
PKGMAKER="/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"
|
||||
export CFLAGS="-isysroot $SYSROOT -arch x86_64 -mmacosx-version-min=10.6"
|
||||
;;
|
||||
esac
|
||||
|
||||
export CFLAGS="-isysroot $SYSROOT -arch i386 -arch x86_64 -mmacosx-version-min=10.6"
|
||||
|
||||
export SED=/usr/bin/sed
|
||||
PREFIX=/Library/OpenSC
|
||||
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
|
||||
|
@ -66,22 +74,6 @@ if ! test -e OpenSC.tokend; then
|
|||
git clone http://github.com/OpenSC/OpenSC.tokend.git
|
||||
fi
|
||||
|
||||
# Fetch binary dependencies
|
||||
if ! test -f build-10.6.tar.gz; then
|
||||
curl -O https://www.opensc-project.org/downloads/build-10.6.tar.gz
|
||||
fi
|
||||
|
||||
# Check for correctness
|
||||
if ! test $(md5 -q build-10.6.tar.gz) == "5686fb4dda6e9f1f07d06293a25fdd37"; then
|
||||
echo "MD5 of binary components does not match!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Unpack the binary building components
|
||||
if ! test -e OpenSC.tokend/build; then
|
||||
tar -C OpenSC.tokend -xzvf build-10.6.tar.gz
|
||||
fi
|
||||
|
||||
# Create the symlink to OpenSC sources
|
||||
test -L OpenSC.tokend/build/opensc-src || ln -sf ${BUILDPATH}/src OpenSC.tokend/build/opensc-src
|
||||
|
||||
|
@ -98,7 +90,7 @@ cp MacOSX/opensc-uninstall target/usr/local/bin
|
|||
${PKGMAKER} \
|
||||
-r target \
|
||||
-o OpenSC-@PACKAGE_VERSION@.pkg \
|
||||
-t "OpenSC @PACKAGE_VERSION@ for Mac OS X 10.6+" \
|
||||
-t "OpenSC @PACKAGE_VERSION@ for Mac OS X 10.9+" \
|
||||
-i org.opensc-project.mac \
|
||||
-n @PACKAGE_VERSION@ \
|
||||
-g 10.4 \
|
||||
|
@ -111,4 +103,4 @@ ${PKGMAKER} \
|
|||
# Create .dmg
|
||||
rm -f OpenSC-@PACKAGE_VERSION@.dmg
|
||||
TIMESTAMP=$(date +%Y.%m.%d)
|
||||
hdiutil create -srcfolder OpenSC-@PACKAGE_VERSION@.pkg -volname "OpenSC @PACKAGE_VERSION@ for Mac OS X 10.6+ (${TIMESTAMP})" OpenSC-@PACKAGE_VERSION@.dmg
|
||||
hdiutil create -srcfolder OpenSC-@PACKAGE_VERSION@.pkg -volname "OpenSC @PACKAGE_VERSION@ for Mac OS X 10.9+ (${TIMESTAMP})" OpenSC-@PACKAGE_VERSION@.dmg
|
||||
|
|
Binary file not shown.
|
@ -13,7 +13,7 @@
|
|||
|
||||
|
||||
<h1>OpenSC, version @PACKAGE_VERSION@</h1>
|
||||
<p>for Mac OS X 10.6+</p>
|
||||
<p>for Mac OS X 10.9+</p>
|
||||
|
||||
<p>OpenSC provides a set of libraries and utilities to work with smart cards. Its main focus is on cards that support cryptographic operations, and facilitate their use in security applications such as authentication, mail encryption and digital signatures.</p>
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ if ( $ENV{OS_INSTALL} == 1) {
|
|||
}
|
||||
|
||||
DO_CHECKS: {
|
||||
# 10.6.8 or higher system must be active
|
||||
if(CheckVersion("$SYSTEM_VERS", "10.6.8", "ProductVersion", "<")) {
|
||||
# 10.9 or higher system must be active
|
||||
if(CheckVersion("$SYSTEM_VERS", "10.9", "ProductVersion", "<")) {
|
||||
$EXIT_VALUE = ((1 << 6) | ( 1 << 5 ) | 17 );
|
||||
last;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue