diff options
authorMichael Larabel <michael@phx-laptop.(none)>2009-01-07 11:52:39 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2009-01-07 11:52:39 -0500
commit5c5d9dc7e11faa3b542c09769ec8ce1d19789280 (patch)
parent9c7d46e9a8ea28526cd6254db7ff64d92815c794 (diff)
install-sh: Add $DESTDIR support to make packaging easier
This significantly eases building packages of p-t-s. If DESTDIR is unset, install-sh still installs as before If DESTDIR is set, install-sh prefixes all install paths with $DESTDIR. Additionally, install-sh now tries to create the directory $DESTDIR$INSTALL_PREFIX. This should not actually change the install-sh behaviour except for avoiding the need to create the directory before calling install-sh.
4 files changed, 25 insertions, 20 deletions
diff --git a/AUTHORS b/AUTHORS
index eadcf26..4ed15bb 100644
@@ -23,3 +23,4 @@ Additional Contributors:
- Sun Microsystems / Tao Zhang
- Unigine Corp / Denis Shergin
- SOMA Networks, Inc. / Michael Ploujnikov
+- Hans Ulrich Niedermann
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 8f09583..f734912 100644
@@ -4,6 +4,7 @@ Phoronix Test Suite (Git)
- pts-core: Add FORCE_TIMES_TO_RUN environmental variable for forcing the number of times to run a test
- pts: Add smokin-guns test profile for Quake 3 Smokin' Guns game
+- install-sh: Add $DESTDIR support to make packaging easier
Phoronix Test Suite 1.6.0 Beta 2
January 2, 2009
diff --git a/documentation/credits.html b/documentation/credits.html
index 587d2b7..0bef722 100644
--- a/documentation/credits.html
+++ b/documentation/credits.html
@@ -34,6 +34,7 @@
<p>- Sun Microsystems / Tao Zhang</p>
<p>- Unigine Corp / Denis Shergin</p>
<p>- SOMA Networks, Inc. / Michael Ploujnikov</p>
+<p>- Hans Ulrich Niedermann</p>
<!-- END OF PTS AREA -->
</div></div><div class="pts_doc_fixed"><div class="pts_doc_bottom"><div style="float: left;"><a href=""></a></div><div style="float: right;">Copyright &copy; 2008 by <a href="">Phoronix Media</a>.</div></div></div>
diff --git a/install-sh b/install-sh
index 8c2001a..4ae929d 100755
--- a/install-sh
+++ b/install-sh
@@ -2,7 +2,7 @@
# Phoronix Test Suite
# URLs:,
-# Copyright (C) 2008, Phoronix Media
+# Copyright (C) 2008 - 2009, Phoronix Media
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -37,39 +37,41 @@ EOT
-if [ ! -w $INSTALL_PREFIX ]
- echo "\nERROR: $INSTALL_PREFIX is not writable. Run this installer as root or specify a different directory prefix as the first argument sent to this script.\n"
+ echo "\nERROR: $DESTDIR$INSTALL_PREFIX is not writable. Run this installer as root or specify a different directory prefix as the first argument sent to this script.\n"
-rm -rf $INSTALL_PREFIX/share/phoronix-test-suite/
-rm -rf $INSTALL_PREFIX/share/doc/phoronix-test-suite/
+rm -rf $DESTDIR$INSTALL_PREFIX/share/phoronix-test-suite/
+rm -rf $DESTDIR$INSTALL_PREFIX/share/doc/phoronix-test-suite/
-mkdir -p $INSTALL_PREFIX/bin/
-mkdir -p $INSTALL_PREFIX/share/man/man1/
-mkdir -p $INSTALL_PREFIX/share/phoronix-test-suite/
-mkdir -p $INSTALL_PREFIX/share/doc/phoronix-test-suite/
+mkdir -p $DESTDIR$INSTALL_PREFIX/share/man/man1/
+mkdir -p $DESTDIR$INSTALL_PREFIX/share/phoronix-test-suite/
+mkdir -p $DESTDIR$INSTALL_PREFIX/share/doc/phoronix-test-suite/
-cp CHANGE-LOG $INSTALL_PREFIX/share/doc/phoronix-test-suite/
-cp COPYING $INSTALL_PREFIX/share/doc/phoronix-test-suite/
-cp AUTHORS $INSTALL_PREFIX/share/doc/phoronix-test-suite/
+cp CHANGE-LOG $DESTDIR$INSTALL_PREFIX/share/doc/phoronix-test-suite/
+cp COPYING $DESTDIR$INSTALL_PREFIX/share/doc/phoronix-test-suite/
+cp AUTHORS $DESTDIR$INSTALL_PREFIX/share/doc/phoronix-test-suite/
cd documentation/
-cp -r * $INSTALL_PREFIX/share/doc/phoronix-test-suite/
+cp -r * $DESTDIR$INSTALL_PREFIX/share/doc/phoronix-test-suite/
cd ..
-rm -rf $INSTALL_PREFIX/share/doc/phoronix-test-suite/man-pages/
+rm -rf $DESTDIR$INSTALL_PREFIX/share/doc/phoronix-test-suite/man-pages/
-cp documentation/man-pages/*.1 $INSTALL_PREFIX/share/man/man1/
+cp documentation/man-pages/*.1 $DESTDIR$INSTALL_PREFIX/share/man/man1/
-cp -r pts/ $INSTALL_PREFIX/share/phoronix-test-suite/
-rm -f $INSTALL_PREFIX/share/phoronix-test-suite/pts/etc/scripts/package-build-*
-cp -r pts-core/ $INSTALL_PREFIX/share/phoronix-test-suite/
+cp -r pts/ $DESTDIR$INSTALL_PREFIX/share/phoronix-test-suite/
+rm -f $DESTDIR$INSTALL_PREFIX/share/phoronix-test-suite/pts/etc/scripts/package-build-*
+cp -r pts-core/ $DESTDIR$INSTALL_PREFIX/share/phoronix-test-suite/
-sed 's:PTS_DIR=`pwd`:PTS_DIR='"$INSTALL_PREFIX"'\/share\/phoronix-test-suite:g' phoronix-test-suite > $INSTALL_PREFIX/bin/phoronix-test-suite
-chmod +x $INSTALL_PREFIX/bin/phoronix-test-suite
+sed 's:PTS_DIR=`pwd`:PTS_DIR='"$INSTALL_PREFIX"'\/share\/phoronix-test-suite:g' phoronix-test-suite > $DESTDIR$INSTALL_PREFIX/bin/phoronix-test-suite
+chmod +x $DESTDIR$INSTALL_PREFIX/bin/phoronix-test-suite
echo "\nPhoronix Test Suite Installation Completed\n
Executable File: $INSTALL_PREFIX/bin/phoronix-test-suite
Documentation: $INSTALL_PREFIX/share/doc/phoronix-test-suite/
Phoronix Test Suite Files: $INSTALL_PREFIX/share/phoronix-test-suite/\n"
+if [ "X$DESTDIR" != "X" ]; then echo "Installed to chroot: $DESTDIR"; fi