From: rohieb Date: Sat, 2 Aug 2008 01:52:10 +0000 (+0200) Subject: Makefile: documentation is deleted on uninstall, some small changes. Documentation... X-Git-Tag: REL_8.08.03~3 X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/commitdiff_plain/5d7337151afc6910cb08cb261490cf514a0b6cee Makefile: documentation is deleted on uninstall, some small changes. Documentation is now installed in /usr/share/doc/iserv-mod-room-reservation with symbolic link to it in /usr/share/doc/iserv/mod/, so debian/postinst doesn't need create the symlink as it is already in the file system. debian/rules rather uses dh_installdocs. --- diff --git a/Makefile b/Makefile index 39153a6..c1de84b 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/ @@ -50,7 +51,7 @@ links: sourcedoc $(MKDIR) $(DESTDIR)/usr/share/iserv/www/inc/mod_room-reservation $(LN) includes/*.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) +ifeq ($(USER),root) 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 @@ -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 diff --git a/debian/postinst b/debian/postinst index 6e96da0..f5e9b4d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -5,5 +5,4 @@ chgrp www-data /usr/share/iserv/www/inc/mod_room-reservation/config.inc chkdb -r chkpriv chklocale -ln -fs /usr/share/doc/iserv-mod-room-reservation /usr/share/doc/iserv/mod/room-reservation #DEBHELPER# diff --git a/debian/rules b/debian/rules index 51fc4a8..2128ee6 100755 --- a/debian/rules +++ b/debian/rules @@ -14,7 +14,9 @@ binary-indep: dh_clean -k dh_installdirs $(MAKE) DESTDIR=$(CURDIR)/debian/iserv-mod-room-reservation install - + + # we rather install the documentation via dh_installdocs + rm -rf $(CURDIR)/debian/iserv-mod-room-reservation/usr/share/doc/iserv-mod-room-reservation dh_testdir dh_testroot dh_installchangelogs