vigigraph / Makefile @ master
History | View | Annotate | Download (1.99 KB)
1 |
NAME := vigigraph |
---|---|
2 |
|
3 |
SUBST_FILES := \ |
4 |
deployment/logrotate.conf \ |
5 |
deployment/settings.ini \ |
6 |
deployment/vigigraph.conf \ |
7 |
deployment/vigigraph.wsgi |
8 |
|
9 |
all: build |
10 |
build: $(SUBST_FILES) |
11 |
|
12 |
include buildenv/Makefile.common.python |
13 |
MODULE := $(NAME) |
14 |
EPYDOC_PARSE := vigigraph\.controllers |
15 |
JSFILES = vigigraph/public/js |
16 |
|
17 |
deployment/%: deployment/%.in |
18 |
sed -e 's,@SYSCONFDIR@,$(SYSCONFDIR),g' \ |
19 |
-e 's,@HTTPD_USER@,$(HTTPD_USER),g' \ |
20 |
-e 's,@NAGIOS_BIN@,$(NAGIOS_BIN),g' \ |
21 |
-e 's,@LOCALSTATEDIR@,$(LOCALSTATEDIR),g' $^ > $@ |
22 |
|
23 |
install: build install_python install_data |
24 |
install_pkg: build install_python_pkg install_data |
25 |
|
26 |
install_python: $(PYTHON) $(SUBST_FILES) |
27 |
$(PYTHON) setup.py install --record=INSTALLED_FILES |
28 |
install_python_pkg: $(PYTHON) |
29 |
$(PYTHON) setup.py install --single-version-externally-managed \ |
30 |
$(SETUP_PY_OPTS) --root=$(DESTDIR) --record=INSTALLED_FILES |
31 |
|
32 |
install_data: $(SUBST_FILES) |
33 |
# Permissions de la conf |
34 |
chmod a+rX -R $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME) |
35 |
[ `id -u` -ne 0 ] || chgrp $(HTTPD_USER) $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini |
36 |
chmod 640 $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini |
37 |
# Apache |
38 |
mkdir -p $(DESTDIR)$(HTTPD_DIR) |
39 |
ln -f -s $(SYSCONFDIR)/vigilo/$(NAME)/$(NAME).conf $(DESTDIR)$(HTTPD_DIR)/$(PKGNAME).conf |
40 |
echo $(HTTPD_DIR)/$(PKGNAME).conf >> INSTALLED_FILES |
41 |
mkdir -p $(DESTDIR)$(LOCALSTATEDIR)/log/vigilo/$(NAME) |
42 |
[ `id -u` -ne 0 ] || chown $(HTTPD_USER): $(DESTDIR)$(LOCALSTATEDIR)/log/vigilo/$(NAME) |
43 |
install -m 644 -p -D deployment/logrotate.conf $(DESTDIR)/etc/logrotate.d/$(PKGNAME) |
44 |
# Installation du app_cfg.py |
45 |
install -m 644 -p app_cfg.py $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/ |
46 |
# Cache |
47 |
mkdir -p $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
48 |
chmod 750 $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
49 |
[ `id -u` -ne 0 ] || chown $(HTTPD_USER): $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
50 |
|
51 |
lint: lint_pylint |
52 |
tests: tests_nose |
53 |
doc: apidoc sphinxdoc |
54 |
clean: clean_python |
55 |
rm -f $(SUBST_FILES) |
56 |
|
57 |
.PHONY: install_pkg install_python install_python_pkg install_data |