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