X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/4d5dcc113d39c479e71473937af94c6585c66349..ef8e5846088f6c71fb5d446686b87434a2e92550:/Makefile diff --git a/Makefile b/Makefile old mode 100755 new mode 100644 index bb76eae..5ddf5b6 --- 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 @@ -51,17 +51,15 @@ links: $(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 - chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc # 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 @@ -80,7 +78,7 @@ 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 + chmod +x $(DESTDIR)/usr/share/iserv/modules/room-reservation/update-iserv1-iserv2.pl # build doxygen documentation from source sourcedoc: @@ -88,9 +86,14 @@ sourcedoc: # install everything install: sourcedoc links +ifdef $(DESTDIR) +# only useful if sql data is in the right place + chmod g+w $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc + chgrp www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc chkdb -r chkpriv chklocale +endif # uninstalling uninstall: @@ -109,8 +112,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