diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 32 |
1 files changed, 28 insertions, 4 deletions
@@ -5,13 +5,16 @@ usage() { configure help for eurephia --help | -h -- This help screen + --prefix <path> | -p <path> -- Root directory of installation + (default: /etc/openvpn/eurephia) --openvpn-src <path> | -s <path> -- OpenVPN source directory (needed for building) --debug | -D -- Enable verbose debug logging --show-secrets | -S -- Log passwords as clear text in log files | (only available when debug is enabled) --fw-iptables | -- Build iptables firewall module --db-sqlite3 | -- Build SQLite3 database module - + --sqlite3-prefix | -sp -- Root directory of SQLite3 eurephia database + (default: /etc/openvpn) EOF } @@ -19,12 +22,18 @@ PARAMS="" DB="" FW="" OPENVPN_SRC_DIR="" +PREFIX="/etc/openvpn/eurephia" +SQLITE3PREFIX="/etc/openvpn" while [ ! -z "$1" ]; do case $1 in -h|--help) usage exit 0 ;; + -p|--prefix) + PREFIX="$2"; + shift; + ;; -s|--openvpn-src) OPENVPN_SRC_DIR="$2" PARAMS="${PARAMS} -DOPENVPN_SRC:STRING=$2" @@ -46,6 +55,10 @@ while [ ! -z "$1" ]; do PARAMS="${PARAMS} -DSQLITE3=ON" DB="SQLite3 " ;; + --sp|--sqlite3-prefix) + SQLITE3PREFIX="$2" + shift + ;; *) echo "Unkown option: $1" exit 2 @@ -69,8 +82,12 @@ if [ -z "${DB}" ]; then exit 1; fi +if [ ${DB} = "SQLite3" ]; then + PARAMS="${PARAMS} -DSQLITE3PREFIX:STIRNG=${SQLITE3PREFIX}" +fi + rm -f CMakeCache.txt -cmake . ${PARAMS} +cmake . ${PARAMS} -DPREFIX:STRING=${PREFIX} ec=$? if [ $ec = 0 ]; then cat >> Makefile <<EOF @@ -78,6 +95,7 @@ dist-clean : clean find -type d -name "CMakeFiles" | xargs rm -rf find -type f -name "cmake_install.cmake" | xargs rm -rf find -type f -name CMakeCache.txt | xargs rm -rf + find -type f -name install_manifest.txt | xargs rm -rf find -type f -name Makefile | xargs rm -rf find -type f -name "*~" | xargs rm -f rm -f CMakeCache.txt @@ -88,8 +106,14 @@ EOF echo echo "eurephia will be built with support for: " echo - echo " Database: ${DB}" - echo " Firewall: ${FW:-"None"}" + echo " Database: ${DB}" + echo " Firewall: ${FW:-"None"}" + echo + echo " Install prefix: ${PREFIX}" + if [ ${DB} = "SQLite3" ]; then + echo " SQLite3 database path: ${SQLITE3PREFIX}" + fi + echo echo if [ "$DEBUG_WARN" = 1 ]; then echo |