Diff

Differences From Artifact [ba9acb7d77]:

To Artifact [2b8374712c]:


     1      1   #!/bin/bash
     2      2   # Shell Script to make Mac OS X Releases of CACKey
     3      3   # Kenneth Van Alstyne
     4      4   # kenneth.l.vanalstyne@usace.army.mil
     5         -# 20100712
     6      5   CACKEY_VERSION=`cat configure.ac | grep AC_INIT | cut -d " " -f 2 | sed 's_)__'`
     7      6   
     8      7   # Usage function
     9      8   usage() {
    10      9   	echo "Usage: build_osx.sh <target>"
    11     10   	echo Where target is one of:
    12     11   	echo "    panther  - (Builds 10.3 Library for PPCG3)"
................................................................................
    53     52   
    54     53   # Build function for Panther
    55     54   panther() {
    56     55   	makedir
    57     56   	HEADERS=/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
    58     57   	LIBRARY=/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/PCSC.framework/PCSC
    59     58   	OSX=Panther
           59  +	PKTARGETOS=1
           60  +	NEXTOSXVER=10.4
           61  +	CUROSXVER=10.3
    60     62   	HOST=powerpc-apple-darwin7
    61     63   	make distclean
    62     64   	ARCH="ppc -mcpu=G3"
    63     65   	CFLAGS="-arch ${ARCH}" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST}
    64     66   	make
    65     67   	cp libcackey.dylib macbuild/${OSX}/libcackey.dylib
    66     68   	cp libcackey_g.dylib macbuild/${OSX}/libcackey_g.dylib
................................................................................
    73     75   	HEADERS=/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
    74     76   	LIBRARY=/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/PCSC.framework/PCSC
    75     77   	LIB=""
    76     78   	ARCHLIST=""
    77     79   	DLIB=""
    78     80   	DARCHLIST=""
    79     81   	OSX=Tiger
           82  +	PKTARGETOS=2
           83  +	NEXTOSXVER=10.5
           84  +	CUROSXVER=10.4
    80     85   	for HOST in powerpc-apple-darwin8 i386-apple-darwin8; do
    81     86   		genbuild
    82     87   	done
    83     88   	libbuild
    84     89   	pkgbuild
    85     90   }
    86     91   
................................................................................
    90     95   	HEADERS=/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
    91     96   	LIBRARY=/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/PCSC.framework/PCSC
    92     97   	LIB=""
    93     98   	ARCHLIST=""
    94     99   	DLIB=""
    95    100   	DARCHLIST=""
    96    101   	OSX=Leopard
          102  +	PKTARGETOS=3
          103  +	NEXTOSXVER=10.6
          104  +	CUROSXVER=10.5
    97    105   	for HOST in powerpc-apple-darwin9 i386-apple-darwin9; do
    98    106   		genbuild
    99    107   	done
   100    108   	libbuild
   101    109   	pkgbuild
   102    110   }
   103    111   
................................................................................
   107    115   	HEADERS=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
   108    116   	LIBRARY=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/PCSC
   109    117   	LIB=""
   110    118   	ARCHLIST=""
   111    119   	DLIB=""
   112    120   	DARCHLIST=""
   113    121   	OSX=SnowLeopard
          122  +	PKTARGETOS=3
          123  +	NEXTOSXVER=10.7
          124  +	CUROSXVER=10.6
   114    125   	for HOST in i386-apple-darwin10 x86_64-apple-darwin10; do
   115    126   		genbuild
   116    127   	done
   117    128   	libbuild
   118    129   	pkgbuild
   119    130   }
   120    131   
................................................................................
   151    162   # Function to build Mac OS X Packages
   152    163   pkgbuild() {
   153    164   	rm -f build/cackey_osx_build/cackey.dylib
   154    165   	ln macbuild/${OSX}/libcackey.dylib build/cackey_osx_build/cackey.dylib
   155    166   	for PMDOC in build/cackey_osx_build/${OSX}_pmbuild.pmdoc/*.in; do
   156    167   		PMDOC="`echo "${PMDOC}" | sed 's_.in__g'`"
   157    168   		sed "s|@@BUILDROOTDIR@@|$(pwd)|g" ${PMDOC}.in > ${PMDOC}
          169  +		sed "s|@@OSXVERSION@@|${OSX}|g" ${PMDOC}.in > ${PMDOC}
          170  +		sed "s|@@UUID@@|${UUID}|g" ${PMDOC}.in > ${PMDOC}
          171  +		sed "s|@@TARGETOS@@|${PKTARGETOS}|g" ${PMDOC}.in > ${PMDOC}
          172  +		sed "s|@@NEXTOSXVER@@|${NEXTOSXVER}|g" ${PMDOC}.in > ${PMDOC}
          173  +		sed "s|@@CUROSXVER@@|${CUROSXVER}|g" ${PMDOC}.in > ${PMDOC}
   158    174   	done
   159    175   	if [ ${OSX} == "Panther" ]; then
   160    176   		EXT=mpkg
   161    177   	else
   162    178   		EXT=pkg
   163    179   	fi
   164    180   	/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -d build/cackey_osx_build/${OSX}_pmbuild.pmdoc -o macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}