source: trunk/macosx_install_kit/build_mac_kit.sh @ 1822

Revision 1247, 1.6 KB checked in by Freddie Akeroyd, 3 years ago (diff)

Final tidy ups of mac kit (remove packaged .svn files). Refs #175.

  • Property svn:executable set to *
Line 
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
7echo "Removing old package root (require root privileges)"
8test -d package_root && sudo rm -fr package_root
9
10cd ..
11echo "Building NeXus"
12make distclean # needed as we disable dependency tracking
13arch_flags="-arch i386 -arch ppc"
14export MACOSX_DEPLOYMENT_TARGET=10.4
15env 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
21make
22make install DESTDIR=`pwd`/macosx_install_kit/package_root
23cp InstallerBits/Licences/*.txt macosx_install_kit/package_root/usr/local/share/nexus
24
25cd macosx_install_kit
26
27# Use pkg.config to fetch the package name and version number
28. pkg.config
29rm -rf "$PACKAGE.pkg" "$PACKAGE-$VERSION$RELEASE"
30
31cp ../NEWS Resources/English.lproj/ReadMe.txt
32
33echo "Building the package (requires root to set permissions)"
34ROOT=package_root bin/makepkg.sh pkg.config
35
36echo "Building the disk image"
37bin/dmgpack.sh "$PACKAGE-$VERSION$RELEASE" ReadMe.txt "$PACKAGE.pkg"
38
39echo "Enabling internet install"
40hdiutil internet-enable -yes "$PACKAGE-$VERSION$RELEASE.dmg"
41
42echo "Cleaning NeXus build (as we configured without dependency tracing)"
43( cd ..; make distclean; ) > /dev/null
44
45echo "Removing temporary files (requires root to clear)"
46#sudo rm -fr package_root
47#rm -rf "$PACKAGE.pkg"
Note: See TracBrowser for help on using the repository browser.