X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/e001039de1df26ee538b9b357aa8647cbce5e325..7d874525c50d509f90a4949563fe11a36cdd0357:/Makefile diff --git a/Makefile b/Makefile index a004aff..b847b0d 100644 --- a/Makefile +++ b/Makefile @@ -25,22 +25,20 @@ # DESTDIR?= -SOURCEFILES=src/*.php includes/*.inc -MODULE_DOC_FILES=doc/source/html/* doc/source/latex/* LN=ln -f RM=rm -rf MKDIR=mkdir -p # hardlink the files to their destinations -# TODO move documentation where Jörg wants it ;) links: sourcedoc # documentation - $(MKDIR) $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/source/ - $(LN) doc/{TODO,changelog.old.html} $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/ - $(LN) doc/source/* $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/source/ + $(MKDIR) $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation/source/ + if [ ! -d $(DESTDIR)/usr/share/doc/iserv/mod/ ]; then $(MKDIR) $(DESTDIR)/usr/share/doc/iserv/mod/; fi + $(LN) doc/{TODO,changelog.old.html} $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation/ + $(LN) doc/source/* $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation/source/ $(RM) $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation - $(LN) -s $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation - + $(LN) -s ../../iserv-mod-room-reservation $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation + # images if [ ! -d $(DESTDIR)/usr/share/iserv/www/img/default/16/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/www/img/default/16/; fi $(LN) img/16/*.png $(DESTDIR)/usr/share/iserv/www/img/default/16/ @@ -51,10 +49,10 @@ links: sourcedoc # includes $(MKDIR) $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation - $(LN) includes/*.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/ + $(LN) inc/*.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/ if [ ! -e $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc ] ; then touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc; fi -ifeq ($(shell id -u),0) - chmod g+w $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc +ifeq ($(USER),root) + chmod u+rw $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc endif @@ -92,7 +90,7 @@ sourcedoc: # install everything install: links -ifeq ($(shell echo $USER),root) +ifeq ($(USER),root) chkdb -r chkpriv chklocale @@ -100,7 +98,8 @@ endif # uninstalling uninstall: - $(RM) $(DESTDIR)/usr/share/doc/iserv/mod/mod_room-reservation + $(RM) $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation + $(RM) $(DESTDIR)/usr/share/doc/iserv-mod-room-reservation $(RM) $(DESTDIR)/usr/share/iserv/locale/de/mod_room-reservation.po $(RM) $(DESTDIR)/usr/share/iserv/db/mod_room-reservation.sql $(RM) $(DESTDIR)/usr/share/iserv/db/log_module/mod_room-reservation @@ -127,4 +126,4 @@ clean: distclean distclean: $(RM) doc/source -.PHONY: clean +.PHONY: clean distclean install