Revision 9996920f
Uniformisation des fichiers de conf dans les IHM
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@6852 b22e2e97-25c9-44ff-b637-2e5ceca36478
Makefile | ||
---|---|---|
1 | 1 |
NAME := vigigraph |
2 | 2 |
|
3 |
SUBST_FILES := deployment/logrotate.conf deployment/settings.ini \ |
|
4 |
deployment/vigigraph.conf deployment/vigigraph.wsgi |
|
5 |
|
|
3 | 6 |
all: build |
7 |
build: $(SUBST_FILES) |
|
4 | 8 |
|
5 | 9 |
include buildenv/Makefile.common |
6 | 10 |
MODULE := $(NAME) |
7 | 11 |
CODEPATH := $(NAME) |
8 | 12 |
EPYDOC_PARSE := vigigraph\.controllers |
9 | 13 |
|
14 |
deployment/%: deployment/%.in |
|
15 |
sed -e 's,@SYSCONFDIR@,$(SYSCONFDIR),g' \ |
|
16 |
-e 's,@LOCALSTATEDIR@,$(LOCALSTATEDIR),g' $^ > $@ |
|
17 |
|
|
10 | 18 |
install: build install_python install_data |
11 | 19 |
install_pkg: build install_python_pkg install_data |
12 | 20 |
|
13 |
install_python: $(PYTHON) |
|
21 |
install_python: $(PYTHON) $(SUBST_FILES)
|
|
14 | 22 |
$(PYTHON) setup.py install --record=INSTALLED_FILES |
15 | 23 |
install_python_pkg: $(PYTHON) |
16 | 24 |
$(PYTHON) setup.py install --single-version-externally-managed --root=$(DESTDIR) --record=INSTALLED_FILES |
17 | 25 |
|
18 |
install_data: deployment/logrotate.conf
|
|
26 |
install_data: $(SUBST_FILES)
|
|
19 | 27 |
# Permissions de la conf |
20 | 28 |
chmod a+rX -R $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME) |
21 | 29 |
[ `id -u` -ne 0 ] || chgrp $(HTTPD_USER) $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini |
22 |
chmod 600 $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini
|
|
30 |
chmod 640 $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/*.ini
|
|
23 | 31 |
# Apache |
24 | 32 |
mkdir -p $(DESTDIR)$(HTTPD_DIR) |
25 | 33 |
ln -f -s $(SYSCONFDIR)/vigilo/$(NAME)/$(NAME).conf $(DESTDIR)$(HTTPD_DIR)/ |
26 | 34 |
echo $(HTTPD_DIR)/$(NAME).conf >> INSTALLED_FILES |
27 |
mkdir -p $(DESTDIR)/var/log/vigilo/$(NAME)
|
|
35 |
mkdir -p $(DESTDIR)$(LOCALSTATEDIR)/log/vigilo/$(NAME)
|
|
28 | 36 |
install -m 644 -p -D deployment/logrotate.conf $(DESTDIR)/etc/logrotate.d/$(NAME) |
29 | 37 |
# Déplacement du app_cfg.py |
30 | 38 |
mv $(DESTDIR)`grep '$(NAME)/config/app_cfg.py$$' INSTALLED_FILES` $(DESTDIR)$(SYSCONFDIR)/vigilo/$(NAME)/ |
... | ... | |
38 | 46 |
lint: lint_pylint |
39 | 47 |
tests: tests_nose |
40 | 48 |
clean: clean_python |
49 |
rm -f $(SUBST_FILES) |
|
41 | 50 |
|
42 | 51 |
.PHONY: install_pkg install_python install_python_pkg install_data |
Also available in: Unified diff