Index: build/cackey_osx_build/Template_pmbuild/02libcackey.xml.in ================================================================== --- build/cackey_osx_build/Template_pmbuild/02libcackey.xml.in +++ build/cackey_osx_build/Template_pmbuild/02libcackey.xml.in @@ -1,8 +1,8 @@ - mil.army.usace.cackeyForMacOsX@@OSXVERSION@@.libcackeyg.pkg + mil.army.usace.cackeyForMacOsX@@OSXVERSION@@.@@LIBCACKEYG@@ 1 ../../macbuild/@@OSXVERSION@@/libcackey_g.dylib Index: build/cackey_osx_build/Template_pmbuild/index.xml.in ================================================================== --- build/cackey_osx_build/Template_pmbuild/index.xml.in +++ build/cackey_osx_build/Template_pmbuild/index.xml.in @@ -15,11 +15,11 @@ - + Index: build/cackey_osx_build/build_osx.sh ================================================================== --- build/cackey_osx_build/build_osx.sh +++ build/cackey_osx_build/build_osx.sh @@ -26,26 +26,31 @@ make distclean } # Directory creation function makedir() { + if [ "`uname -r | cut -d . -f 1`" -lt "10" ]; then + LIBTOOLDIR=/Developer/usr/share/libtool + else + LIBTOOLDIR=/Developer/usr/share/libtool/config + fi if [ ! -d macbuild ]; then mkdir macbuild mkdir macbuild/Panther mkdir macbuild/Tiger mkdir macbuild/Leopard mkdir macbuild/Snowleopard mkdir macbuild/pkg fi if [ ! -f config.guess ]; then - cp /Developer/usr/share/libtool/config.guess . + cp ${LIBTOOLDIR}/config.guess . fi if [ ! -f config.sub ]; then - cp /Developer/usr/share/libtool/config.sub . + cp ${LIBTOOLDIR}/config.sub . fi if [ ! -f install-sh ]; then - cp /Developer/usr/share/libtool/install-sh . + cp ${LIBTOOLDIR}/install-sh . fi } # Build function for Panther panther() { @@ -114,11 +119,15 @@ LIB="" ARCHLIST="" DLIB="" DARCHLIST="" OSX=Snowleopard - PKTARGETOS=3 + if [ "`uname -r | cut -d . -f 1`" -lt "10" ]; then + PKTARGETOS=3 + else + PKTARGETOS=4 + fi NEXTOSXVER=10.7 CUROSXVER=10.6 for HOST in i386-apple-darwin10 x86_64-apple-darwin10; do genbuild done @@ -156,10 +165,15 @@ rm macbuild/${OSX}/libcackey*.dylib.* } # Function to build Mac OS X Packages pkgbuild() { + if [ "`uname -r | cut -d . -f 1`" -lt "10" ]; then + LIBCACKEYG=libcackeyg.pkg + else + LIBCACKEYG=libcackey_g.pkg + fi rm -f build/cackey_osx_build/cackey.dylib ln macbuild/${OSX}/libcackey.dylib build/cackey_osx_build/cackey.dylib for PMDOC in build/cackey_osx_build/Template_pmbuild/*.in; do PMDOC="`echo "${PMDOC}" | sed 's|l.in|l|g' | sed 's|build/cackey_osx_build/Template_pmbuild/||g'`" UUID="`python -c 'import uuid; print uuid.uuid1()' | dd conv=ucase 2>/dev/null`" @@ -168,10 +182,12 @@ sed "s|@@OSXVERSION@@|${OSX}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 sed "s|@@UUID@@|${UUID}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} sed "s|@@TARGETOS@@|${PKTARGETOS}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 sed "s|@@NEXTOSXVER@@|${NEXTOSXVER}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} sed "s|@@CUROSXVER@@|${CUROSXVER}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 + sed "s|@@LIBCACKEYG@@|${LIBCACKEYG}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} + cp build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} done if [ ${OSX} == "Panther" ]; then EXT=mpkg cat build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml | grep -v -i require > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new @@ -226,10 +242,12 @@ ./autogen.sh panther tiger leopard snowleopard + echo "" + echo "All builds complete." exit $? ;; "clean") clean