diff options
-rw-r--r-- | rpkid/portal-gui/Makefile.in | 12 | ||||
-rw-r--r-- | rpkid/portal-gui/apache.conf.in | 3 | ||||
-rw-r--r-- | rpkid/portal-gui/settings.py.in | 5 |
3 files changed, 16 insertions, 4 deletions
diff --git a/rpkid/portal-gui/Makefile.in b/rpkid/portal-gui/Makefile.in index a7cd4519..84388fd7 100644 --- a/rpkid/portal-gui/Makefile.in +++ b/rpkid/portal-gui/Makefile.in @@ -42,12 +42,22 @@ apache.conf: $(srcdir)/apache.conf.in Makefile install: $(BUILD) if test -d $(SYSCONFDIR); then :; else ${INSTALL} -d $(SYSCONFDIR); fi if test -d $(INSTDIR)/wsgi; then :; else ${INSTALL} -d $(INSTDIR)/wsgi; fi + if test -d $(INSTDIR)/media; then :; else ${INSTALL} -d $(INSTDIR)/media; fi + if test -d $(INSTDIR)/media/css; then :; else ${INSTALL} -d $(INSTDIR)/media/css; fi + if test -d $(INSTDIR)/media/img; then :; else ${INSTALL} -d $(INSTDIR)/media/img; fi + if test -d $(INSTDIR)/media/js; then :; else ${INSTALL} -d $(INSTDIR)/media/js; fi ${INSTALL} -m 644 apache.conf $(SYSCONFDIR)/apache.conf ${INSTALL} -m 644 rpki.wsgi $(INSTDIR)/wsgi/rpki.wsgi ${INSTALL} -m 644 settings.py ${SYSCONFDIR} + # this would be better handled with "django-admin collectstatic" but makes the install + # process harder for the end user. + ${INSTALL} -m 644 -t $(INSTDIR)/media/css $(srcdir)/../rpki/gui/app/static/css/* + ${INSTALL} -m 644 -t $(INSTDIR)/media/js $(srcdir)/../rpki/gui/app/static/js/* + ${INSTALL} -m 644 -t $(INSTDIR)/media/img $(srcdir)/../rpki/gui/app/static/img/* deinstall uninstall: - rm -rf $(INSTDIR) + rm -rf $(INSTDIR)/media $(INSTDIR)/wsgi + rm -rf $(SYSCONFDIR)/apache.conf $(SYSCONFDIR)/settings.py test: @true diff --git a/rpkid/portal-gui/apache.conf.in b/rpkid/portal-gui/apache.conf.in index 61a4f0e4..133d014a 100644 --- a/rpkid/portal-gui/apache.conf.in +++ b/rpkid/portal-gui/apache.conf.in @@ -25,7 +25,8 @@ Order deny,allow Allow from all </Directory> -Alias /static @INSTDIR@/static +Alias /media/ @INSTDIR@/media/ +Alias /site_media/ @INSTDIR@/media/ # redirect to the dashboard when someone hits the bare vhost RedirectMatch ^/$ /rpki/ diff --git a/rpkid/portal-gui/settings.py.in b/rpkid/portal-gui/settings.py.in index 7eed4aa7..fac4cfc3 100644 --- a/rpkid/portal-gui/settings.py.in +++ b/rpkid/portal-gui/settings.py.in @@ -107,6 +107,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( ) # where to put static files -STATIC_ROOT = '/usr/local/share/rpki/static' +STATIC_ROOT = '%(AC_DATAROOTDIR)s/rpki/media' -STATIC_URL = '/static/' +# must end with a slash! +STATIC_URL = '/media/' |