X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/22edfde460ea987be279797e01db364205ffaa40..be23fcdb636deb4967ef0392ca8a67c0657d82cc:/Makefile?ds=sidebyside diff --git a/Makefile b/Makefile index 39153a6..b847b0d 100644 --- a/Makefile +++ b/Makefile @@ -33,11 +33,12 @@ MKDIR=mkdir -p links: sourcedoc # documentation $(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/ @@ -48,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 @@ -89,7 +90,7 @@ sourcedoc: # install everything install: links -ifeq ($(shell echo $USER),root) +ifeq ($(USER),root) chkdb -r chkpriv chklocale @@ -97,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 @@ -124,4 +126,4 @@ clean: distclean distclean: $(RM) doc/source -.PHONY: clean distclean +.PHONY: clean distclean install