1 program = amavis-logwatch
2 program_logwatch = amavis
7 Changes Bugs Makefile 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 $(DESTDIR)$(scriptdir_logwatch) $(DESTDIR)$(confdir_logwatch) || exit 1;
28 $(INSTALL) -m 0644 $(program) $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) || exit 1;
29 $(INSTALL) -m 0644 $(program).conf $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf || exit 1;
30 # removes taint mode (-T) to run under logwatch
31 perl -e 'while (<>) { $$.==1 and s/\s+-T$$//; print "$$_";}' -i $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch)
34 $(INSTALL) -d -m 0755 $(DESTDIR)$(scriptdir_standalone) $(DESTDIR)$(confdir_standalone) || exit 1;
35 $(INSTALL) -m 0755 $(program) $(DESTDIR)$(scriptdir_standalone)/$(program) || exit 1;
36 $(INSTALL) -m 0644 $(program).conf $(DESTDIR)$(confdir_standalone)/$(program).conf || exit 1;
37 $(INSTALL) -m 0644 $(program).1 $(DESTDIR)$(mandir_standalone)/$(program).1 || exit 1;
39 install-all: install-logwatch install-standalone
42 -rm $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf
45 -rm $(DESTDIR)$(scriptdir_standalone)/$(program) $(DESTDIR)$(confdir_standalone)/$(program).conf \
46 $(DESTDIR)$(mandir_standalone)/$(program).1
48 uninstall-all: uninstall-logwatch uninstall-standalone
52 vers=`egrep 'Version[ ]*=' $(program) | sed "s/.*'\(.*\)';/\1/"` ; \
53 echo Preparing version $$vers; \
54 rel=$(program)-$$vers ; \
55 tar -cJf $${rel}.tar.xz --transform=s",^,$${rel}/," $(src) ;
57 $(program).1.html: $(program).1