masqmail-0.2

diff Makefile.am @ 91:3e7136221104

correct masqmail path in rmail script; remove docs on uninstall on install the correct path to the masqmail executable gets inserted into the rmail script now. now documentation, examples, and the templates are removed on uninstall. Empty directories are the only thing that may remain if one installs masqmail into an unusual path.
author meillo@marmaro.de
date Mon, 21 Jun 2010 09:40:16 +0200
parents 92673a185add
children 6eec8bcfd320
line diff
     1.1 --- a/Makefile.am	Sat Jun 19 19:18:46 2010 +0200
     1.2 +++ b/Makefile.am	Mon Jun 21 09:40:16 2010 +0200
     1.3 @@ -2,9 +2,9 @@
     1.4  
     1.5  SUBDIRS = src man
     1.6  
     1.7 -bin_SCRIPTS = contrib/rmail
     1.8 +install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail
     1.9  
    1.10 -install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir
    1.11 +uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir
    1.12  
    1.13  
    1.14  conf_dir: $(DESTDIR)@with_confdir@
    1.15 @@ -56,3 +56,22 @@
    1.16  	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
    1.17  	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl
    1.18  
    1.19 +
    1.20 +rmail:
    1.21 +	[ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin"
    1.22 +	sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\
    1.23 +	    contrib/rmail >$(DESTDIR)@prefix@/bin/rmail
    1.24 +	chmod 755 $(DESTDIR)@prefix@/bin/rmail
    1.25 +
    1.26 +rm-rmail:
    1.27 +	rm -f $(DESTDIR)@prefix@/bin/rmail
    1.28 +
    1.29 +rm-doc_dir:
    1.30 +	cd $(DESTDIR)@docdir@ ;\
    1.31 +	rm -rf docs examples ;\
    1.32 +	rm -f ChangeLog NEWS AUTHORS COPYING README TODO
    1.33 +	rmdir $(DESTDIR)@docdir@
    1.34 +
    1.35 +rm-tpl_dir:
    1.36 +	cd $(DESTDIR)@datadir@ ;\
    1.37 +	rm -rf masqmail