| 1 | #!/bin/sh |
|---|
| 2 | # at the moment hdf4 only support -arch i386 -arch ppc |
|---|
| 3 | # and nexus tests fail if hdf5 is build with -arch x86_64 -arch ppc64 |
|---|
| 4 | # so leave as just "-arch i386 -arch ppc" for the moment |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | echo "Removing old package root (require root privileges)" |
|---|
| 8 | test -d package_root && sudo rm -fr package_root |
|---|
| 9 | |
|---|
| 10 | cd .. |
|---|
| 11 | echo "Building NeXus" |
|---|
| 12 | make distclean # needed as we disable dependency tracking |
|---|
| 13 | arch_flags="-arch i386 -arch ppc" |
|---|
| 14 | export MACOSX_DEPLOYMENT_TARGET=10.4 |
|---|
| 15 | env CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $arch_flags" \ |
|---|
| 16 | CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $arch_flags" \ |
|---|
| 17 | LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk $arch_flags" \ |
|---|
| 18 | ./configure --with-hdf4=/usr/local/hdf4.2r4 \ |
|---|
| 19 | --with-hdf5=/usr/local/hdf5-1.8.2 --with-python \ |
|---|
| 20 | --disable-dependency-tracking |
|---|
| 21 | make |
|---|
| 22 | make install DESTDIR=`pwd`/macosx_install_kit/package_root |
|---|
| 23 | cp InstallerBits/Licences/*.txt macosx_install_kit/package_root/usr/local/share/nexus |
|---|
| 24 | |
|---|
| 25 | cd macosx_install_kit |
|---|
| 26 | |
|---|
| 27 | # Use pkg.config to fetch the package name and version number |
|---|
| 28 | . pkg.config |
|---|
| 29 | rm -rf "$PACKAGE.pkg" "$PACKAGE-$VERSION$RELEASE" |
|---|
| 30 | |
|---|
| 31 | cp ../NEWS Resources/English.lproj/ReadMe.txt |
|---|
| 32 | |
|---|
| 33 | echo "Building the package (requires root to set permissions)" |
|---|
| 34 | ROOT=package_root bin/makepkg.sh pkg.config |
|---|
| 35 | |
|---|
| 36 | echo "Building the disk image" |
|---|
| 37 | bin/dmgpack.sh "$PACKAGE-$VERSION$RELEASE" ReadMe.txt "$PACKAGE.pkg" |
|---|
| 38 | |
|---|
| 39 | echo "Enabling internet install" |
|---|
| 40 | hdiutil internet-enable -yes "$PACKAGE-$VERSION$RELEASE.dmg" |
|---|
| 41 | |
|---|
| 42 | echo "Cleaning NeXus build (as we configured without dependency tracing)" |
|---|
| 43 | ( cd ..; make distclean; ) > /dev/null |
|---|
| 44 | |
|---|
| 45 | echo "Removing temporary files (requires root to clear)" |
|---|
| 46 | #sudo rm -fr package_root |
|---|
| 47 | #rm -rf "$PACKAGE.pkg" |
|---|