diff --git a/dev/pkgbuild-macosx.sh b/dev/pkgbuild-macosx.sh index e7492e5..5d953e4 100755 --- a/dev/pkgbuild-macosx.sh +++ b/dev/pkgbuild-macosx.sh @@ -374,7 +374,6 @@ you're facing. EOM - # ==================== # # Create Mac OS X disk # # ==================== # diff --git a/dev/pkgcheck-macosx.sh b/dev/pkgcheck-macosx.sh index 6d8029d..f98568a 100755 --- a/dev/pkgcheck-macosx.sh +++ b/dev/pkgcheck-macosx.sh @@ -17,6 +17,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # +# ------------------------------------------------------------------------- +# +# This script checks the ctools Mac OS X package by installing it into the +# /usr/local/gamma directory and running the Python tests. +# # ========================================================================== # ============================================= # @@ -53,27 +58,17 @@ if [ -d "$INSTALLDIR" ]; then fi -# ====================== # -# Clean package creation # -# ====================== # -#umount $WRKDIR -#rm -rf $WRKDIR - - -# ============================= # -# Create package directory tree # -# ============================= # -#mkdir -p $WRKDIR +# ======================= # +# Clean working directory # +# ======================= # +rm -rf $WRKDIR -# ================================= # -# Create Mac OS X RAM disk (488 MB) # -# ================================= # -#DEVICE=$(hdiutil attach ram://1000000 -nomount) -#diskutil erasevolume HFS+ 'ctools-test' $DEVICE -#umount -f /Volumes/ctools-test -#sudo diskutil enableOwnership $DEVICE -#mount -t hfs $DEVICE $WRKDIR +# ====================================== # +# Create and step into working directory # +# ====================================== # +mkdir -p $WRKDIR +cd $WRKDIR # =============== # @@ -96,27 +91,20 @@ source $CTOOLS/bin/ctools-init.sh # ============ # # Test package # # ============ # -python -c 'import gammalib; gammalib.test()' -python -c 'import ctools; ctools.test()' -python -c 'import cscripts; cscripts.test()' +python -c 'import gammalib; gammalib.test()' | tee -a $LOGFILE +python -c 'import ctools; ctools.test()' | tee -a $LOGFILE +python -c 'import cscripts; cscripts.test()' | tee -a $LOGFILE # ======================= # # Clean package directory # # ======================= # -#rm -rf $INSTALLDIR +sudo rm -rf $INSTALLDIR # ============================== # # Recover installation directory # # ============================== # -#if [ -d "$INSTALLDIR.backup" ]; then -# mv $INSTALLDIR.backup $INSTALLDIR -#fi - - -# =============== # -# Detach RAM disk # -# =============== # -#hdiutil detach $WRKDIR - +if [ -d "$INSTALLDIR.backup" ]; then + mv $INSTALLDIR.backup $INSTALLDIR +fi diff --git a/src/ctools-setup.in b/src/ctools-setup.in index 6341bb6..235e3d6 100644 --- a/src/ctools-setup.in +++ b/src/ctools-setup.in @@ -26,23 +26,23 @@ fi # # Set parameters # ============== -prefix="@prefix@" -exec_prefix="@exec_prefix@" -ctools_bin="@bindir@" -ctools_lib="@libdir@" -python_dir="@pythondir@" -python_exec_dir="@pyexecdir@" -pkgconfig_dir="@libdir@/pkgconfig" -man_dir="@datadir@/doc/ctools/man" -caldb_dir="@datadir@/caldb" -#prefix="$CTOOLS" -#ctools_bin="$CTOOLS/bin" -#ctools_lib="$CTOOLS/lib" +#prefix="@prefix@" +#exec_prefix="@exec_prefix@" +#ctools_bin="@bindir@" +#ctools_lib="@libdir@" #python_dir="@pythondir@" #python_exec_dir="@pyexecdir@" -#pkgconfig_dir="$CTOOLS/lib/pkgconfig" -#man_dir="$CTOOLS/share/doc/ctools/man" -#caldb_dir="$CTOOLS/share/caldb" +#pkgconfig_dir="@libdir@/pkgconfig" +#man_dir="@datadir@/doc/ctools/man" +#caldb_dir="@datadir@/caldb" +prefix="$CTOOLS" +ctools_bin="$CTOOLS/bin" +ctools_lib="$CTOOLS/lib" +python_dir="@pythondir@" +python_exec_dir="@pyexecdir@" +pkgconfig_dir="$CTOOLS/lib/pkgconfig" +man_dir="$CTOOLS/share/doc/ctools/man" +caldb_dir="$CTOOLS/share/caldb" uname_system=`uname` #