diff -urN fwlogwatch-0.4.org/Makefile fwlogwatch-0.4/Makefile --- fwlogwatch-0.4.org/Makefile Thu Aug 30 14:00:03 2001 +++ fwlogwatch-0.4/Makefile Thu Aug 30 14:45:50 2001 @@ -1,8 +1,13 @@ # $Id$ +PREFIX=/usr +SBINDIR=$(PREFIX)/sbin +MANDIR=$(PREFIX)/man +SYSCONFDIR=/etc + # Linux CC = gcc -CFLAGS = -pipe -O2 -Wall #-pedantic #-g #-p +CFLAGS = $(OPT) -pipe -Wall -DSYSCONFDIR=\"$(SYSCONFDIR)\" LDFLAGS = #-g #-static -p LIBS = -lcrypt -lz #-lc_p @@ -66,14 +71,14 @@ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) install: all - $(INSTALL_PROGRAM) fwlogwatch /usr/local/sbin/fwlogwatch - $(INSTALL_SCRIPT) contrib/fwlw_notify /usr/local/sbin/fwlw_notify - $(INSTALL_SCRIPT) contrib/fwlw_respond /usr/local/sbin/fwlw_respond - $(INSTALL_DATA) fwlogwatch.8 /usr/local/man/man8/fwlogwatch.8 + $(INSTALL_PROGRAM) fwlogwatch $(DESTDIR)$(SBINDIR)/fwlogwatch + $(INSTALL_SCRIPT) contrib/fwlw_notify $(DESTDIR)$(SYSCONFDIR)/fwlw_notify + $(INSTALL_SCRIPT) contrib/fwlw_respond $(DESTDIR)$(SYSCONFDIR)/fwlw_respond + $(INSTALL_DATA) fwlogwatch.8 $(DESTDIR)$(MANDIR)/man8/fwlogwatch.8 install-config: - $(INSTALL_DATA) fwlogwatch.config /etc/fwlogwatch.config - $(INSTALL_DATA) fwlogwatch.template /etc/fwlogwatch.template + $(INSTALL_DATA) fwlogwatch.config $(DESTDIR)$(SYSCONFDIR)/fwlogwatch.config + $(INSTALL_DATA) fwlogwatch.template $(DESTDIR)$(SYSCONFDIR)/fwlogwatch.template uninstall: @rm -f /usr/local/sbin/fwlogwatch \ diff -urN fwlogwatch-0.4.org/main.h fwlogwatch-0.4/main.h --- fwlogwatch-0.4.org/main.h Thu Aug 30 14:00:03 2001 +++ fwlogwatch-0.4/main.h Thu Aug 30 14:45:05 2001 @@ -32,7 +32,7 @@ /* Files */ #define INFILE "/var/log/messages" -#define RCFILE "/etc/fwlogwatch.config" +#define RCFILE SYSCONFDIR "/fwlogwatch.config" /* Modes */ @@ -187,7 +187,7 @@ /* Interactive report mode */ #define CERT "[Insert address of abuse contact or CERT here]" -#define TEMPLATE "/etc/fwlogwatch.template" +#define TEMPLATE SYSCONFDIR "/fwlogwatch.template" #define FILENAME "fwlogwatchXXXXXX" #define INSERTREPORT "# insert report here" #define P_CAT "/bin/cat" @@ -203,8 +203,8 @@ #define ALERT 5 #define FORGET 86400 -#define FWLW_NOTIFY "/usr/local/sbin/fwlw_notify" -#define FWLW_RESPOND "/usr/local/sbin/fwlw_respond" +#define FWLW_NOTIFY SYSCONFDIR "/fwlw_notify" +#define FWLW_RESPOND SYSCONFDIR "/fwlw_respond" #define LISTENIF "127.0.0.1" #define LISTENPORT 888 #define DEFAULT_USER "admin"