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