aboutsummaryrefslogtreecommitdiffstats
path: root/security/fwlogwatch/files/patch-Makefile
blob: 9918f0d84edc85d254e7a17aac9f528559624d8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
--- Makefile.orig   Thu Oct  3 23:07:30 2002
+++ Makefile    Mon Mar 31 10:37:53 2003
@@ -2,9 +2,9 @@
 
 # Linux
-CC = gcc
-CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall #-pedantic -Wpointer-arith #-g #-p
-LDFLAGS = #-g #-static -p
-LIBS = -lcrypt -lz #-lc_p
+#CC = gcc
+#CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall #-pedantic -Wpointer-arith #-g #-p
+#LDFLAGS = #-g #-static -p
+#LIBS = -lcrypt -lz #-lc_p
 
 # Solaris
 #LIBS = -lnsl -lsocket -lcrypt -lz
@@ -22,9 +22,12 @@
 #LIBS = -L/usr/local/lib -lz -lintl
 
 # FreeBSD
-#CC = gcc
-#CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall -I/usr/local/include
-#LIBS = -L/usr/local/lib -lcrypt -lz -lintl
+CC ?= gcc
+CFLAGS += -DHAVE_ZLIB -DHAVE_GETTEXT -I${LOCALBASE}/include \
+   -DINSTALL_DIR=\"${INSTALL_DIR}\" \
+   -DCONF_DIR=\"${CONF_DIR}\" \
+   -DLOCALE_DIR=\"${LOCALE_DIR}\"
+LIBS = -L${LOCALBASE}/lib -lcrypt -lz -lintl
 
 # You might want to add -DSHORT_NAMES to CFLAGS if you only intend to
 # analyze log formats with short list/chain/branch/interface names like
@@ -37,12 +40,12 @@
 LFLAGS = -B #-f #-p -p -d
 
 INSTALL = install
-INSTALL_PROGRAM = $(INSTALL) -s -m 0755
-INSTALL_SCRIPT = $(INSTALL) -m 0755
-INSTALL_DATA = $(INSTALL) -m 0644
-INSTALL_DIR = /usr/local
-CONF_DIR = /etc
-LOCALE_DIR = /usr
+INSTALL_PROGRAM = ${BSD_INSTALL_PROGRAM}
+INSTALL_SCRIPT = ${BSD_INSTALL_SCRIPT}
+INSTALL_DATA = ${BSD_INSTALL_DATA}
+INSTALL_DIR = ${PREFIX}
+CONF_DIR = ${INSTALL_DIR}/etc
+LOCALE_DIR = ${INSTALL_DIR}
 
 OBJS = cisco_ios.o cisco_pix.o compare.o ipchains.o ipfilter.o lancom.o \
        main.o modes.o net.o netfilter.o netscreen.o output.o parser.o \
@@ -82,18 +85,23 @@
    $(INSTALL_PROGRAM) fwlogwatch $(INSTALL_DIR)/sbin/fwlogwatch
    $(INSTALL_SCRIPT) contrib/fwlw_notify $(INSTALL_DIR)/sbin/fwlw_notify
    $(INSTALL_SCRIPT) contrib/fwlw_respond $(INSTALL_DIR)/sbin/fwlw_respond
-   $(INSTALL_DATA) fwlogwatch.8 $(INSTALL_DIR)/share/man/man8/fwlogwatch.8
+   $(INSTALL_DATA) fwlogwatch.8 $(INSTALL_DIR)/man/man8/fwlogwatch.8
 
 install-config:
    $(INSTALL_DATA) fwlogwatch.config $(CONF_DIR)/fwlogwatch.config
    $(INSTALL_DATA) fwlogwatch.template $(CONF_DIR)/fwlogwatch.template
 
 install-i18n:
-   cd po; make
+   cd po; $(MAKE)
+   ${MKDIR} $(LOCALE_DIR)/share/locale/de/LC_MESSAGES
    $(INSTALL_DATA) po/de.mo $(LOCALE_DIR)/share/locale/de/LC_MESSAGES/fwlogwatch.mo
+   ${MKDIR} $(LOCALE_DIR)/share/locale/pt_BR/LC_MESSAGES
    $(INSTALL_DATA) po/pt_BR.mo $(LOCALE_DIR)/share/locale/pt_BR/LC_MESSAGES/fwlogwatch.mo
+   ${MKDIR} $(LOCALE_DIR)/share/locale/sv/LC_MESSAGES
    $(INSTALL_DATA) po/sv.mo $(LOCALE_DIR)/share/locale/sv/LC_MESSAGES/fwlogwatch.mo
+   ${MKDIR} $(LOCALE_DIR)/share/locale/zh_CN/LC_MESSAGES
    $(INSTALL_DATA) po/zh_CN.mo $(LOCALE_DIR)/share/locale/zh_CN/LC_MESSAGES/fwlogwatch.mo
+   ${MKDIR} $(LOCALE_DIR)/share/locale/zh_TW/LC_MESSAGES
    $(INSTALL_DATA) po/zh_TW.mo $(LOCALE_DIR)/share/locale/zh_TW/LC_MESSAGES/fwlogwatch.mo
 
 install-rhinit: