aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui/Makefile.in
blob: d4b7c5dc47f98881f95a224be93dce6682876e3e (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
# $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@
sysconfdir=@sysconfdir@

INSTALL = @INSTALL@

INSTDIR=${DESTDIR}$(datarootdir)/rpki
SYSCONFDIR=${DESTDIR}${sysconfdir}/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'

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

install: $(BUILD)
	${INSTALL} -d $(SYSCONFDIR)
	${INSTALL} -d $(INSTDIR)/media/css
	${INSTALL} -d $(INSTDIR)/wsgi
	${INSTALL} -m 644 apache.conf $(SYSCONFDIR)/apache.conf
	${INSTALL} -m 644 $(srcdir)/media/css/bootstrap.min.css $(INSTDIR)/media/css/bootstrap.min.css
	${INSTALL} -m 644 rpki.wsgi $(INSTDIR)/wsgi/rpki.wsgi
	# FIXME should eventually try to merge new settings?
	@if [ ! -f ${SYSCONFDIR}/settings.py ]; then \
	    ${INSTALL} -m 644 settings.py ${SYSCONFDIR}; \
	else \
	    echo "${SYSCONFDIR}/settings.py already exists, installing settings.py as ${SYSCONFDIR}/settings.py.new"; \
	    ${INSTALL} -m 644 settings.py ${SYSCONFDIR}/settings.py.new; \
	fi

deinstall uninstall:
	rm -rf $(INSTDIR)

test:
	@true