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