masqmail-0.2
annotate Makefile.am @ 145:e68d8752735a
remove all installed dirs on `make uninstall'
but no generated data
remove log_dir, conf_dir, spool_dir if empty
remove run_dir in any case
author | meillo@marmaro.de |
---|---|
date | Wed, 07 Jul 2010 23:43:05 +0200 |
parents | 6eec8bcfd320 |
children | 88dab0d22341 |
rev | line source |
---|---|
meillo@125 | 1 EXTRA_DIST = examples docs man tpl 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@145 | 7 uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_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@145 | 15 rm-conf_dir: |
meillo@145 | 16 rmdir $(DESTDIR)@with_confdir@ # removes only if empty |
meillo@145 | 17 |
meillo@61 | 18 |
meillo@0 | 19 tpl_dir: $(DESTDIR)@datadir@/tpl |
meillo@0 | 20 |
meillo@0 | 21 $(DESTDIR)@datadir@/tpl: conf_dir |
meillo@0 | 22 install -d $(DESTDIR)@datadir@/masqmail/tpl |
meillo@61 | 23 cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl |
meillo@61 | 24 chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/* |
meillo@0 | 25 |
meillo@61 | 26 |
meillo@61 | 27 doc_dir: |
meillo@58 | 28 install -d $(DESTDIR)@docdir@ |
meillo@58 | 29 cp -r docs $(DESTDIR)@docdir@ |
meillo@58 | 30 cp -r examples $(DESTDIR)@docdir@ |
meillo@58 | 31 cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@ |
meillo@58 | 32 |
meillo@0 | 33 |
meillo@0 | 34 uid_bit: $(DESTDIR)@prefix@/sbin/masqmail |
meillo@0 | 35 chmod u+s $(DESTDIR)@prefix@/sbin/masqmail |
meillo@0 | 36 |
meillo@61 | 37 |
meillo@0 | 38 run_dir: |
meillo@0 | 39 install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail |
meillo@0 | 40 |
meillo@145 | 41 rm-run_dir: |
meillo@145 | 42 rm -rf $(DESTDIR)/var/run/masqmail |
meillo@61 | 43 |
meillo@61 | 44 |
meillo@61 | 45 log_dir: $(DESTDIR)@with_logdir@ |
meillo@61 | 46 |
meillo@0 | 47 $(DESTDIR)@with_logdir@: |
meillo@0 | 48 [ -d `dirname $(DESTDIR)@with_logdir@` ] || \ |
meillo@0 | 49 install -d `dirname $(DESTDIR)@with_logdir@` |
meillo@0 | 50 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@ |
meillo@0 | 51 |
meillo@145 | 52 rm-log_dir: |
meillo@145 | 53 rmdir $(DESTDIR)@with_logdir@ # removes only if empty |
meillo@61 | 54 |
meillo@61 | 55 |
meillo@61 | 56 spool_dir: $(DESTDIR)@with_spooldir@ |
meillo@61 | 57 |
meillo@0 | 58 $(DESTDIR)@with_spooldir@: |
meillo@0 | 59 [ -d `dirname $(DESTDIR)@with_spooldir@` ] || \ |
meillo@0 | 60 install -d `dirname $(DESTDIR)@with_spooldir@` |
meillo@0 | 61 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@ |
meillo@0 | 62 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock |
meillo@0 | 63 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input |
meillo@0 | 64 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl |
meillo@0 | 65 |
meillo@145 | 66 rm-spool_dir: |
meillo@145 | 67 : # removal fails if the dirs are non-empty |
meillo@145 | 68 : # this prevents losing spooled files |
meillo@145 | 69 rmdir $(DESTDIR)@with_spooldir@/lock |
meillo@145 | 70 rmdir $(DESTDIR)@with_spooldir@/input |
meillo@145 | 71 rmdir $(DESTDIR)@with_spooldir@/popuidl |
meillo@145 | 72 rmdir $(DESTDIR)@with_spooldir@ |
meillo@91 | 73 |
meillo@91 | 74 rmail: |
meillo@91 | 75 [ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin" |
meillo@91 | 76 sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\ |
meillo@91 | 77 contrib/rmail >$(DESTDIR)@prefix@/bin/rmail |
meillo@91 | 78 chmod 755 $(DESTDIR)@prefix@/bin/rmail |
meillo@91 | 79 |
meillo@91 | 80 rm-rmail: |
meillo@91 | 81 rm -f $(DESTDIR)@prefix@/bin/rmail |
meillo@91 | 82 |
meillo@91 | 83 rm-doc_dir: |
meillo@91 | 84 cd $(DESTDIR)@docdir@ ;\ |
meillo@91 | 85 rm -rf docs examples ;\ |
meillo@91 | 86 rm -f ChangeLog NEWS AUTHORS COPYING README TODO |
meillo@91 | 87 rmdir $(DESTDIR)@docdir@ |
meillo@91 | 88 |
meillo@91 | 89 rm-tpl_dir: |
meillo@91 | 90 cd $(DESTDIR)@datadir@ ;\ |
meillo@91 | 91 rm -rf masqmail |