summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-03-30 00:34:00 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-03-30 00:34:00 +0200
commitcda490e1fc19904d015d8d5853af731d3cd983ea (patch)
tree0f94585eb5b8b506a43865f4497a8d1bb3e62d5f /configure
parent9922a6f9a6476f680923334789b8857a60f76095 (diff)
downloadeurephia-cda490e1fc19904d015d8d5853af731d3cd983ea.tar.gz
eurephia-cda490e1fc19904d015d8d5853af731d3cd983ea.tar.xz
eurephia-cda490e1fc19904d015d8d5853af731d3cd983ea.zip
Restructured ./configure and improved the path setup
Also added install rules to XSLT files
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure80
1 files changed, 62 insertions, 18 deletions
diff --git a/configure b/configure
index b54774c..758db91 100755
--- a/configure
+++ b/configure
@@ -1,26 +1,47 @@
#!/bin/sh
-XSLTPATH="/usr/share/eurephia/xslt"
+PREFIX="/usr/local"
+BINDIR="${PREFIX}/bin"
+BINDIR_SET=0
+PLUGINDIR="${PREFIX}/lib/eurephia"
+PLUGINDIR_SET=0
+XSLTPATH="${PREFIX}/share/eurephia/xslt"
+XSLTPATH_SET=0
EUREPHIADM_XSLT="${XSLTPATH}/eurephiadm"
EUREPHIADM_XSLT_SET=0
+SQLITE3PREFIX="/etc/openvpn"
+
usage() {
cat <<EOF
configure help for eurephia
--help | -h -- This help screen
+
+ ** Main paths
--prefix <path> -- Root directory of installation
- (default: /etc/openvpn/eurephia)
+ (default: ${PREFIX})
+ --bin-dir -- Directory where to place binaries
+ (default: ${BINDIR})
--xslt-path | -X -- Default XSLT path
- (default: /usr/share/eurephia/xslt)
+ (default: ${XSLTPATH})
+
+ ** Debug options
--debug | -D -- Enable verbose debug logging
--show-secrets | -S -- Log passwords as clear text in log files
| (only available when debug is enabled)
+
+ ** Plug-in options
--plug-in | -p -- Build the eurephia plug-in for OpenVPN
+ --plug-in-dir | -P -- Destination path for the plug-ins and other modules
+ (default: ${PLUGINDIR})
--openvpn-src <path> | -s <path> -- OpenVPN source directory (needed when building plug-in)
--fw-iptables | -- Build iptables firewall module
+
+ ** Database options
--db-sqlite3 | -- Build SQLite3 database module
- --sqlite3-prefix | -sp -- Root directory of SQLite3 eurephia database
- (default: /etc/openvpn)
+ --sqlite3-path | -sp -- Root directory of SQLite3 eurephia database file
+ (default: ${SQLITE3PREFIX})
+ ** Administration utility options
--eurephiadm | -A -- Build command line admin utility
--eurephiadm-fw -- Include the firewall info even without any
firewall interface being built
@@ -34,8 +55,6 @@ DB=""
FW=""
ADMIN="";
OPENVPN_SRC_DIR=""
-PREFIX="/etc/openvpn/eurephia"
-SQLITE3PREFIX="/etc/openvpn"
PLUGIN=""
while [ ! -z "$1" ]; do
@@ -46,10 +65,26 @@ while [ ! -z "$1" ]; do
;;
--prefix)
PREFIX="$2";
- shift;
+ shift
+ if [ "${BINDIR_SET}" = "0" ]; then
+ BINDIR="${PREFIX}/bin";
+ fi
+ if [ "${PLUGINDIR_SET}" = "0" ]; then
+ PLUGINDIR="${PREFIX}/lib/eurephia"
+ fi
+ if [ "${XSLTPATH_SET}" = "0" ]; then
+ XSLTPATH="${PREFIX}/share/eurephia/xslt"
+ if [ "${EUREPHIADM_XSLT_SET}" = "0" ]; then
+ EUREPHIADM_XSLT="${XSLTPATH}/eurephiadm"
+ fi
+ fi
+ ;;
+ --bin-dir)
+ BINDIR="$2"
+ BINDIR_SET=1
+ shift
;;
-X|--xslt-path)
- PARAMS="${PARAMS} -DXSLTROOT:STRING=$2"
XSLTPATH="$2"
if [ "${EUREPHIADM_XSLT_SET}" = "0" ]; then
EUREPHIADM_XSLT="${XSLTPATH}/eurephiadm"
@@ -68,6 +103,11 @@ while [ ! -z "$1" ]; do
PARAMS="${PARAMS} -DPLUGIN=ON"
PLUGIN="eurephia-auth"
;;
+ -P|--plug-in-dir)
+ PLUGINDIR="$2"
+ PLUGINDIR_SET=1
+ shift
+ ;;
-s|--openvpn-src)
OPENVPN_SRC_DIR="$2"
PARAMS="${PARAMS} -DOPENVPN_SRC:STRING=$2"
@@ -81,7 +121,7 @@ while [ ! -z "$1" ]; do
PARAMS="${PARAMS} -DSQLITE3=ON"
DB="SQLite3 "
;;
- --sp|--sqlite3-prefix)
+ --sp|--sqlite3-path)
SQLITE3PREFIX="$2"
shift
;;
@@ -93,8 +133,7 @@ while [ ! -z "$1" ]; do
PARAMS="${PARAMS} -DFIREWALL=ON"
;;
--eurephiadm-xslt)
- PARAMS="${PARAMS} -DEUREPHIADM_XSLT_PATH:STRING=$2"
- EUREPHIADM_XSLT="$2"
+ EUREPHIADM_XSLT="$2"
EUREPHIADM_XSLT_SET=1
shift
;;
@@ -126,7 +165,12 @@ if [ ${DB} = "SQLite3" ]; then
fi
rm -f CMakeCache.txt
-cmake . ${PARAMS} -DPREFIX:STRING=${PREFIX}
+cmake . ${PARAMS} -DPREFIX:STRING=${PREFIX} -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} \
+ -DPLUGINDIR:STRING=${PLUGINDIR} -DBINDIR:STRING=${BINDIR} \
+ -DEUREPHIADM_XSLT_PATH:STRING=${EUREPHIADM_XSLT} -DXSLTROOT:STRING=${XSLTPATH}
+
+
+echo $PARAMS
ec=$?
if [ $ec = 0 ]; then
echo
@@ -139,15 +183,15 @@ if [ $ec = 0 ]; then
echo " Admin tools: ${ADMIN:-"None"}"
echo
echo " Install prefix: ${PREFIX}"
- if [ ${DB} = "SQLite3" ]; then
- echo " SQLite3 database path: ${SQLITE3PREFIX}"
- fi
-
+ echo " Binaries dir: ${BINDIR}"
+ echo " Plug-in path: ${PLUGINDIR}"
if [ ! -z "${ADMIN}" ]; then
- echo ""
echo " XSLT base path: ${XSLTPATH}"
echo " eurephiadm XSLT path: ${EUREPHIADM_XSLT}"
fi
+ if [ ${DB} = "SQLite3" ]; then
+ echo " SQLite3 database path: ${SQLITE3PREFIX}"
+ fi
echo
echo