Lines 1-32
Link Here
|
1 |
--- Makefile.orig 2008-03-14 00:55:41.000000000 +0800 |
1 |
--- Makefile.orig 2008-12-22 15:03:15.000000000 +0300 |
2 |
+++ Makefile 2008-03-17 21:14:55.000000000 +0800 |
2 |
+++ Makefile 2011-06-13 16:39:07.748652935 +0400 |
3 |
@@ -1,19 +1,19 @@ |
3 |
@@ -1,5 +1,5 @@ |
4 |
-DESTDIR = / |
4 |
-DESTDIR = / |
5 |
-PREFIX = /usr |
5 |
-PREFIX = /usr |
6 |
+DESTDIR ?= / |
6 |
+DESTDIR ?= / |
7 |
+PREFIX ?= /usr |
7 |
+PREFIX ?= /usr |
8 |
|
8 |
|
9 |
########## |
9 |
########## |
|
|
10 |
# Comment this out if you dont want SSL |
11 |
@@ -7,11 +7,11 @@ |
12 |
|
13 |
########## |
14 |
# Location of openssl installation |
15 |
-SSL_DIR = /usr |
16 |
+SSL_DIR ?= /usr |
17 |
|
18 |
########## |
10 |
# If using FreeBSD or OpenBSD COMMENT the below lines |
19 |
# If using FreeBSD or OpenBSD COMMENT the below lines |
11 |
-LIBS = -ldl |
20 |
-LIBS = -ldl |
12 |
+#LIBS = -ldl |
21 |
+#LIBS = -ldl |
13 |
|
22 |
|
14 |
# For any distro |
23 |
# For any distro |
15 |
#ADD_PLUGINS = mysqlloggingplugin.so sqliteloggingplugin.so postgresqlloggingplugin.so dbfilterplugin.so |
24 |
#ADD_PLUGINS = mysqlloggingplugin.so sqliteloggingplugin.so postgresqlloggingplugin.so dbfilterplugin.so dbresponderplugin.so |
16 |
########## |
25 |
@@ -23,11 +23,11 @@ |
|
|
26 |
SSL_OBJS = sslstate.o |
27 |
endif |
17 |
|
28 |
|
18 |
-CXX = g++ |
29 |
-CXX = g++ |
19 |
+CXX ?= g++ |
30 |
+CXX ?= g++ |
20 |
|
31 |
|
21 |
-CXXFLAGS = -Wall -O2 -fPIC |
32 |
-CXXFLAGS = -Wall -O2 -fPIC $(SSL_FLAGS) |
22 |
+CXXFLAGS ?= -Wall -O2 -fPIC |
33 |
+CXXFLAGS ?= -Wall -O2 -fPIC $(SSL_FLAGS) |
23 |
|
34 |
|
24 |
-PLUGIN_FLAGS = $(LIBS) -fPIC -shared -Wl,-soname,$@ -o $@ |
35 |
-PLUGIN_FLAGS = $(LIBS) -fPIC -shared -Wl,-soname,$@ -o $@ |
25 |
+PLUGIN_FLAGS ?= $(LIBS) -fPIC -shared -Wl,-soname,$@ -o $@ |
36 |
+PLUGIN_FLAGS ?= $(LIBS) -fPIC -shared -Wl,-soname,$@ -o $@ |
26 |
|
37 |
|
27 |
IMSPECTOR_OBJS = main.o protocolplugin.o loggingplugin.o filterplugin.o |
38 |
IMSPECTOR_OBJS = main.o protocolplugin.o loggingplugin.o filterplugin.o responderplugin.o $(SSL_OBJS) |
28 |
|
39 |
|
29 |
@@ -117,15 +117,15 @@ |
40 |
@@ -162,15 +162,15 @@ |
30 |
install: imspector libimspector.so $(PLUGINS) |
41 |
install: imspector libimspector.so $(PLUGINS) |
31 |
-mkdir -p $(DESTDIR)/$(PREFIX)/sbin |
42 |
-mkdir -p $(DESTDIR)/$(PREFIX)/sbin |
32 |
-mkdir -p $(DESTDIR)/$(PREFIX)/lib/imspector |
43 |
-mkdir -p $(DESTDIR)/$(PREFIX)/lib/imspector |
Lines 34-40
Link Here
|
34 |
- -install libimspector.so $(DESTDIR)/$(PREFIX)/lib/libimspector.so |
45 |
- -install libimspector.so $(DESTDIR)/$(PREFIX)/lib/libimspector.so |
35 |
+ -${BSD_INSTALL_PROGRAM} imspector $(DESTDIR)/$(PREFIX)/sbin/imspector |
46 |
+ -${BSD_INSTALL_PROGRAM} imspector $(DESTDIR)/$(PREFIX)/sbin/imspector |
36 |
+ -${BSD_INSTALL_PROGRAM} libimspector.so $(DESTDIR)/$(PREFIX)/lib/libimspector.so |
47 |
+ -${BSD_INSTALL_PROGRAM} libimspector.so $(DESTDIR)/$(PREFIX)/lib/libimspector.so |
37 |
-(for PLUGIN in $(PLUGINS); do \ |
48 |
-(for PLUGIN in $(PLUGINS) $(ADD_PLUGINS); do \ |
38 |
- install $$PLUGIN $(DESTDIR)/$(PREFIX)/lib/imspector/$$PLUGIN; \ |
49 |
- install $$PLUGIN $(DESTDIR)/$(PREFIX)/lib/imspector/$$PLUGIN; \ |
39 |
+ ${BSD_INSTALL_PROGRAM} $$PLUGIN $(DESTDIR)/$(PREFIX)/lib/imspector/$$PLUGIN; \ |
50 |
+ ${BSD_INSTALL_PROGRAM} $$PLUGIN $(DESTDIR)/$(PREFIX)/lib/imspector/$$PLUGIN; \ |
40 |
done); |
51 |
done); |
Lines 42-51
Link Here
|
42 |
- -install imspector.conf $(DESTDIR)/$(PREFIX)/etc/imspector/imspector.conf |
53 |
- -install imspector.conf $(DESTDIR)/$(PREFIX)/etc/imspector/imspector.conf |
43 |
- -install badwords.txt $(DESTDIR)/$(PREFIX)/etc/imspector/badwords.txt |
54 |
- -install badwords.txt $(DESTDIR)/$(PREFIX)/etc/imspector/badwords.txt |
44 |
- -install acl.txt $(DESTDIR)/$(PREFIX)/etc/imspector/acl.txt |
55 |
- -install acl.txt $(DESTDIR)/$(PREFIX)/etc/imspector/acl.txt |
45 |
+ -mkdir -p $(DESTDIR)/${ETCDIR} |
56 |
+ -mkdir -p $(DESTDIR)/$(ETCDIR) |
46 |
+ -${BSD_INSTALL_DATA} imspector.conf $(DESTDIR)/${ETCDIR}/imspector.conf.sample |
57 |
+ -${BSD_INSTALL_DATA} imspector.conf $(DESTDIR)/$(ETCDIR)/imspector.conf.sample |
47 |
+ -${BSD_INSTALL_DATA} badwords.txt $(DESTDIR)/${ETCDIR}/badwords.txt.sample |
58 |
+ -${BSD_INSTALL_DATA} badwords.txt $(DESTDIR)/$(ETCDIR)/badwords.txt.sample |
48 |
+ -${BSD_INSTALL_DATA} acl.txt $(DESTDIR)/${ETCDIR}/acl.txt.sample |
59 |
+ -${BSD_INSTALL_DATA} acl.txt $(DESTDIR)/$(ETCDIR)/acl.txt.sample |
49 |
-mkdir -p /var/log/imspector |
60 |
-mkdir -p /var/log/imspector |
|
|
61 |
-mkdir -p /var/lib/imspector |
50 |
|
62 |
|
51 |
uninstall: |
|
|