1 program = postfix-logwatch
2 program_logwatch = postfix
8 Changes Bugs README LICENSE
10 prefix_logwatch = /etc/logwatch
11 prefix_standalone = /usr/local
14 scriptdir_logwatch = $(prefix_logwatch)/scripts/services
15 confdir_logwatch = $(prefix_logwatch)/conf/services
17 scriptdir_standalone = $(prefix_standalone)/bin
18 confdir_standalone = $(prefix_standalone)/etc
19 mandir_standalone = $(prefix_standalone)/man/man1
21 INSTALL = /usr/bin/install -c
24 @echo 'Run "make install-logwatch" to install as a logwatch filter'
25 @echo 'Run "make install-standalone" to install as a standalone utility'
26 @echo 'Run "make install-all" to install both'
29 $(INSTALL) -d -m 0755 \
30 $(DESTDIR)$(scriptdir_logwatch) \
31 $(DESTDIR)$(confdir_logwatch)
34 $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch)
37 $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf
38 # removes taint mode (-T) to run under logwatch
39 perl -e 'while (<>) { $$.==1 and s/\s+-T$$//; print "$$_";}' \
40 -i $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch)
43 $(INSTALL) -d -m 0755 \
44 $(DESTDIR)$(scriptdir_standalone) \
45 $(DESTDIR)$(confdir_standalone) \
46 $(DESTDIR)$(mandir_standalone)
49 $(DESTDIR)$(scriptdir_standalone)/$(program)
52 $(DESTDIR)$(confdir_standalone)/$(program).conf
55 $(DESTDIR)$(mandir_standalone)/$(program).1
57 install-all: install-logwatch install-standalone
60 rm -f $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) \
61 $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf
62 rm -rf $(DESTDIR)$(scriptdir_logwatch) \
63 $(DESTDIR)$(confdir_logwatch)
66 rm -f $(DESTDIR)$(scriptdir_standalone)/$(program) \
67 $(DESTDIR)$(confdir_standalone)/$(program).conf \
68 $(DESTDIR)$(mandir_standalone)/$(program).1
69 rm -rf $(DESTDIR)$(scriptdir_standalone) \
70 $(DESTDIR)$(confdir_standalone) \
71 $(DESTDIR)$(mandir_standalone)
73 uninstall-all: uninstall-logwatch uninstall-standalone
77 vers=`egrep 'Version[ ]*=' $(program) | sed "s/.*'\(.*\)';/\1/"` ; \
78 echo Preparing version $$vers; \
79 rel=$(program)-$$vers ; \
80 tar -cJf $${rel}.tar.xz --transform=s",^,$${rel}/," $(src);
82 $(program).1.html: $(program).1