Mercurial > masqmail
comparison Makefile.am @ 425:a19e47ebbb33
Create the spool and log dirs on program startup if missing.
They are not anymore created during installation.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 30 May 2012 11:38:03 +0200 |
parents | bdbedce60247 |
children |
comparison
equal
deleted
inserted
replaced
424:19be3b27df6f | 425:a19e47ebbb33 |
---|---|
1 EXTRA_DIST = examples docs man tpl devel | 1 EXTRA_DIST = examples docs man tpl devel |
2 | 2 |
3 SUBDIRS = src man | 3 SUBDIRS = src man |
4 | 4 |
5 install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir doc_dir rmail | 5 install-data-local: uid_bit tpl_dir doc_dir rmail conf_dir |
6 | 6 |
7 uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-spool_dir rm-log_dir | 7 uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-dirs |
8 | |
9 | 8 |
10 conf_dir: | 9 conf_dir: |
11 install -d $(DESTDIR)@with_confdir@ | 10 install -d $(DESTDIR)@with_confdir@ |
12 | |
13 rm-conf_dir: | |
14 rmdir $(DESTDIR)@with_confdir@ # removes only if empty | |
15 | |
16 | 11 |
17 tpl_dir: | 12 tpl_dir: |
18 install -d $(DESTDIR)@datadir@/masqmail/tpl | 13 install -d $(DESTDIR)@datadir@/masqmail/tpl |
19 cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl | 14 cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl |
20 chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/* | 15 chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/* |
21 | 16 |
22 rm-tpl_dir: | 17 rm-tpl_dir: |
23 rm -rf $(DESTDIR)@datadir@/masqmail/ | 18 rm -rf $(DESTDIR)@datadir@/masqmail/ |
24 | |
25 | 19 |
26 doc_dir: | 20 doc_dir: |
27 install -d $(DESTDIR)@docdir@ | 21 install -d $(DESTDIR)@docdir@ |
28 cp -r docs $(DESTDIR)@docdir@ | 22 cp -r docs $(DESTDIR)@docdir@ |
29 cp -r examples $(DESTDIR)@docdir@ | 23 cp -r examples $(DESTDIR)@docdir@ |
34 rm -rf docs examples ; \ | 28 rm -rf docs examples ; \ |
35 rm -f ChangeLog NEWS AUTHORS COPYING README TODO INSTALL THANKS ; \ | 29 rm -f ChangeLog NEWS AUTHORS COPYING README TODO INSTALL THANKS ; \ |
36 ) | 30 ) |
37 rmdir $(DESTDIR)@docdir@ | 31 rmdir $(DESTDIR)@docdir@ |
38 | 32 |
39 | 33 rm-dirs: |
40 log_dir: | 34 : # removes only if empty |
41 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@ | 35 rmdir $(DESTDIR)@with_confdir@ |
42 | 36 rmdir $(DESTDIR)@with_logdir@ |
43 rm-log_dir: | |
44 rmdir $(DESTDIR)@with_logdir@ # removes only if empty | |
45 | |
46 | |
47 spool_dir: | |
48 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@ | |
49 | |
50 rm-spool_dir: | |
51 : # removal fails if the dirs are non-empty | |
52 : # this prevents losing spooled files | |
53 rmdir $(DESTDIR)@with_spooldir@ | 37 rmdir $(DESTDIR)@with_spooldir@ |
54 | 38 |
55 rmail: | 39 rmail: |
56 [ -d "$(DESTDIR)@prefix@/sbin" ] || mkdir -p "$(DESTDIR)@prefix@/sbin" | 40 [ -d "$(DESTDIR)@prefix@/sbin" ] || mkdir -p "$(DESTDIR)@prefix@/sbin" |
57 sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\ | 41 sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\ |