aboutsummaryrefslogtreecommitdiff
path: root/portal-gui
diff options
context:
space:
mode:
Diffstat (limited to 'portal-gui')
-rw-r--r--portal-gui/Makefile.in36
-rwxr-xr-xportal-gui/configure10
-rw-r--r--portal-gui/configure.ac5
-rw-r--r--portal-gui/rpkigui/django.wsgi.in (renamed from portal-gui/rpkigui/django.wsgi)10
-rwxr-xr-xportal-gui/scripts/helper.in3
-rw-r--r--portal-gui/scripts/runserver.in5
6 files changed, 38 insertions, 31 deletions
diff --git a/portal-gui/Makefile.in b/portal-gui/Makefile.in
index b6292f51..37de2bb3 100644
--- a/portal-gui/Makefile.in
+++ b/portal-gui/Makefile.in
@@ -3,21 +3,18 @@
# @configure_input@
srcdir=@srcdir@
-prefix=@prefix@
-datarootdir=@datarootdir@
# where to install the portal-gui
-SRC=$(datarootdir)/$(PACKAGE_NAME)
+INSTDIR=@INSTDIR@
-# automatically built sources
-BUILD=$(srcdir)/configure Makefile config.status rpkigui/settings.py \
- rpkigui/urls.py scripts/helper
-
-PACKAGE_NAME=@PACKAGE_NAME@
PYTHON=@PYTHON@
MYRPKIDIR=@MYRPKIDIR@
DATABASE_PATH=@DATABASE_PATH@
+# automatically built sources
+BUILD=$(srcdir)/configure Makefile config.status rpkigui/settings.py \
+ rpkigui/urls.py scripts/helper scripts/runserver rpkigui/django.wsgi.in
+
all: $(BUILD)
$(srcdir)/configure: configure.ac
@@ -39,6 +36,10 @@ scripts/helper: $(srcdir)/scripts/helper.in
./config.status
scripts/runserver: $(srcdir)/scripts/runserver.in
+ ./config.status
+
+rpkigui/django.wsgi: $(srcdir)/rpki/django.wsgi
+ ./config.status
INSTALL_FILES=\
media/img/my.png \
@@ -73,14 +74,15 @@ INSTALL_FILES=\
install: $(BUILD)
mkdir -p `dirname $(DATABASE_PATH)`
- mkdir -p $(SRC)/media/img
- mkdir -p $(SRC)/rpkigui/myrpki
- mkdir -p $(SRC)/rpkigui/templates/myrpki
- mkdir -p $(SRC)/rpkigui/templates/registration
- mkdir -p $(SRC)/scripts
+ mkdir -p $(INSTDIR)/media/img
+ mkdir -p $(INSTDIR)/rpkigui/myrpki
+ mkdir -p $(INSTDIR)/rpkigui/templates/myrpki
+ mkdir -p $(INSTDIR)/rpkigui/templates/registration
+ mkdir -p $(INSTDIR)/scripts
for f in $(INSTALL_FILES); do \
- install $$f $(SRC)/$$f; \
+ install $$f $(INSTDIR)/$$f; \
done
- ln -sf $(SRC)/scripts/helper $(SRC)/scripts/load_csv
- ln -sf $(SRC)/scripts/helper $(SRC)/scripts/list_resources
- cd $(SRC)/rpkigui && $(PYTHON) manage.py syncdb --pythonpath=$(MYRPKIDIR)
+ ln -sf $(INSTDIR)/scripts/helper $(INSTDIR)/scripts/load_csv
+ ln -sf $(INSTDIR)/scripts/helper $(INSTDIR)/scripts/list_resources
+ chmod 755 $(INSTDIR)/scripts/load_csv $(INSTDIR)/scripts/list_resources $(INSTDIR)/scripts/runserver
+ cd $(INSTDIR)/rpkigui && $(PYTHON) manage.py syncdb --pythonpath=$(MYRPKIDIR)
diff --git a/portal-gui/configure b/portal-gui/configure
index 95ef7221..89f81e7d 100755
--- a/portal-gui/configure
+++ b/portal-gui/configure
@@ -558,6 +558,7 @@ LIBOBJS
SECRET_KEY
CONFDIR
DATABASE_PATH
+INSTDIR
TEMPLATEDIR
MEDIADIR
MYRPKI_TOOL
@@ -1719,6 +1720,8 @@ fi
if test "x$PYTHON" = "xnone"; then :
as_fn_error "unable to find python interpreter, use --with-python" "$LINENO" 5
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using python interpreter at $PYTHON" >&5
+$as_echo "Using python interpreter at $PYTHON" >&6; }
if test "x$with_myrpki" = "xno"; then :
as_fn_error "must specify the --with-myrpki option" "$LINENO" 5
@@ -1742,6 +1745,10 @@ MEDIADIR="$exp_datarootdir/$PACKAGE_NAME/media"
TEMPLATEDIR="$exp_datarootdir/$PACKAGE_NAME/rpkigui/templates"
+INSTDIR="$exp_datarootdir/$PACKAGE_NAME"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: installing portal-gui into $INSTDIR" >&5
+$as_echo "installing portal-gui into $INSTDIR" >&6; }
if test "x$DATABASE_PATH" = x; then
eval 'exp_localstatedir='$localstatedir
@@ -1764,7 +1771,7 @@ SECRET_KEY=`$PYTHON -c 'import random; print "".join(random.choice("abcdefghijkl
ac_config_files="$ac_config_files Makefile"
-ac_config_files="$ac_config_files rpkigui/settings.py rpkigui/urls.py scripts/helper"
+ac_config_files="$ac_config_files rpkigui/settings.py rpkigui/urls.py scripts/helper rpkigui/django.wsgi"
ac_config_files="$ac_config_files scripts/runserver"
@@ -2471,6 +2478,7 @@ do
"rpkigui/settings.py") CONFIG_FILES="$CONFIG_FILES rpkigui/settings.py" ;;
"rpkigui/urls.py") CONFIG_FILES="$CONFIG_FILES rpkigui/urls.py" ;;
"scripts/helper") CONFIG_FILES="$CONFIG_FILES scripts/helper" ;;
+ "rpkigui/django.wsgi") CONFIG_FILES="$CONFIG_FILES rpkigui/django.wsgi" ;;
"scripts/runserver") CONFIG_FILES="$CONFIG_FILES scripts/runserver" ;;
*) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
diff --git a/portal-gui/configure.ac b/portal-gui/configure.ac
index fc5cb103..b09c5799 100644
--- a/portal-gui/configure.ac
+++ b/portal-gui/configure.ac
@@ -17,6 +17,7 @@ AS_IF([test "x$with_python" = "xdetect"],
[PYTHON=$with_python])
AS_IF([test "x$PYTHON" = "xnone"],
[AC_MSG_ERROR([unable to find python interpreter, use --with-python])])
+AC_MSG_RESULT([Using python interpreter at $PYTHON])
AS_IF([test "x$with_myrpki" = "xno"],
[AC_MSG_ERROR([must specify the --with-myrpki option])])
@@ -35,6 +36,8 @@ fi
eval 'exp_datarootdir='$datarootdir
AC_SUBST(MEDIADIR, "$exp_datarootdir/$PACKAGE_NAME/media")
AC_SUBST(TEMPLATEDIR, "$exp_datarootdir/$PACKAGE_NAME/rpkigui/templates")
+AC_SUBST(INSTDIR, "$exp_datarootdir/$PACKAGE_NAME")
+AC_MSG_RESULT([installing portal-gui into $INSTDIR])
if test "x$DATABASE_PATH" = x; then
eval 'exp_localstatedir='$localstatedir
@@ -53,7 +56,7 @@ AC_SUBST(CONFDIR)
AC_SUBST(SECRET_KEY, `$PYTHON -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'`)
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([rpkigui/settings.py rpkigui/urls.py scripts/helper])
+AC_CONFIG_FILES([rpkigui/settings.py rpkigui/urls.py scripts/helper rpkigui/django.wsgi])
AC_CONFIG_FILES([scripts/runserver])
AC_OUTPUT
diff --git a/portal-gui/rpkigui/django.wsgi b/portal-gui/rpkigui/django.wsgi.in
index 1f77ef38..5f3f996a 100644
--- a/portal-gui/rpkigui/django.wsgi
+++ b/portal-gui/rpkigui/django.wsgi.in
@@ -1,18 +1,16 @@
+# $Id$
#
# This is an example wsgi application for use with mod_wsgi and apache.
#
-
-# change this path to match where you have installed the portal-gui source
-srcdir = '/home/me/src/rpki'
+# @configure_input@
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'rpkigui.settings'
-sys.path.append(srcdir+'/portal-gui')
-sys.path.append(srcdir+'/portal-gui/myrpki')
-sys.path.append(srcdir+'/rpkid')
+sys.path.append('@MYRPKIDIR@')
+sys.path.append('@INSTDIR@')
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
diff --git a/portal-gui/scripts/helper.in b/portal-gui/scripts/helper.in
index 99082ba3..518baf4b 100755
--- a/portal-gui/scripts/helper.in
+++ b/portal-gui/scripts/helper.in
@@ -6,8 +6,7 @@
#
# @configure_input@
-prefix=@prefix@
-src=@datarootdir@/@PACKAGE_NAME@
+src=@INSTDIR@
export PYTHONPATH=@MYRPKIDIR@:$src
export DJANGO_SETTINGS_MODULE=rpkigui.settings
@PYTHON@ $src/scripts/`basename $0`.py $*
diff --git a/portal-gui/scripts/runserver.in b/portal-gui/scripts/runserver.in
index f0d2d256..5d101ae8 100644
--- a/portal-gui/scripts/runserver.in
+++ b/portal-gui/scripts/runserver.in
@@ -5,8 +5,5 @@
#
# @configure_input@
-prefix=@prefix@
-datarootdir=@datarootdir@
-PACKAGE_NAME=@PACKAGE_NAME@
-cd $datarootdir/$PACKAGE_NAME/rpkigui
+cd @INSTDIR@/rpkigui
@PYTHON@ manage.py runserver --pythonpath=@MYRPKIDIR@ $*