blob: c5b45b210cc096bd0d02d809750627a0ad4dfa5f (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# $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@
PYTHON=@PYTHON@
WEBUSER=@WEBUSER@
DJANGO_ADMIN=@DJANGO_ADMIN@
CONFDIR=$(localstatedir)/rpki/conf
DATABASE_PATH=$(localstatedir)/rpki/gui.db
INSTDIR=$(datarootdir)/rpki/gui
TEMPLATEDIR=$(INSTDIR)/templates
# automatically built sources
BUILD=apache/rpki.conf
all: $(BUILD)
clean:
@true
distclean: clean
rm -f $(BUILD)
rm -f Makefile
edit = sed \
-e 's|@INSTDIR[@]|$(INSTDIR)|g'
apache/rpki.conf: $(srcdir)/apache/rpki.conf.in Makefile
$(edit) $@.in > $@
.PHONY: install-perms install-data install install-templates
install-perms:
chown $(WEBUSER) `dirname $(DATABASE_PATH)`
chown $(WEBUSER) $(DATABASE_PATH)
mkdir -p $(CONFDIR)
chown -R $(WEBUSER) $(CONFDIR)
install-apache:
install -d -m 755 $(INSTDIR)/apache
install -m 644 apache/rpki.conf $(INSTDIR)/apache
install -m 644 apache/rpki.wsgi $(INSTDIR)/apache
install-templates:
install -d -m 755 $(TEMPLATEDIR)/myrpki
install -m 644 templates/base.html $(TEMPLATEDIR)
install -m 644 templates/myrpki/asn_view.html $(TEMPLATEDIR)/myrpki
install -m 644 templates/myrpki/child_view.html $(TEMPLATEDIR)/myrpki
install -m 644 templates/myrpki/conf_empty.html $(TEMPLATEDIR)/myrpki
install -m 644 templates/myrpki/conf_list.html $(TEMPLATEDIR)/myrpki
install -m 644 templates/myrpki/dashboard.html $(TEMPLATEDIR)/myrpki
install -m 644 templates/myrpki/parent_view.html $(TEMPLATEDIR)/myrpki
install -m 644 templates/myrpki/prefix_view.html $(TEMPLATEDIR)/myrpki
install -m 644 templates/myrpki/xml_import.html $(TEMPLATEDIR)/myrpki
install -d -m 755 $(TEMPLATEDIR)/registration
install -m 644 templates/registration/login.html $(TEMPLATEDIR)/registration
install-data: $(BUILD) install-apache install-templates
mkdir -p `dirname $(DATABASE_PATH)`
$(DJANGO_ADMIN) syncdb --settings rpki.gui.settings
install: install-data install-perms
deinstall uninstall:
rm -r $(INSTDIR)
test:
@true
|