aboutsummaryrefslogtreecommitdiff
path: root/rp/rcynic/Makefile.in
blob: 972f1de6e0f6063001021ace245e83f02a365b78 (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
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# $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)
	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)/media $(INSTDIR)/wsgi
	rm -rf $(SYSCONFDIR)/apache.conf $(SYSCONFDIR)/settings.py $(SYSCONFDIR)/settings.pyc

test:
	@true
= @abs_top_builddir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localstatedir = @localstatedir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ sysconfdir = @sysconfdir@ abs_builddir = @abs_builddir@ abs_top_srcdir = @abs_top_srcdir@ abs_top_builddir = @abs_top_builddir@ srcdir = @srcdir@ RCYNIC_BIN_RCYNIC = @RCYNIC_BIN_RCYNIC@ RCYNIC_CONF_DATA = @RCYNIC_CONF_DATA@ RCYNIC_CONF_FILE = @RCYNIC_CONF_FILE@ RCYNIC_CONF_RSYNC = @RCYNIC_CONF_RSYNC@ RCYNIC_CONF_TA_DIR = @RCYNIC_CONF_TA_DIR@ RCYNIC_CRON_USER = @RCYNIC_CRON_USER@ RCYNIC_DATA_DIR = ${RCYNIC_DIR}/data RCYNIC_DIR = @RCYNIC_DIR@ RCYNIC_DIRS = ${RCYNIC_TA_DIR} ${RCYNIC_JAIL_DIRS} ${RCYNIC_DATA_DIR} ${RPKIRTR_DIR} ${RPKIRTR_DIR}/sockets RCYNIC_GECOS = RPKI Validation System RCYNIC_GROUP = rcynic RCYNIC_HTML_DIR = @RCYNIC_HTML_DIR@ RCYNIC_INSTALL_TARGETS = @RCYNIC_INSTALL_TARGETS@ RCYNIC_JAIL_DIRS = @RCYNIC_JAIL_DIRS@ RCYNIC_STATIC_RSYNC = @RCYNIC_STATIC_RSYNC@ RCYNIC_TA_DIR = @RCYNIC_TA_DIR@ RCYNIC_USER = rcynic RPKIRTR_DIR = ${RCYNIC_DIR}/rpki-rtr RPKIRTR_GECOS = RPKI router server RPKIRTR_GROUP = rpkirtr RPKIRTR_MODE = 775 RPKIRTR_USER = rpkirtr SCRIPTS = rcynic-text rcynic-html rcynic-svn validation_status rcynic-cron all: ${BIN} ${RCYNIC_STATIC_RSYNC} clean: if test -r static-rsync/Makefile; then cd static-rsync; ${MAKE} $@; fi rm -f ${BIN} ${OBJS} ${OBJ}: ${SRC} ${GEN} ${BIN}: ${OBJS} ${CC} ${CFLAGS} -o $@ ${OBJS} ${LDFLAGS} ${LIBS} ${GEN}: ${SRC} ${PYTHON} ${abs_top_srcdir}/buildtools/defstack.py ${SRC} >$@.tmp mv $@.tmp $@ tags: TAGS TAGS: ${SRC} ${GEN} etags ${SRC} ${GEN} test: ${BIN} if test -r rcynic.conf; \ then \ ./${BIN} -j 0 && \ test -r rcynic.xml && \ echo && \ ./rcynic-text rcynic.xml; \ else \ echo No rcynic.conf, skipping test; \ fi uninstall deinstall: @echo Sorry, automated deinstallation of rcynic is not implemented yet distclean: clean if test -r static-rsync/Makefile; then cd static-rsync; ${MAKE} $@; fi rm -f Makefile static-rsync/rsync: @echo "Building static rsync for use in chroot jail" cd static-rsync; ${MAKE} all install: all ${RCYNIC_INSTALL_TARGETS} install-always: \ install-directories install-scripts install-rcynic install-rcynic-conf install-postconf: \ install-user-and-group install-directory-ownership install-crontab install-jailed: \ install-static-rsync install-shared-libraries install-rc-scripts install-directories: ${RCYNIC_DIRS} ${RCYNIC_DIRS} ${DESTDIR}${bindir} ${DESTDIR}${sysconfdir}: ${INSTALL} -v -d $@ install-directory-ownership: ${RCYNIC_DATA_DIR} ${RPKIRTR_DIR} ${RPKIRTR_DIR}/sockets chown ${RCYNIC_USER}:${RCYNIC_GROUP} ${RCYNIC_DATA_DIR} ${RPKIRTR_DIR} chown ${RPKIRTR_USER}:${RCYNIC_GROUP} ${RPKIRTR_DIR}/sockets chmod ${RPKIRTR_MODE} ${RPKIRTR_DIR}/sockets install-rcynic-conf: ${RCYNIC_CONF_FILE} ${RCYNIC_CONF_FILE}: @echo @echo Found no ${RCYNIC_CONF_FILE}, creating basic config and installing default trust anchor locators. @echo You might want to edit this. @echo ${INSTALL} -v -d ${RCYNIC_TA_DIR} ${INSTALL} -v -p -m 444 sample-trust-anchors/*.tal ${RCYNIC_TA_DIR} @echo > $@.tmp '# Basic rcynic configuration file with default trust anchors.' @echo >>$@.tmp '# See documentation for details.' @echo >>$@.tmp '' @echo >>$@.tmp '[rcynic]' @echo >>$@.tmp 'rsync-program = ${RCYNIC_CONF_RSYNC}' @echo >>$@.tmp 'authenticated = ${RCYNIC_CONF_DATA}/authenticated' @echo >>$@.tmp 'unauthenticated = ${RCYNIC_CONF_DATA}/unauthenticated' @echo >>$@.tmp 'xml-summary = ${RCYNIC_CONF_DATA}/rcynic.xml' @echo >>$@.tmp 'jitter = 600' @echo >>$@.tmp 'max-parallel-fetches = 8' @echo >>$@.tmp 'use-syslog = true' @echo >>$@.tmp 'log-level = log_usage_err' @echo >>$@.tmp 'trust-anchor-directory = ${RCYNIC_CONF_TA_DIR}' @chmod 444 $@.tmp @mv -f $@.tmp $@ install-rcynic: ${RCYNIC_BIN_RCYNIC} ${RCYNIC_BIN_RCYNIC}: ${BIN} ${INSTALL} -p -m 555 ${BIN} $@ install-static-rsync: ${RCYNIC_DIR}/bin/rsync ${RCYNIC_DIR}/bin/rsync: static-rsync/rsync ${INSTALL} -p -m 555 static-rsync/rsync $@ install-scripts: \ ${DESTDIR}${bindir} \ ${DESTDIR}${bindir}/rcynic-text \ ${DESTDIR}${bindir}/rcynic-html \ ${DESTDIR}${bindir}/rcynic-svn \ ${DESTDIR}${bindir}/rcynic-cron \ ${DESTDIR}${bindir}/validation_status ${DESTDIR}${bindir}/rcynic-text: rcynic-text ${INSTALL} -p -m 555 rcynic-text $@ ${DESTDIR}${bindir}/rcynic-html: rcynic-html ${INSTALL} -p -m 555 rcynic-html $@ ${DESTDIR}${bindir}/rcynic-svn: rcynic-svn ${INSTALL} -p -m 555 rcynic-svn $@ ${DESTDIR}${bindir}/rcynic-cron: rcynic-cron ${INSTALL} -p -m 555 rcynic-cron $@ ${DESTDIR}${bindir}/validation_status: validation_status ${INSTALL} -p -m 555 validation_status $@ .FORCE: install-crontab: .FORCE @if test "X`/usr/bin/crontab -l -u ${RCYNIC_CRON_USER} 2>/dev/null`" != "X"; \ then \ echo "${RCYNIC_CRON_USER} already has a crontab, leaving it alone"; \ else \ echo "Setting up ${RCYNIC_CRON_USER}'s crontab to run rcynic-cron script"; \ ${AWK} -v t=`hexdump -n 2 -e '"%u\n"' /dev/random` '\ BEGIN {printf "MAILTO=root\n%u * * * *\texec ${bindir}/rcynic-cron\n", t % 60}' | \ /usr/bin/crontab -u ${RCYNIC_CRON_USER} -; \ fi # Platform-specific rules below here. @RCYNIC_MAKE_RULES@