Package: fwlogwatch / 1.4-2

0001-Makefile Patch series | download
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
Description: Change variable to INSTALL_DIR for DESTDIR
Author: J.S.Junior <j.s.junior@live.com>
	William Grzybowski <william@grzy.org>
Last-Update: 2019-07-20
Index: fwlogwatch-1.4/Makefile
===================================================================
--- fwlogwatch-1.4.orig/Makefile
+++ fwlogwatch-1.4/Makefile
@@ -11,8 +11,8 @@
 
 # Linux
 CC = gcc
-CFLAGS = -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall #-pedantic -Wpointer-arith #-g #-p
-LDFLAGS = -s #-g #-static -p
+CFLAGS += -DHAVE_ZLIB -DHAVE_GETTEXT -pipe -O2 -Wall #-pedantic -Wpointer-arith #-g #-p
+LDFLAGS ?= -s #-g #-static -p
 LIBS = -lcrypt -lz #-ladns #-lc_p
 
 # Mac OS X
@@ -48,7 +48,7 @@ INSTALL = install
 INSTALL_PROGRAM = $(INSTALL) -m 0755
 INSTALL_SCRIPT = $(INSTALL) -m 0755
 INSTALL_DATA = $(INSTALL) -m 0644
-INSTALL_DIR = /usr/local
+DESTDIR = /usr
 CONF_DIR = /etc
 LOCALE_DIR = /usr
 
@@ -85,13 +85,13 @@ fwlogwatch:	$(OBJS)
 	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
 install:	all
-	$(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_PROGRAM) fwlogwatch $(DESTDIR)/usr/sbin/fwlogwatch
+	$(INSTALL_SCRIPT) contrib/fwlw_notify $(DESTDIR)/usr/sbin/fwlw_notify
+	$(INSTALL_SCRIPT) contrib/fwlw_respond $(DESTDIR)/usr/sbin/fwlw_respond
+	$(INSTALL_DATA) fwlogwatch.8 $(DESTDIR)/usr/share/man/man8/fwlogwatch.8
 
 install-config:
-	$(INSTALL_DATA) fwlogwatch.config $(CONF_DIR)/fwlogwatch.config
+	$(INSTALL_DATA) fwlogwatch.config $(CONF_DIR)/fwlogwatch/fwlogwatch.config
 
 install-i18n:
 	cd po; make
@@ -106,17 +106,17 @@ install-rhinit:
 	$(INSTALL_SCRIPT) contrib/fwlogwatch.init.redhat $(CONF_DIR)/rc.d/init.d/fwlogwatch
 
 uninstall:
-	@rm -f $(INSTALL_DIR)/sbin/fwlogwatch \
-		$(INSTALL_DIR)/sbin/fwlw_notify \
-		$(INSTALL_DIR)/sbin/fwlw_respond \
-		$(INSTALL_DIR)/share/man/man8/fwlogwatch.8 \
+	@rm -f $(DESTDIR)/usr/sbin/fwlogwatch \
+		$(DESTDIR)/usr/sbin/fwlw_notify \
+		$(DESTDIR)/usr/sbin/fwlw_respond \
+		$(DESTDIR)/usr/share/man/man8/fwlogwatch.8 \
 		$(LOCALE_DIR)/share/locale/de/LC_MESSAGES/fwlogwatch.mo \
 		$(LOCALE_DIR)/share/locale/ja/LC_MESSAGES/fwlogwatch.mo \
 		$(LOCALE_DIR)/share/locale/pt/LC_MESSAGES/fwlogwatch.mo \
 		$(LOCALE_DIR)/share/locale/sv/LC_MESSAGES/fwlogwatch.mo \
 		$(LOCALE_DIR)/share/locale/zh_CN/LC_MESSAGES/fwlogwatch.mo \
 		$(LOCALE_DIR)/share/locale/zh_TW/LC_MESSAGES/fwlogwatch.mo \
-		$(CONF_DIR)/fwlogwatch.config \
+		$(CONF_DIR)/fwlogwatch/fwlogwatch.config \
 
 clean:
 	rm -f *.o *~ *.bak fwlogwatch