View | Details | Raw Unified | Return to bug 157803 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-4 / +8 lines)
Lines 6-19 Link Here
6
#
6
#
7
7
8
PORTNAME=	imspector
8
PORTNAME=	imspector
9
PORTVERSION=	0.5
9
PORTVERSION=	0.9
10
CATEGORIES=	net-im
10
CATEGORIES=	net-im
11
MASTER_SITES=	http://www.imspector.org/downloads/
11
MASTER_SITES=	http://www.imspector.org/downloads/
12
12
13
MAINTAINER=	ports@FreeBSD.org
13
MAINTAINER=	m.tsatsenko@gmail.com
14
COMMENT=	IM transparent proxy with monitoring, blocking, and content-filtering supports
14
COMMENT=	IM transparent proxy with monitoring, blocking and content-filtering
15
15
16
CFLAGS+=	-fPIC
16
LICENCE=	GPLv2
17
CFLAGS+=	-fPIC -I ${LOCALBASE}/include -DHAVE_SSL
18
USE_GMAKE=	YES
19
USE_ICONV=	YES
20
USE_OPENSSL=	YES
17
21
18
CONFIG_FILES=	imspector.conf badwords.txt acl.txt
22
CONFIG_FILES=	imspector.conf badwords.txt acl.txt
19
23
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (imspector-0.5.tar.gz) = e40c1e2dfda2602442d2d17306b2a6e39a526d5a17a9c1174858acb639ec1552
1
SHA256 (imspector-0.9.tar.gz) = f864110caa72d0fd16dc49d593374669e61279d0e83fb381f455b8cef31ca57b
2
SIZE (imspector-0.5.tar.gz) = 39865
2
SIZE (imspector-0.9.tar.gz) = 66087
(-)pkg-plist (+4 lines)
Lines 9-15 Link Here
9
@exec if [ ! -f %D/%%ETCDIR%%/imspector.conf ] ; then cp -p %D/%F %B/imspector.conf; fi
9
@exec if [ ! -f %D/%%ETCDIR%%/imspector.conf ] ; then cp -p %D/%F %B/imspector.conf; fi
10
lib/imspector/aclfilterplugin.so
10
lib/imspector/aclfilterplugin.so
11
lib/imspector/badwordsfilterplugin.so
11
lib/imspector/badwordsfilterplugin.so
12
lib/imspector/catsloggingplugin.so
13
lib/imspector/censordfilterplugin.so
12
lib/imspector/debugloggingplugin.so
14
lib/imspector/debugloggingplugin.so
15
lib/imspector/httpsprotocolplugin.so
16
lib/imspector/jabberprotocolplugin.so
13
lib/imspector/fileloggingplugin.so
17
lib/imspector/fileloggingplugin.so
14
lib/imspector/ggprotocolplugin.so
18
lib/imspector/ggprotocolplugin.so
15
lib/imspector/icqprotocolplugin.so
19
lib/imspector/icqprotocolplugin.so
(-)files/patch-Makefile (-15 / +26 lines)
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:
(-)files/patch-icqprotocolplugin.cpp (+11 lines)
Added Link Here
1
--- icqprotocolplugin.cpp.orig	2011-06-10 23:51:17.870320723 +0400
2
+++ icqprotocolplugin.cpp	2011-06-10 23:54:37.586036961 +0400
3
@@ -673,7 +673,7 @@
4
 					size_t inbytesleft = mylength - 4;
5
 					size_t outbytesleft = BUFFER_SIZE - 1; /* Trailing \0 */
6
 					size_t result = iconv(iconv_utf16be_utf8,
7
-						&inbuf, &inbytesleft, &outbuf, &outbytesleft);
8
+						(const char**) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
9
 
10
 					if (result == (size_t) -1)
11
 					{
(-)files/patch-imspector.conf (-7 / +38 lines)
Lines 1-7 Link Here
1
--- imspector.conf	Thu Mar 13 20:55:41 2008
1
--- imspector.conf.orig	2008-09-04 17:48:13.000000000 +0400
2
+++ imspector.conf	Mon Mar 17 15:07:27 2008
2
+++ imspector.conf	2011-06-10 23:41:46.273771152 +0400
3
@@ -2,7 +2,7 @@
3
@@ -4,7 +4,7 @@
4
 #port=16667
4
 #http_port=18080
5
 
5
 
6
 # This is the default location of protocol and logging plugins.
6
 # This is the default location of protocol and logging plugins.
7
-#plugin_dir=/usr/lib/imspector
7
-#plugin_dir=/usr/lib/imspector
Lines 9-20 Link Here
9
 
9
 
10
 # For dropping privs - you probably want to do this.
10
 # For dropping privs - you probably want to do this.
11
 #user=imspector
11
 #user=imspector
12
@@ -19,7 +19,7 @@
12
@@ -12,19 +12,19 @@
13
 gg_protocol=on
13
 
14
 # SSL support?
15
 #ssl=on
16
-#ssl_key=/usr/etc/imspector/serverkey.pem
17
+#ssl_key=%%PREFIX%%/etc/imspector/serverkey.pem
18
 
19
 # Fixed cert?
20
-#ssl_cert=/usr/etc/imspector/servercert.pem
21
+#ssl_cert=%%PREFIX%%/etc/imspector/servercert.pem
22
 
23
 # Or certs created on-the-fly and signed against a CA
24
-#ssl_ca_key=/usr/etc/imspector/cakey.pem
25
-#ssl_ca_cert=/usr/etc/imspector/cacert.pem
26
+#ssl_ca_key=%%PREFIX%%/etc/imspector/cakey.pem
27
+#ssl_ca_cert=%%PREFIX%%/etc/imspector/cacert.pem
28
 # And finally a directory to store the created certs
29
 #ssl_cert_dir=/var/lib/imspector
30
 
31
 # Directory of CA certs for IM server cert validation
32
-#ssl_verify_dir=/usr/lib/ssl/certs
33
+#ssl_verify_dir=%%PREFIX%%/lib/ssl/certs
34
 # Drop connection when the IM server has a bad cert
35
 #ssl_verify=block
36
 
37
@@ -70,12 +70,12 @@
38
 #sqlite_file=/path/to/file
14
 
39
 
15
 # Bad words filtering
40
 # Bad words filtering
16
-#badwords_filename=/etc/imspector/badwords.txt
41
-#badwords_filename=/usr/etc/imspector/badwords.txt
17
+#badwords_filename=%%PREFIX%%/etc/imspector/badwords.txt
42
+#badwords_filename=%%PREFIX%%/etc/imspector/badwords.txt
18
 #badwords_replace_character=*
43
 #badwords_replace_character=*
19
 #badwords_block_count=1
44
 #badwords_block_count=1
20
 
45
 
46
 # ACL
47
-#acl_filename=/usr/etc/imspector/acl.txt
48
+#acl_filename=%%PREFIX%%/etc/imspector/acl.txt
49
 
50
 # SQLite-backed filter
51
 #db_filter_filename=/path/to/file

Return to bug 157803