vigiboard / Makefile @ 239a320d
History | View | Annotate | Download (1.65 KB)
1 |
NAME := vigiboard |
---|---|
2 |
all: build |
3 |
|
4 |
include buildenv/Makefile.common |
5 |
MODULE := $(NAME) |
6 |
CODEPATH := $(NAME) |
7 |
EPYDOC_PARSE := vigiboard\.(widgets|controllers) |
8 |
|
9 |
install: build install_python install_data |
10 |
install_pkg: build install_python_pkg install_data |
11 |
|
12 |
install_python: $(PYTHON) |
13 |
$(PYTHON) setup.py install --record=INSTALLED_FILES |
14 |
install_python_pkg: $(PYTHON) |
15 |
$(PYTHON) setup.py install --single-version-externally-managed --root=$(DESTDIR) --record=INSTALLED_FILES |
16 |
|
17 |
install_data: deployment/logrotate.conf |
18 |
# Permissions de la conf |
19 |
chmod a+rX -R $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME) |
20 |
[ `id -u` -ne 0 ] || chgrp $(HTTPD_USER) $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini |
21 |
chmod 640 $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini |
22 |
# Apache |
23 |
mkdir -p $(DESTDIR)$(HTTPD_DIR) |
24 |
ln -f -s $(SYSCONFDIR)/vigilo/$(NAME)/$(NAME).conf $(DESTDIR)$(HTTPD_DIR)/ |
25 |
echo $(HTTPD_DIR)/$(NAME).conf >> INSTALLED_FILES |
26 |
mkdir -p $(DESTDIR)$(LOCALSTATEDIR)/log/vigilo/$(NAME) |
27 |
install -m 644 -p -D deployment/logrotate.conf $(DESTDIR)/etc/logrotate.d/$(NAME) |
28 |
# Déplacement du app_cfg.py |
29 |
mv $(DESTDIR)`grep '$(NAME)/config/app_cfg.py$$' INSTALLED_FILES` $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/ |
30 |
ln -s $(SYSCONFDIR)/vigilo/$(NAME)/app_cfg.py $(DESTDIR)`grep '$(NAME)/config/app_cfg.py$$' INSTALLED_FILES` |
31 |
echo $(SYSCONFDIR)/vigilo/$(NAME)/app_cfg.py >> INSTALLED_FILES |
32 |
# Cache |
33 |
mkdir -p $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
34 |
chmod 750 $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
35 |
[ `id -u` -ne 0 ] || chown $(HTTPD_USER): $(DESTDIR)$(LOCALSTATEDIR)/cache/vigilo/sessions |
36 |
|
37 |
|
38 |
|
39 |
lint: lint_pylint |
40 |
tests: tests_nose |
41 |
clean: clean_python |
42 |
|
43 |
.PHONY: install_pkg install_python install_python_pkg install_data |