view 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 wrap: on
line source

EXTRA_DIST = examples docs man tpl tests misc

SUBDIRS = src man

install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail

uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir


conf_dir: $(DESTDIR)@with_confdir@

$(DESTDIR)@with_confdir@:
	install -d $(DESTDIR)@with_confdir@


tpl_dir: $(DESTDIR)@datadir@/tpl

$(DESTDIR)@datadir@/tpl: conf_dir
	install -d $(DESTDIR)@datadir@/masqmail/tpl
	cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl
	chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/*


doc_dir:
	install -d $(DESTDIR)@docdir@
	cp -r docs $(DESTDIR)@docdir@
	cp -r examples $(DESTDIR)@docdir@
	cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@


uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
	chmod u+s $(DESTDIR)@prefix@/sbin/masqmail


run_dir:
	install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail



log_dir: $(DESTDIR)@with_logdir@

$(DESTDIR)@with_logdir@:
	[ -d `dirname $(DESTDIR)@with_logdir@` ] || \
		install -d `dirname $(DESTDIR)@with_logdir@`
	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@



spool_dir: $(DESTDIR)@with_spooldir@

$(DESTDIR)@with_spooldir@:
	[ -d `dirname $(DESTDIR)@with_spooldir@` ] || \
		install -d `dirname $(DESTDIR)@with_spooldir@`
	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl


rmail:
	[ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin"
	sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\
	    contrib/rmail >$(DESTDIR)@prefix@/bin/rmail
	chmod 755 $(DESTDIR)@prefix@/bin/rmail

rm-rmail:
	rm -f $(DESTDIR)@prefix@/bin/rmail

rm-doc_dir:
	cd $(DESTDIR)@docdir@ ;\
	rm -rf docs examples ;\
	rm -f ChangeLog NEWS AUTHORS COPYING README TODO
	rmdir $(DESTDIR)@docdir@

rm-tpl_dir:
	cd $(DESTDIR)@datadir@ ;\
	rm -rf masqmail