1 program = amavis-logwatch
2 program_logwatch = amavis
7 Changes Bugs README LICENSE
9 prefix_logwatch = /etc/logwatch
10 prefix_standalone = /usr/local
12 scriptdir_logwatch = $(prefix_logwatch)/scripts/services
13 confdir_logwatch = $(prefix_logwatch)/conf/services
15 scriptdir_standalone = $(prefix_standalone)/bin
16 confdir_standalone = $(prefix_standalone)/etc
17 mandir_standalone = $(prefix_standalone)/man/man1
19 INSTALL = /usr/bin/install -c
22 @echo 'Run "make install-logwatch" to install as a logwatch filter'
23 @echo 'Run "make install-standalone" to install as a standalone utility'
24 @echo 'Run "make install-all" to install both'
27 $(INSTALL) -d -m 0755 \
28 $(DESTDIR)$(scriptdir_logwatch) \
29 $(DESTDIR)$(confdir_logwatch)
32 $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch)
35 $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf
36 # removes taint mode (-T) to run under logwatch
37 perl -e 'while (<>) { $$.==1 and s/\s+-T$$//; print "$$_";}' \
38 -i $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch)
41 $(INSTALL) -d -m 0755 \
42 $(DESTDIR)$(scriptdir_standalone) \
43 $(DESTDIR)$(confdir_standalone) \
44 $(DESTDIR)$(mandir_standalone)
47 $(DESTDIR)$(scriptdir_standalone)/$(program)
50 $(DESTDIR)$(confdir_standalone)/$(program).conf
53 $(DESTDIR)$(mandir_standalone)/$(program).1
55 install-all: install-logwatch install-standalone
58 rm -f $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) \
59 $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf
60 rm -rf $(DESTDIR)$(scriptdir_logwatch) \
61 $(DESTDIR)$(confdir_logwatch)
64 rm -f $(DESTDIR)$(scriptdir_standalone)/$(program) \
65 $(DESTDIR)$(confdir_standalone)/$(program).conf \
66 $(DESTDIR)$(mandir_standalone)/$(program).1
67 rm -rf $(DESTDIR)$(scriptdir_standalone) \
68 $(DESTDIR)$(confdir_standalone) \
69 $(DESTDIR)$(mandir_standalone)
71 uninstall-all: uninstall-logwatch uninstall-standalone
75 vers=`egrep 'Version[ ]*=' $(program) | sed "s/.*'\(.*\)';/\1/"` ; \
76 echo Preparing version $$vers; \
77 rel=$(program)-$$vers ; \
78 tar -cJf $${rel}.tar.xz --transform=s",^,$${rel}/," $(src) ;
80 $(program).1.html: $(program).1