Commit 86e242033d452427d2f180d4252bdb2efb61f937

Authored by Jürgen Knödlseder
1 parent 8526dd15

Add sudo to install commands for Mac OS X package building and verification

dev/pkgbuild-macosx.sh
... ... @@ -65,14 +65,14 @@ LOGFILE=$PWD/pkg_build.log
65 65 # Secure installation directory #
66 66 # ============================= #
67 67 if [ -d "$INSTALLDIR" ]; then
68   - mv $INSTALLDIR $INSTALLDIR.backup
  68 + sudo mv $INSTALLDIR $INSTALLDIR.backup
69 69 fi
70 70  
71 71  
72 72 # ======================= #
73 73 # Clean package directory #
74 74 # ======================= #
75   -rm -rf $INSTALLDIR
  75 +sudo rm -rf $INSTALLDIR
76 76 rm -rf $PKGDIR
77 77 rm -rf $PRODDIR
78 78 rm -rf $DMGFILE
... ... @@ -104,7 +104,7 @@ fi
104 104 cd $NCURSES
105 105 ./configure --prefix=$INSTALLDIR --with-shared | tee -a $LOGFILE
106 106 make -j4 | tee -a $LOGFILE
107   -make install | tee -a $LOGFILE
  107 +sudo make install | tee -a $LOGFILE
108 108 make clean
109 109  
110 110  
... ... @@ -125,7 +125,7 @@ fi
125 125 cd $READLINE
126 126 ./configure --prefix=$INSTALLDIR | tee -a $LOGFILE
127 127 make -j4 | tee -a $LOGFILE
128   -make install | tee -a $LOGFILE
  128 +sudo make install | tee -a $LOGFILE
129 129 make clean
130 130  
131 131  
... ... @@ -146,7 +146,7 @@ fi
146 146 cd cfitsio
147 147 ./configure --prefix=$INSTALLDIR | tee -a $LOGFILE
148 148 make -j4 shared | tee -a $LOGFILE
149   -make install | tee -a $LOGFILE
  149 +sudo make install | tee -a $LOGFILE
150 150 make clean
151 151  
152 152  
... ... @@ -201,7 +201,7 @@ fi
201 201 # Build code
202 202 ./configure --prefix=$INSTALLDIR | tee -a $LOGFILE
203 203 make -j4 | tee -a $LOGFILE
204   -make install | tee -a $LOGFILE
  204 +sudo make install | tee -a $LOGFILE
205 205 make clean
206 206  
207 207  
... ... @@ -245,9 +245,9 @@ if [ -d ".git" ]; then
245 245 ./autogen.sh
246 246 fi
247 247 # Build code
248   -./configure --prefix=$INSTALLDIR | tee $LOGFILE
249   -make -j4 | tee $LOGFILE
250   -make install | tee $LOGFILE
  248 +./configure --prefix=$INSTALLDIR | tee -a $LOGFILE
  249 +make -j4 | tee -a $LOGFILE
  250 +sudo make install | tee -a $LOGFILE
251 251 make clean
252 252  
253 253  
... ... @@ -258,14 +258,14 @@ make clean
258 258 for file in ${INSTALLDIR}/lib/*.dylib
259 259 do
260 260 echo $file | tee -a $LOGFILE
261   - install_name_tool -change "@rpath/libcfitsio.5.dylib" "$INSTALLDIR/lib/libcfitsio.5.dylib" $file
  261 + sudo install_name_tool -change "@rpath/libcfitsio.5.dylib" "$INSTALLDIR/lib/libcfitsio.5.dylib" $file
262 262 done
263 263  
264 264 # Change links in binaries
265 265 for file in ${INSTALLDIR}/bin/ct*
266 266 do
267 267 echo $file | tee -a $LOGFILE
268   - install_name_tool -change "@rpath/libcfitsio.5.dylib" "$INSTALLDIR/lib/libcfitsio.5.dylib" $file
  268 + sudo install_name_tool -change "@rpath/libcfitsio.5.dylib" "$INSTALLDIR/lib/libcfitsio.5.dylib" $file
269 269 done
270 270  
271 271 # Change links in Python modules
... ... @@ -279,14 +279,14 @@ do
279 279 for file in ${INSTALLDIR}/lib/$python/site-packages/gammalib/_*.so
280 280 do
281 281 echo $file | tee -a $LOGFILE
282   - install_name_tool -change "@rpath/libcfitsio.5.dylib" "$INSTALLDIR/lib/libcfitsio.5.dylib" $file
  282 + sudo install_name_tool -change "@rpath/libcfitsio.5.dylib" "$INSTALLDIR/lib/libcfitsio.5.dylib" $file
283 283 done
284 284  
285 285 # Change links in ctools modules
286 286 for file in ${INSTALLDIR}/lib/$python/site-packages/ctools/_*.so
287 287 do
288 288 echo $file | tee -a $LOGFILE
289   - install_name_tool -change "@rpath/libcfitsio.5.dylib" "$INSTALLDIR/lib/libcfitsio.5.dylib" $file
  289 + sudo install_name_tool -change "@rpath/libcfitsio.5.dylib" "$INSTALLDIR/lib/libcfitsio.5.dylib" $file
290 290 done
291 291 done
292 292  
... ... @@ -306,14 +306,14 @@ pkgbuild --identifier cta.irap.omp.eu.ctools.pkg \
306 306 # ======================= #
307 307 # Clean package directory #
308 308 # ======================= #
309   -rm -rf $INSTALLDIR
  309 +sudo rm -rf $INSTALLDIR
310 310  
311 311  
312 312 # ============================== #
313 313 # Recover installation directory #
314 314 # ============================== #
315 315 if [ -d "$INSTALLDIR.backup" ]; then
316   - mv $INSTALLDIR.backup $INSTALLDIR
  316 + sudo mv $INSTALLDIR.backup $INSTALLDIR
317 317 fi
318 318  
319 319  
... ... @@ -397,6 +397,5 @@ hdiutil create -volname $CTOOLS \
397 397 # ======================= #
398 398 # Clean package directory #
399 399 # ======================= #
400   -rm -rf $INSTALLDIR
401 400 rm -rf $PKGDIR
402 401 rm -rf $PRODDIR
... ...
dev/pkgcheck-macosx.sh
... ... @@ -54,7 +54,7 @@ LOGFILE=$PWD/pkg_check.log
54 54 # Secure installation directory #
55 55 # ============================= #
56 56 if [ -d "$INSTALLDIR" ]; then
57   - mv $INSTALLDIR $INSTALLDIR.backup
  57 + sudo mv $INSTALLDIR $INSTALLDIR.backup
58 58 fi
59 59  
60 60  
... ... @@ -106,5 +106,5 @@ sudo rm -rf $INSTALLDIR
106 106 # Recover installation directory #
107 107 # ============================== #
108 108 if [ -d "$INSTALLDIR.backup" ]; then
109   - mv $INSTALLDIR.backup $INSTALLDIR
  109 + sudo mv $INSTALLDIR.backup $INSTALLDIR
110 110 fi
... ...