aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui/Makefile.in
blob: 53e7f0c854164b6482dd699366f1dbf5266c2344 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# $Id$
#
# @configure_input@

abs_top_srcdir	 = @abs_top_srcdir@
abs_top_builddir = @abs_top_builddir@
srcdir=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
datadir=@datadir@
localstatedir=@localstatedir@
sharedstatedir=@sharedstatedir@
bindir=@bindir@
sbindir=@sbindir@
libexecdir=@libexecdir@

INSTALL = @INSTALL@
WSGI_DAEMON_PROCESS=@WSGI_DAEMON_PROCESS@
WSGI_PROCESS_GROUP=@WSGI_PROCESS_GROUP@
RCYNIC_HTML_DIR=@RCYNIC_HTML_DIR@

INSTDIR=${DESTDIR}$(datarootdir)/rpki

# automatically built sources
BUILD=apache.conf

all: $(BUILD)

clean:
	@true

distclean: clean
	rm -f $(BUILD)
	rm -f Makefile

edit = sed \
	     -e 's|@INSTDIR[@]|$(INSTDIR)|g' \
	     -e 's|@WSGI_DAEMON_PROCESS[@]|$(WSGI_DAEMON_PROCESS)|' \
	     -e 's|@WSGI_PROCESS_GROUP[@]|$(WSGI_PROCESS_GROUP)|' \
	     -e 's|@RCYNIC_HTML_DIR[@]|$(RCYNIC_HTML_DIR)|'

apache.conf: $(srcdir)/apache.conf.in Makefile
	$(edit) $@.in > $@

install: all
	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 rpki.wsgi $(INSTDIR)/wsgi/rpki.wsgi
	# this would be better handled with "django-admin collectstatic" but makes the install
	# process harder for the end user.
	${INSTALL} -m 644 $(srcdir)/../rpki/gui/app/static/css/* $(INSTDIR)/media/css
	${INSTALL} -m 644 $(srcdir)/../rpki/gui/app/static/js/*  $(INSTDIR)/media/js
	${INSTALL} -m 644 $(srcdir)/../rpki/gui/app/static/img/* $(INSTDIR)/media/img

deinstall uninstall:
	rm -rf $(INSTDIR)/media $(INSTDIR)/wsgi

test:
	@true