Commit 1bef7731f88310dc93be46b2d9485fa314c817b2

Authored by Jürgen Knödlseder
1 parent 0862c211

Put back usage of $CTOOLS in setup script (#1929)

dev/pkgbuild-macosx.sh
@@ -374,7 +374,6 @@ you're facing. @@ -374,7 +374,6 @@ you're facing.
374 EOM 374 EOM
375 375
376 376
377 -  
378 # ==================== # 377 # ==================== #
379 # Create Mac OS X disk # 378 # Create Mac OS X disk #
380 # ==================== # 379 # ==================== #
dev/pkgcheck-macosx.sh
@@ -17,6 +17,11 @@ @@ -17,6 +17,11 @@
17 # You should have received a copy of the GNU General Public License 17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # 19 #
  20 +# -------------------------------------------------------------------------
  21 +#
  22 +# This script checks the ctools Mac OS X package by installing it into the
  23 +# /usr/local/gamma directory and running the Python tests.
  24 +#
20 # ========================================================================== 25 # ==========================================================================
21 26
22 # ============================================= # 27 # ============================================= #
@@ -53,27 +58,17 @@ if [ -d &quot;$INSTALLDIR&quot; ]; then @@ -53,27 +58,17 @@ if [ -d &quot;$INSTALLDIR&quot; ]; then
53 fi 58 fi
54 59
55 60
56 -# ====================== #  
57 -# Clean package creation #  
58 -# ====================== #  
59 -#umount $WRKDIR  
60 -#rm -rf $WRKDIR  
61 -  
62 -  
63 -# ============================= #  
64 -# Create package directory tree #  
65 -# ============================= #  
66 -#mkdir -p $WRKDIR 61 +# ======================= #
  62 +# Clean working directory #
  63 +# ======================= #
  64 +rm -rf $WRKDIR
67 65
68 66
69 -# ================================= #  
70 -# Create Mac OS X RAM disk (488 MB) #  
71 -# ================================= #  
72 -#DEVICE=$(hdiutil attach ram://1000000 -nomount)  
73 -#diskutil erasevolume HFS+ 'ctools-test' $DEVICE  
74 -#umount -f /Volumes/ctools-test  
75 -#sudo diskutil enableOwnership $DEVICE  
76 -#mount -t hfs $DEVICE $WRKDIR 67 +# ====================================== #
  68 +# Create and step into working directory #
  69 +# ====================================== #
  70 +mkdir -p $WRKDIR
  71 +cd $WRKDIR
77 72
78 73
79 # =============== # 74 # =============== #
@@ -96,27 +91,20 @@ source $CTOOLS/bin/ctools-init.sh @@ -96,27 +91,20 @@ source $CTOOLS/bin/ctools-init.sh
96 # ============ # 91 # ============ #
97 # Test package # 92 # Test package #
98 # ============ # 93 # ============ #
99 -python -c 'import gammalib; gammalib.test()'  
100 -python -c 'import ctools; ctools.test()'  
101 -python -c 'import cscripts; cscripts.test()' 94 +python -c 'import gammalib; gammalib.test()' | tee -a $LOGFILE
  95 +python -c 'import ctools; ctools.test()' | tee -a $LOGFILE
  96 +python -c 'import cscripts; cscripts.test()' | tee -a $LOGFILE
102 97
103 98
104 # ======================= # 99 # ======================= #
105 # Clean package directory # 100 # Clean package directory #
106 # ======================= # 101 # ======================= #
107 -#rm -rf $INSTALLDIR 102 +sudo rm -rf $INSTALLDIR
108 103
109 104
110 # ============================== # 105 # ============================== #
111 # Recover installation directory # 106 # Recover installation directory #
112 # ============================== # 107 # ============================== #
113 -#if [ -d "$INSTALLDIR.backup" ]; then  
114 -# mv $INSTALLDIR.backup $INSTALLDIR  
115 -#fi  
116 -  
117 -  
118 -# =============== #  
119 -# Detach RAM disk #  
120 -# =============== #  
121 -#hdiutil detach $WRKDIR  
122 - 108 +if [ -d "$INSTALLDIR.backup" ]; then
  109 + mv $INSTALLDIR.backup $INSTALLDIR
  110 +fi
src/ctools-setup.in
@@ -26,23 +26,23 @@ fi @@ -26,23 +26,23 @@ fi
26 # 26 #
27 # Set parameters 27 # Set parameters
28 # ============== 28 # ==============
29 -prefix="@prefix@"  
30 -exec_prefix="@exec_prefix@"  
31 -ctools_bin="@bindir@"  
32 -ctools_lib="@libdir@"  
33 -python_dir="@pythondir@"  
34 -python_exec_dir="@pyexecdir@"  
35 -pkgconfig_dir="@libdir@/pkgconfig"  
36 -man_dir="@datadir@/doc/ctools/man"  
37 -caldb_dir="@datadir@/caldb"  
38 -#prefix="$CTOOLS"  
39 -#ctools_bin="$CTOOLS/bin"  
40 -#ctools_lib="$CTOOLS/lib" 29 +#prefix="@prefix@"
  30 +#exec_prefix="@exec_prefix@"
  31 +#ctools_bin="@bindir@"
  32 +#ctools_lib="@libdir@"
41 #python_dir="@pythondir@" 33 #python_dir="@pythondir@"
42 #python_exec_dir="@pyexecdir@" 34 #python_exec_dir="@pyexecdir@"
43 -#pkgconfig_dir="$CTOOLS/lib/pkgconfig"  
44 -#man_dir="$CTOOLS/share/doc/ctools/man"  
45 -#caldb_dir="$CTOOLS/share/caldb" 35 +#pkgconfig_dir="@libdir@/pkgconfig"
  36 +#man_dir="@datadir@/doc/ctools/man"
  37 +#caldb_dir="@datadir@/caldb"
  38 +prefix="$CTOOLS"
  39 +ctools_bin="$CTOOLS/bin"
  40 +ctools_lib="$CTOOLS/lib"
  41 +python_dir="@pythondir@"
  42 +python_exec_dir="@pyexecdir@"
  43 +pkgconfig_dir="$CTOOLS/lib/pkgconfig"
  44 +man_dir="$CTOOLS/share/doc/ctools/man"
  45 +caldb_dir="$CTOOLS/share/caldb"
46 uname_system=`uname` 46 uname_system=`uname`
47 47
48 # 48 #