masqmail-0.2

annotate 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
rev   line source
meillo@62 1 EXTRA_DIST = examples docs man tpl tests misc
meillo@0 2
meillo@57 3 SUBDIRS = src man
meillo@0 4
meillo@91 5 install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail
meillo@86 6
meillo@91 7 uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir
meillo@0 8
meillo@61 9
meillo@0 10 conf_dir: $(DESTDIR)@with_confdir@
meillo@0 11
meillo@0 12 $(DESTDIR)@with_confdir@:
meillo@0 13 install -d $(DESTDIR)@with_confdir@
meillo@0 14
meillo@61 15
meillo@0 16 tpl_dir: $(DESTDIR)@datadir@/tpl
meillo@0 17
meillo@0 18 $(DESTDIR)@datadir@/tpl: conf_dir
meillo@0 19 install -d $(DESTDIR)@datadir@/masqmail/tpl
meillo@61 20 cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl
meillo@61 21 chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/*
meillo@0 22
meillo@61 23
meillo@61 24 doc_dir:
meillo@58 25 install -d $(DESTDIR)@docdir@
meillo@58 26 cp -r docs $(DESTDIR)@docdir@
meillo@58 27 cp -r examples $(DESTDIR)@docdir@
meillo@58 28 cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@
meillo@58 29
meillo@0 30
meillo@0 31 uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
meillo@0 32 chmod u+s $(DESTDIR)@prefix@/sbin/masqmail
meillo@0 33
meillo@61 34
meillo@0 35 run_dir:
meillo@0 36 install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail
meillo@0 37
meillo@61 38
meillo@61 39
meillo@61 40 log_dir: $(DESTDIR)@with_logdir@
meillo@61 41
meillo@0 42 $(DESTDIR)@with_logdir@:
meillo@0 43 [ -d `dirname $(DESTDIR)@with_logdir@` ] || \
meillo@0 44 install -d `dirname $(DESTDIR)@with_logdir@`
meillo@0 45 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@
meillo@0 46
meillo@61 47
meillo@61 48
meillo@61 49 spool_dir: $(DESTDIR)@with_spooldir@
meillo@61 50
meillo@0 51 $(DESTDIR)@with_spooldir@:
meillo@0 52 [ -d `dirname $(DESTDIR)@with_spooldir@` ] || \
meillo@0 53 install -d `dirname $(DESTDIR)@with_spooldir@`
meillo@0 54 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
meillo@0 55 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
meillo@0 56 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
meillo@0 57 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl
meillo@0 58
meillo@91 59
meillo@91 60 rmail:
meillo@91 61 [ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin"
meillo@91 62 sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\
meillo@91 63 contrib/rmail >$(DESTDIR)@prefix@/bin/rmail
meillo@91 64 chmod 755 $(DESTDIR)@prefix@/bin/rmail
meillo@91 65
meillo@91 66 rm-rmail:
meillo@91 67 rm -f $(DESTDIR)@prefix@/bin/rmail
meillo@91 68
meillo@91 69 rm-doc_dir:
meillo@91 70 cd $(DESTDIR)@docdir@ ;\
meillo@91 71 rm -rf docs examples ;\
meillo@91 72 rm -f ChangeLog NEWS AUTHORS COPYING README TODO
meillo@91 73 rmdir $(DESTDIR)@docdir@
meillo@91 74
meillo@91 75 rm-tpl_dir:
meillo@91 76 cd $(DESTDIR)@datadir@ ;\
meillo@91 77 rm -rf masqmail