masqmail

changeset 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 d3e39ba684a3
children 10d00e3235f2
files Makefile.am Makefile.in
diffstat 2 files changed, 57 insertions(+), 77 deletions(-) [+]
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
     2.1 --- a/Makefile.in	Sat Jun 19 19:18:46 2010 +0200
     2.2 +++ b/Makefile.in	Mon Jun 21 09:40:16 2010 +0200
     2.3 @@ -14,7 +14,6 @@
     2.4  # PARTICULAR PURPOSE.
     2.5  
     2.6  @SET_MAKE@
     2.7 -
     2.8  VPATH = @srcdir@
     2.9  pkgdatadir = $(datadir)/@PACKAGE@
    2.10  pkgincludedir = $(includedir)/@PACKAGE@
    2.11 @@ -48,29 +47,6 @@
    2.12  CONFIG_HEADER = config.h
    2.13  CONFIG_CLEAN_FILES =
    2.14  CONFIG_CLEAN_VPATH_FILES =
    2.15 -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
    2.16 -am__vpath_adj = case $$p in \
    2.17 -    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
    2.18 -    *) f=$$p;; \
    2.19 -  esac;
    2.20 -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
    2.21 -am__install_max = 40
    2.22 -am__nobase_strip_setup = \
    2.23 -  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
    2.24 -am__nobase_strip = \
    2.25 -  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
    2.26 -am__nobase_list = $(am__nobase_strip_setup); \
    2.27 -  for p in $$list; do echo "$$p $$p"; done | \
    2.28 -  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
    2.29 -  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
    2.30 -    if (++n[$$2] == $(am__install_max)) \
    2.31 -      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
    2.32 -    END { for (dir in files) print dir, files[dir] }'
    2.33 -am__base_list = \
    2.34 -  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
    2.35 -  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
    2.36 -am__installdirs = "$(DESTDIR)$(bindir)"
    2.37 -SCRIPTS = $(bin_SCRIPTS)
    2.38  SOURCES =
    2.39  DIST_SOURCES =
    2.40  RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
    2.41 @@ -230,7 +206,6 @@
    2.42  with_user = @with_user@
    2.43  EXTRA_DIST = examples docs man tpl tests misc
    2.44  SUBDIRS = src man
    2.45 -bin_SCRIPTS = contrib/rmail
    2.46  all: config.h
    2.47  	$(MAKE) $(AM_MAKEFLAGS) all-recursive
    2.48  
    2.49 @@ -286,40 +261,6 @@
    2.50  
    2.51  distclean-hdr:
    2.52  	-rm -f config.h stamp-h1
    2.53 -install-binSCRIPTS: $(bin_SCRIPTS)
    2.54 -	@$(NORMAL_INSTALL)
    2.55 -	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
    2.56 -	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
    2.57 -	for p in $$list; do \
    2.58 -	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
    2.59 -	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
    2.60 -	done | \
    2.61 -	sed -e 'p;s,.*/,,;n' \
    2.62 -	    -e 'h;s|.*|.|' \
    2.63 -	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
    2.64 -	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
    2.65 -	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
    2.66 -	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
    2.67 -	      if (++n[d] == $(am__install_max)) { \
    2.68 -		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
    2.69 -	    else { print "f", d "/" $$4, $$1 } } \
    2.70 -	  END { for (d in files) print "f", d, files[d] }' | \
    2.71 -	while read type dir files; do \
    2.72 -	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
    2.73 -	     test -z "$$files" || { \
    2.74 -	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
    2.75 -	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
    2.76 -	     } \
    2.77 -	; done
    2.78 -
    2.79 -uninstall-binSCRIPTS:
    2.80 -	@$(NORMAL_UNINSTALL)
    2.81 -	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
    2.82 -	files=`for p in $$list; do echo "$$p"; done | \
    2.83 -	       sed -e 's,.*/,,;$(transform)'`; \
    2.84 -	test -n "$$list" || exit 0; \
    2.85 -	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
    2.86 -	cd "$(DESTDIR)$(bindir)" && rm -f $$files
    2.87  
    2.88  # This directory's subdirectories are mostly independent; you can cd
    2.89  # into them and run `make' without going through this Makefile.
    2.90 @@ -633,12 +574,9 @@
    2.91  	       exit 1; } >&2
    2.92  check-am: all-am
    2.93  check: check-recursive
    2.94 -all-am: Makefile $(SCRIPTS) config.h
    2.95 +all-am: Makefile config.h
    2.96  installdirs: installdirs-recursive
    2.97  installdirs-am:
    2.98 -	for dir in "$(DESTDIR)$(bindir)"; do \
    2.99 -	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
   2.100 -	done
   2.101  install: install-recursive
   2.102  install-exec: install-exec-recursive
   2.103  install-data: install-data-recursive
   2.104 @@ -691,7 +629,7 @@
   2.105  
   2.106  install-dvi-am:
   2.107  
   2.108 -install-exec-am: install-binSCRIPTS
   2.109 +install-exec-am:
   2.110  
   2.111  install-html: install-html-recursive
   2.112  
   2.113 @@ -731,7 +669,7 @@
   2.114  
   2.115  ps-am:
   2.116  
   2.117 -uninstall-am: uninstall-binSCRIPTS
   2.118 +uninstall-am: uninstall-local
   2.119  
   2.120  .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
   2.121  	ctags-recursive install-am install-strip tags-recursive
   2.122 @@ -742,18 +680,32 @@
   2.123  	dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
   2.124  	distclean distclean-generic distclean-hdr distclean-tags \
   2.125  	distcleancheck distdir distuninstallcheck dvi dvi-am html \
   2.126 -	html-am info info-am install install-am install-binSCRIPTS \
   2.127 -	install-data install-data-am install-data-local install-dvi \
   2.128 -	install-dvi-am install-exec install-exec-am install-html \
   2.129 -	install-html-am install-info install-info-am install-man \
   2.130 -	install-pdf install-pdf-am install-ps install-ps-am \
   2.131 -	install-strip installcheck installcheck-am installdirs \
   2.132 -	installdirs-am maintainer-clean maintainer-clean-generic \
   2.133 -	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
   2.134 -	tags-recursive uninstall uninstall-am uninstall-binSCRIPTS
   2.135 +	html-am info info-am install install-am install-data \
   2.136 +	install-data-am install-data-local install-dvi install-dvi-am \
   2.137 +	install-exec install-exec-am install-html install-html-am \
   2.138 +	install-info install-info-am install-man install-pdf \
   2.139 +	install-pdf-am install-ps install-ps-am install-strip \
   2.140 +	installcheck installcheck-am installdirs installdirs-am \
   2.141 +	maintainer-clean maintainer-clean-generic mostlyclean \
   2.142 +	mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
   2.143 +	uninstall uninstall-am uninstall-local
   2.144  
   2.145  
   2.146 -install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir
   2.147 +#bin_SCRIPTS = contrib/rmail
   2.148 +
   2.149 +install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail
   2.150 +
   2.151 +uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir
   2.152 +
   2.153 +rm-doc_dir:
   2.154 +	cd $(DESTDIR)@docdir@ ;\
   2.155 +	rm -rf docs examples ;\
   2.156 +	rm -f ChangeLog NEWS AUTHORS COPYING README TODO
   2.157 +	rmdir $(DESTDIR)@docdir@
   2.158 +
   2.159 +rm-tpl_dir:
   2.160 +	cd $(DESTDIR)@datadir@ ;\
   2.161 +	rm -rf masqmail
   2.162  
   2.163  conf_dir: $(DESTDIR)@with_confdir@
   2.164  
   2.165 @@ -796,6 +748,15 @@
   2.166  	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
   2.167  	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl
   2.168  
   2.169 +rmail:
   2.170 +	[ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin"
   2.171 +	sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\
   2.172 +	    contrib/rmail >$(DESTDIR)@prefix@/bin/rmail
   2.173 +	chmod 755 $(DESTDIR)@prefix@/bin/rmail
   2.174 +
   2.175 +rm-rmail:
   2.176 +	rm -f $(DESTDIR)@prefix@/bin/rmail
   2.177 +
   2.178  # Tell versions [3.59,3.63) of GNU make to not export all variables.
   2.179  # Otherwise a system limit (for SysV at least) may be exceeded.
   2.180  .NOEXPORT: