Diff

Differences From Artifact [9f47b8a584]:

To Artifact [ee098bd5fc]:


    16     16   	echo "    clean - (Cleans up)"
    17     17   	echo "Run from CACKey Build Root."
    18     18   	exit $?
    19     19   }
    20     20   
    21     21   # Clean up function
    22     22   clean() {
    23         -	for PMDOC in build/cackey_osx_build/*_pmbuild.pmdoc/*.in; do
    24         -		PMDOC="`echo "${PMDOC}" | sed 's_.in__g'`"
    25         -		rm -f "${PMDOC}"
    26         -	done
    27     23   	rm -f build/cackey_osx_build/cackey.dylib
    28     24   	rm -rf macbuild
           25  +	rm -rf build/cackey_osx_build/*.pmdoc
    29     26   	make distclean
    30     27   }
    31     28   
    32     29   # Directory creation function
    33     30   makedir() {
    34     31   	if [ ! -d macbuild ]; then
    35     32   		mkdir macbuild
    36     33   		mkdir macbuild/Panther
    37     34   		mkdir macbuild/Tiger
    38     35   		mkdir macbuild/Leopard
    39         -		mkdir macbuild/SnowLeopard
           36  +		mkdir macbuild/Snowleopard
    40     37   		mkdir macbuild/pkg
    41     38   	fi
    42     39   	if [ ! -f config.guess ]; then
    43     40   		cp /Developer/usr/share/libtool/config.guess .
    44     41   	fi
    45     42   	if [ ! -f config.sub ]; then
    46     43   		cp /Developer/usr/share/libtool/config.sub .
................................................................................
   114    111   	makedir
   115    112   	HEADERS=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
   116    113   	LIBRARY=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/PCSC
   117    114   	LIB=""
   118    115   	ARCHLIST=""
   119    116   	DLIB=""
   120    117   	DARCHLIST=""
   121         -	OSX=SnowLeopard
          118  +	OSX=Snowleopard
   122    119   	PKTARGETOS=3
   123    120   	NEXTOSXVER=10.7
   124    121   	CUROSXVER=10.6
   125    122   	for HOST in i386-apple-darwin10 x86_64-apple-darwin10; do
   126    123   		genbuild
   127    124   	done
   128    125   	libbuild
................................................................................
   159    156   	rm macbuild/${OSX}/libcackey*.dylib.*
   160    157   }
   161    158   
   162    159   # Function to build Mac OS X Packages
   163    160   pkgbuild() {
   164    161   	rm -f build/cackey_osx_build/cackey.dylib
   165    162   	ln macbuild/${OSX}/libcackey.dylib build/cackey_osx_build/cackey.dylib
   166         -	# When Template build is ready to go, change ${OSX} to Template in line below
   167         -	for PMDOC in build/cackey_osx_build/${OSX}_pmbuild.pmdoc/*.in; do
   168         -		PMDOC="`echo "${PMDOC}" | sed 's_.in__g'`"
          163  +	for PMDOC in build/cackey_osx_build/Template_pmbuild/*.in; do
          164  +		PMDOC="`echo "${PMDOC}" | sed 's|l.in|l|g' | sed 's|build/cackey_osx_build/Template_pmbuild/||g'`"
   169    165   		UUID="`python -c 'import uuid; print uuid.uuid1()' | dd conv=ucase 2>/dev/null`"
   170         -		sed "s|@@BUILDROOTDIR@@|$(pwd)|g" ${PMDOC}.in > ${PMDOC}
   171         -		sed "s|@@OSXVERSION@@|${OSX}|g" ${PMDOC}.in > ${PMDOC}
   172         -		sed "s|@@UUID@@|${UUID}|g" ${PMDOC}.in > ${PMDOC}
   173         -		sed "s|@@TARGETOS@@|${PKTARGETOS}|g" ${PMDOC}.in > ${PMDOC}
   174         -		sed "s|@@NEXTOSXVER@@|${NEXTOSXVER}|g" ${PMDOC}.in > ${PMDOC}
   175         -		sed "s|@@CUROSXVER@@|${CUROSXVER}|g" ${PMDOC}.in > ${PMDOC}
          166  +		mkdir -p build/cackey_osx_build/${OSX}_pmbuild.pmdoc
          167  +		sed "s|@@BUILDROOTDIR@@|$(pwd)|g" build/cackey_osx_build/Template_pmbuild/${PMDOC}.in > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
          168  +		sed "s|@@OSXVERSION@@|${OSX}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
          169  +		sed "s|@@UUID@@|${UUID}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
          170  +		sed "s|@@TARGETOS@@|${PKTARGETOS}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
          171  +		sed "s|@@NEXTOSXVER@@|${NEXTOSXVER}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
          172  +		sed "s|@@CUROSXVER@@|${CUROSXVER}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
          173  +		mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
   176    174   	done
   177    175   	if [ ${OSX} == "Panther" ]; then
   178    176   		EXT=mpkg
          177  +		cat build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml | grep -v -i require > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new
          178  +		mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml
   179    179   	else
   180    180   		EXT=pkg
   181    181   	fi
          182  +	if [ ${OSX} == "Snowleopard" ]; then
          183  +		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
          184  +	mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml
          185  +	fi
   182    186   	/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -d build/cackey_osx_build/${OSX}_pmbuild.pmdoc -o macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
   183    187   	tar --create --directory macbuild/pkg/ --file macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}.tar CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
   184    188   	gzip -9 macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}.tar
   185    189   	rm -rf macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
   186    190   	rm -f build/cackey_osx_build/cackey.dylib
   187    191   	echo "${OSX} build complete"
   188    192   }