update-iserv1-iserv2.pl is now in maint/
[iserv-mod-room-reservation.git] / Makefile
index 6abcb9d..9440ef6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -50,9 +50,11 @@ links:
        # includes\r
        $(MKDIR) $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation\r
        $(LN) includes/*.inc $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/\r
-       touch $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
-       chmod 664 $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+       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\r
+ifeq ($(shell id -u),0)\r
+       chmod g+w $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
        chown www-data $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation/config.inc\r
+endif\r
        \r
        # i18n\r
        if [ ! -d $(DESTDIR)/usr/share/iserv/locale/de/ ]; then $(MKDIR) $(DESTDIR)/usr/share/iserv/locale/de/; fi\r
@@ -79,8 +81,8 @@ links:
        \r
        # additional files\r
        $(MKDIR) $(DESTDIR)/usr/share/iserv/modules/room-reservation\r
-       $(LN) update-iserv1-iserv2.pl $(DESTDIR)/usr/share/iserv/modules/room-reservation\r
-       chmod 755 $(DESTDIR)/usr/share/iserv/modules/room-reservation/update-iserv1-iserv2.pl\r
+       $(LN) maint/update-iserv1-iserv2.pl $(DESTDIR)/usr/share/iserv/modules/room-reservation\r
+       chmod +x $(DESTDIR)/usr/share/iserv/modules/room-reservation/update-iserv1-iserv2.pl\r
 \r
 # build doxygen documentation from source\r
 sourcedoc:\r
@@ -88,9 +90,11 @@ sourcedoc:
 \r
 # install everything\r
 install: sourcedoc links\r
+ifeq ($(shell echo $USER),root)\r
        chkdb -r\r
        chkpriv\r
        chklocale\r
+endif\r
 \r
 # uninstalling\r
 uninstall:\r
@@ -117,5 +121,8 @@ uninstall:
 \r
 # clean up\r
 clean: distclean\r
+\r
 distclean:\r
        $(RM) doc/source\r
+\r
+.PHONY: clean\r
This page took 0.020645 seconds and 4 git commands to generate.