X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/960c5c4c10bf9694f2778ff2547b6cbe67bb5958..47da02f0153c18d90140c9f01bd060c001d54a6a:/Makefile diff --git a/Makefile b/Makefile index 6abcb9d..3e912e9 100644 --- a/Makefile +++ b/Makefile @@ -36,9 +36,10 @@ MKDIR=mkdir -p links: # documentation $(MKDIR) $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/source/ - $(LN) doc/{TODO,changelog.html} $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/ - $(LN) doc/source/html/* $(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/ + $(LN) -s $(DESTDIR)/usr/share/doc/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/ @@ -50,9 +51,11 @@ links: # includes $(MKDIR) $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation $(LN) includes/*.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/ - touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc - chmod 664 $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc + 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 chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc +endif # i18n if [ ! -d $(DESTDIR)/usr/share/iserv/locale/de/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/locale/de/; fi @@ -75,22 +78,25 @@ links: # web pages $(MKDIR) $(DESTDIR)/usr/share/iserv/www/mod_room-reservation/admin $(LN) src/index.php $(DESTDIR)/usr/share/iserv/www/mod_room-reservation/ - $(LN) src/admin/config.php $(DESTDIR)/usr/share/iserv/www/mod_room-reservation/admin/ + $(LN) src/admin/*.php $(DESTDIR)/usr/share/iserv/www/mod_room-reservation/admin/ # additional files $(MKDIR) $(DESTDIR)/usr/share/iserv/modules/room-reservation - $(LN) update-iserv1-iserv2.pl $(DESTDIR)/usr/share/iserv/modules/room-reservation - chmod 755 $(DESTDIR)/usr/share/iserv/modules/room-reservation/update-iserv1-iserv2.pl + $(LN) maint/update-iserv1-iserv2.pl $(DESTDIR)/usr/share/iserv/modules/room-reservation + chmod +x $(DESTDIR)/usr/share/iserv/modules/room-reservation/update-iserv1-iserv2.pl # build doxygen documentation from source sourcedoc: doxygen + mv doc/source/html/* doc/source/ && rm -rf doc/source/html # install everything install: sourcedoc links +ifeq ($(shell echo $USER),root) chkdb -r chkpriv chklocale +endif # uninstalling uninstall: @@ -117,5 +123,8 @@ uninstall: # clean up clean: distclean + distclean: $(RM) doc/source + +.PHONY: clean