X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/4d5dcc113d39c479e71473937af94c6585c66349..70c3ce9b9fcbd9a88443989f08694c16870ddf4e:/Makefile?ds=inline diff --git a/Makefile b/Makefile old mode 100755 new mode 100644 index bb76eae..a90f49a --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ MKDIR=mkdir -p links: # documentation $(MKDIR) $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/source/ - $(LN) doc/{LICENSE*,TODO,changelog*} $(DESTDIR)/usr/share/doc/iserv/mod/room-reservation/ + $(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/ # images @@ -50,18 +50,20 @@ 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 $(LN) lang/*.po $(DESTDIR)/usr/share/iserv/locale/de/ # navigation - if [ ! -d $(DESTDIR)/usr/share/iserv/www/nav/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/www/nav/; fi + if [ ! -d $(DESTDIR)/usr/share/iserv/www/nav/admin ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/www/nav/admin; fi $(LN) nav/*.mod $(DESTDIR)/usr/share/iserv/www/nav/ - $(LN) nav/admin/*.mod $(DESTDIR)/usr/share/iserv/www/nav/admin + $(LN) nav/admin/*.mod $(DESTDIR)/usr/share/iserv/www/nav/admin/ # privileges if [ ! -d $(DESTDIR)/usr/share/iserv/priv/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/priv/; fi @@ -79,8 +81,8 @@ links: # 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: @@ -88,9 +90,11 @@ sourcedoc: # install everything install: sourcedoc links +ifeq ($(shell id -u),0) chkdb -r chkpriv chklocale +endif # uninstalling uninstall: @@ -109,8 +113,16 @@ uninstall: psql -c "DELETE FROM log_module WHERE module='Room Reservation Schedule';" chklocale - @echo ---------------------------------------------------------------------- + @echo @echo If you do not need the SQL tables anymore, remove them by running @echo ' psql -c "DROP TABLE mod_roomreservation_bookings;"' @echo After that, all bookings are unrecoverably deleted! - @echo ---------------------------------------------------------------------- + @echo + +# clean up +clean: distclean + +distclean: + $(RM) doc/source + +.PHONY: clean