summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-10-21 22:37:18 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-10-21 22:37:18 +0200
commitbe1def0f9f613587fe644c523306a7e4aaca94b4 (patch)
tree2dde382c4b17e8dcedff45c25b56b7015df61f14 /configure
parent7002d054467b6eff743ff4c49d1a2b9ee2062297 (diff)
downloadeurephia-be1def0f9f613587fe644c523306a7e4aaca94b4.tar.gz
eurephia-be1def0f9f613587fe644c523306a7e4aaca94b4.tar.xz
eurephia-be1def0f9f613587fe644c523306a7e4aaca94b4.zip
Created install rules via cmake
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 28 insertions, 4 deletions
diff --git a/configure b/configure
index c365363..0c9f327 100755
--- a/configure
+++ b/configure
@@ -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