vigiboard / Makefile @ 55f2d54b
History | View | Annotate | Download (2.32 KB)
1 | d7540235 | Aurelien BOMPARD | NAME := vigiboard |
---|---|---|---|
2 | f299be9c | Aurelien BOMPARD | |
3 | d05904a2 | Francois POIROTTE | SUBST_FILES := \ |
4 | deployment/logrotate.conf \ |
||
5 | deployment/settings.ini \ |
||
6 | deployment/vigiboard.conf \ |
||
7 | 8f3fca99 | Francois POIROTTE | deployment/vigiboard.wsgi \ |
8 | pkg/vigilo-vigiboard.sh |
||
9 | f299be9c | Aurelien BOMPARD | |
10 | 536ea51c | Aurelien BOMPARD | all: build |
11 | f299be9c | Aurelien BOMPARD | build: $(SUBST_FILES) |
12 | 536ea51c | Aurelien BOMPARD | |
13 | 97bb9169 | Aurelien BOMPARD | include buildenv/Makefile.common.python |
14 | 70209762 | Aurelien BOMPARD | MODULE := $(NAME) |
15 | dc005588 | Francois POIROTTE | EPYDOC_PARSE := vigiboard\.(widgets|controllers|tests) |
16 | 12a23194 | Aurelien BOMPARD | JSFILES = vigiboard/public/js |
17 | 70209762 | Aurelien BOMPARD | |
18 | f299be9c | Aurelien BOMPARD | deployment/%: deployment/%.in |
19 | sed -e 's,@SYSCONFDIR@,$(SYSCONFDIR),g' \ |
||
20 | d05904a2 | Francois POIROTTE | -e 's,@HTTPD_USER@,$(HTTPD_USER),g' \ |
21 | 9515d85d | Francois POIROTTE | -e 's,@NAGIOS_BIN@,$(NAGIOS_BIN),g' \ |
22 | d05904a2 | Francois POIROTTE | -e 's,@LOCALSTATEDIR@,$(LOCALSTATEDIR),g' $^ > $@ |
23 | f299be9c | Aurelien BOMPARD | |
24 | 8f3fca99 | Francois POIROTTE | pkg/vigilo-vigiboard.sh: pkg/vigilo-vigiboard.sh.in |
25 | sed -e 's,@INITCONFDIR@,$(INITCONFDIR),g' \ |
||
26 | -e 's,@BINDIR@,$(BINDIR),g' $^ > $@ |
||
27 | |||
28 | 809955f3 | Aurelien BOMPARD | install: build install_python install_data |
29 | install_pkg: build install_python_pkg install_data |
||
30 | b8e1cd40 | Aurelien BOMPARD | |
31 | f299be9c | Aurelien BOMPARD | install_python: $(PYTHON) $(SUBST_FILES) |
32 | db58b89e | Aurelien BOMPARD | $(PYTHON) setup.py install --record=INSTALLED_FILES |
33 | f299be9c | Aurelien BOMPARD | install_python_pkg: $(PYTHON) $(SUBST_FILES) |
34 | d7bb3d47 | Francois POIROTTE | $(PYTHON) setup.py install --single-version-externally-managed \ |
35 | $(SETUP_PY_OPTS) --root=$(DESTDIR) --record=INSTALLED_FILES |
||
36 | b8e1cd40 | Aurelien BOMPARD | |
37 | f299be9c | Aurelien BOMPARD | install_data: $(SUBST_FILES) |
38 | 8f3fca99 | Francois POIROTTE | # Configuration de la tâche cron. |
39 | install -p -m 644 -D pkg/initconf $(DESTDIR)$(INITCONFDIR)/$(PKGNAME) |
||
40 | echo $(INITCONFDIR)/$(PKGNAME) >> INSTALLED_FILES |
||
41 | 64ef5a71 | Aurelien BOMPARD | # Permissions de la conf |
42 | chmod a+rX -R $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME) |
||
43 | acb0dfad | Aurelien BOMPARD | [ `id -u` -ne 0 ] || chgrp $(HTTPD_USER) $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini |
44 | 64ef5a71 | Aurelien BOMPARD | chmod 640 $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini |
45 | fd3d2299 | Aurelien BOMPARD | # Apache |
46 | a43ec272 | Aurelien BOMPARD | mkdir -p $(DESTDIR)$(HTTPD_DIR) |
47 | 99bd4776 | Aurelien BOMPARD | ln -f -s $(SYSCONFDIR)/vigilo/$(NAME)/$(NAME).conf $(DESTDIR)$(HTTPD_DIR)/$(PKGNAME).conf |
48 | echo $(HTTPD_DIR)/$(PKGNAME).conf >> INSTALLED_FILES |
||
49 | 64ef5a71 | Aurelien BOMPARD | mkdir -p $(DESTDIR)$(LOCALSTATEDIR)/log/vigilo/$(NAME) |
50 | 6e77380f | Aurelien BOMPARD | [ `id -u` -ne 0 ] || chown $(HTTPD_USER): $(DESTDIR)$(LOCALSTATEDIR)/log/vigilo/$(NAME) |
51 | 99bd4776 | Aurelien BOMPARD | install -m 644 -p -D deployment/logrotate.conf $(DESTDIR)/etc/logrotate.d/$(PKGNAME) |
52 | b82c4c03 | Francois POIROTTE | # Installation du app_cfg.py |
53 | install -m 644 -p app_cfg.py $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/ |
||
54 | 64ef5a71 | Aurelien BOMPARD | # Cache |
55 | mkdir -p $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
||
56 | chmod 750 $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
||
57 | 119ddf4c | Aurelien BOMPARD | [ `id -u` -ne 0 ] || chown $(HTTPD_USER): $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
58 | f913c9d3 | Thomas BURGUIERE | |
59 | a43ec272 | Aurelien BOMPARD | |
60 | d7540235 | Aurelien BOMPARD | lint: lint_pylint |
61 | c6e2f817 | Aurelien BOMPARD | tests: tests_nose |
62 | 37f38cfa | Aurelien BOMPARD | doc: apidoc |
63 | 536ea51c | Aurelien BOMPARD | clean: clean_python |
64 | f299be9c | Aurelien BOMPARD | rm -f $(SUBST_FILES) |
65 | b8e1cd40 | Aurelien BOMPARD | |
66 | .PHONY: install_pkg install_python install_python_pkg install_data |