diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 0000000..55fa3d0 --- /dev/null +++ b/configure @@ -0,0 +1,64 @@ +#!/bin/sh + +APPNAME=xfce4-panel-profiles +VERSION=1.0.13 + +PYTHON=python3 + +help () { + echo "Supported options are:" + echo " --help print this help and exit" + echo " --prefix=<path> specify installation prefix" + echo " <path>/bin - will hold all executables" + echo " default <path> is /usr/local" + echo " --python=<python executable> specify python version" + echo " python or python3" + echo " default <python executable> is $PYTHON" + echo " --docdir=<path> specify docdir" + echo " default <path> is \$PREFIX/share/doc/$APPNAME" +} + +PREFIX=${PREFIX:-"/usr/local"} + +while [ $# -gt 0 ]; do + case $1 in + --help) + help + exit 0 + ;; + --prefix=*) + PREFIX=`echo $1 | sed 's/--prefix=//'` + ;; + --python=*) + PYTHON=`echo $1 | sed 's/--python=//'` + ;; + --mandir=*) + MANDIR=`echo $1 | sed 's/--mandir=//'` + ;; + --docdir=*) + DOCDIR=`echo $1 | sed 's/--docdir=//'` + ;; + *) + echo "Unknown option $1" + help + exit 1 + ;; + esac + shift +done + +DOCDIR=${DOCDIR:-"$PREFIX/share/doc/$APPNAME"} +MANDIR=${MANDIR:-"$PREFIX/share/man"} + +echo "Creating Makefile..." +sed -e s,@prefix@,$PREFIX, Makefile.in.in > Makefile.in +sed \ + -e s,@appname@,$APPNAME,g \ + -e s,@version@,$VERSION,g \ + -e s,@mandir@,$MANDIR,g \ + -e s,@docdir@,$DOCDIR,g \ + -e s,@python@,$PYTHON,g \ + Makefile.in > Makefile +echo "Installation prefix is $PREFIX" +echo "Installation mandir is $MANDIR" +echo "Installation docdir is $DOCDIR" |