47 lines
1.8 KiB
Makefile
47 lines
1.8 KiB
Makefile
prefix = /usr
|
|
config_prefix = /var
|
|
config_dir = $(config_prefix)/lib/larpe
|
|
|
|
INSTALL = /usr/bin/install -c
|
|
PYTHON = /usr/bin/python
|
|
|
|
LARPE_USER = www-data
|
|
LARPE_GROUP = www-data
|
|
APACHE_INIT_SCRIPT = /etc/init.d/apache2
|
|
|
|
larpe-reload-apache2: larpe-reload-apache2.c
|
|
|
|
install: larpe-reload-apache2
|
|
rm -rf build
|
|
$(MAKE) -C po install
|
|
$(PYTHON) setup.py install --root "$(DESTDIR)/" --prefix "$(prefix)"
|
|
$(INSTALL) -d $(DESTDIR)$(prefix)/sbin/
|
|
$(INSTALL) larpectl $(DESTDIR)$(prefix)/sbin/
|
|
$(INSTALL) larpe-reload-apache2-script $(DESTDIR)$(prefix)/sbin/
|
|
$(INSTALL) -m 4550 --group $(LARPE_GROUP) larpe-reload-apache2 $(DESTDIR)$(prefix)/sbin/
|
|
$(INSTALL) -d $(DESTDIR)$(prefix)/share/larpe/
|
|
$(INSTALL) -m 0644 apache2.conf $(DESTDIR)$(prefix)/share/larpe/
|
|
chown -R $(LARPE_USER):$(LARPE_GROUP) /usr/share/larpe/
|
|
|
|
$(INSTALL) --owner=$(LARPE_USER) --group=$(LARPE_GROUP) -d $(DESTDIR)$(config_dir)
|
|
$(INSTALL) --owner=$(LARPE_USER) --group=$(LARPE_GROUP) -d $(DESTDIR)$(config_dir)/vhosts.d
|
|
$(INSTALL) --owner=$(LARPE_USER) --group=$(LARPE_GROUP) -d $(DESTDIR)$(config_dir)/vhost-locations.d
|
|
$(INSTALL) --owner=$(LARPE_USER) --group=$(LARPE_GROUP) -d $(DESTDIR)$(config_dir)/vhosts.d.disabled
|
|
$(INSTALL) --owner=$(LARPE_USER) --group=$(LARPE_GROUP) -d $(DESTDIR)$(config_dir)/vhost-locations.d.disabled
|
|
|
|
uninstall:
|
|
$(MAKE) -C po uninstall
|
|
-rm -f $(DESTDIR)$(prefix)/sbin/larpe-reload-apache2
|
|
-rm -f $(DESTDIR)$(prefix)/sbin/larpe-reload-apache2-script
|
|
-rm -f $(DESTDIR)$(prefix)/sbin/larpectl
|
|
-rm -rf $(DESTDIR)$(prefix)/share/larpe/
|
|
@echo
|
|
@echo "Depending on your Python version, you will have to remove manually the files in /usr/lib/python(your_version)/site-packages/larpe/"
|
|
|
|
clean:
|
|
$(MAKE) -C po clean
|
|
$(MAKE) -C doc clean
|
|
-$(PYTHON) setup.py clean
|
|
-rm larpe-reload-apache2
|
|
|