aboutsummaryrefslogtreecommitdiff
path: root/net-im/imspector
diff options
context:
space:
mode:
authorJulien Laffaye <jlaffaye@FreeBSD.org>2011-06-13 19:28:35 +0000
committerJulien Laffaye <jlaffaye@FreeBSD.org>2011-06-13 19:28:35 +0000
commit335b237ccb77ca2288a841c5f277a922ff50bcc1 (patch)
tree8173820f2e17ba5557a6f79632dad6d74fcb47df /net-im/imspector
parent5a5395706cdd04dd01d0bd83863c4c83bade2747 (diff)
downloadports-335b237ccb77ca2288a841c5f277a922ff50bcc1.tar.gz
ports-335b237ccb77ca2288a841c5f277a922ff50bcc1.zip
Notes
Diffstat (limited to 'net-im/imspector')
-rw-r--r--net-im/imspector/Makefile12
-rw-r--r--net-im/imspector/distinfo4
-rw-r--r--net-im/imspector/files/patch-Makefile41
-rw-r--r--net-im/imspector/files/patch-icqprotocolplugin.cpp11
-rw-r--r--net-im/imspector/files/patch-imspector.conf45
-rw-r--r--net-im/imspector/pkg-plist9
6 files changed, 94 insertions, 28 deletions
diff --git a/net-im/imspector/Makefile b/net-im/imspector/Makefile
index d62fd7b4f2c9..c62541fa4615 100644
--- a/net-im/imspector/Makefile
+++ b/net-im/imspector/Makefile
@@ -6,14 +6,18 @@
#
PORTNAME= imspector
-PORTVERSION= 0.5
+PORTVERSION= 0.9
CATEGORIES= net-im
MASTER_SITES= http://www.imspector.org/downloads/
-MAINTAINER= ports@FreeBSD.org
-COMMENT= IM transparent proxy with monitoring, blocking, and content-filtering supports
+MAINTAINER= m.tsatsenko@gmail.com
+COMMENT= IM transparent proxy with monitoring, blocking and content-filtering
-CFLAGS+= -fPIC
+LICENSE= GPLv2
+CFLAGS+= -fPIC -I ${LOCALBASE}/include -DHAVE_SSL
+USE_GMAKE= YES
+USE_ICONV= YES
+USE_OPENSSL= YES
CONFIG_FILES= imspector.conf badwords.txt acl.txt
diff --git a/net-im/imspector/distinfo b/net-im/imspector/distinfo
index 7fcc326d2e23..8b4fdc7246de 100644
--- a/net-im/imspector/distinfo
+++ b/net-im/imspector/distinfo
@@ -1,2 +1,2 @@
-SHA256 (imspector-0.5.tar.gz) = e40c1e2dfda2602442d2d17306b2a6e39a526d5a17a9c1174858acb639ec1552
-SIZE (imspector-0.5.tar.gz) = 39865
+SHA256 (imspector-0.9.tar.gz) = f864110caa72d0fd16dc49d593374669e61279d0e83fb381f455b8cef31ca57b
+SIZE (imspector-0.9.tar.gz) = 66087
diff --git a/net-im/imspector/files/patch-Makefile b/net-im/imspector/files/patch-Makefile
index 57f4842ac658..542e31280730 100644
--- a/net-im/imspector/files/patch-Makefile
+++ b/net-im/imspector/files/patch-Makefile
@@ -1,32 +1,43 @@
---- Makefile.orig 2008-03-14 00:55:41.000000000 +0800
-+++ Makefile 2008-03-17 21:14:55.000000000 +0800
-@@ -1,19 +1,19 @@
+--- Makefile.orig 2008-12-22 15:03:15.000000000 +0300
++++ Makefile 2011-06-13 16:39:07.748652935 +0400
+@@ -1,5 +1,5 @@
-DESTDIR = /
-PREFIX = /usr
+DESTDIR ?= /
+PREFIX ?= /usr
##########
+ # Comment this out if you dont want SSL
+@@ -7,11 +7,11 @@
+
+ ##########
+ # Location of openssl installation
+-SSL_DIR = /usr
++SSL_DIR ?= /usr
+
+ ##########
# If using FreeBSD or OpenBSD COMMENT the below lines
-LIBS = -ldl
+#LIBS = -ldl
# For any distro
- #ADD_PLUGINS = mysqlloggingplugin.so sqliteloggingplugin.so postgresqlloggingplugin.so dbfilterplugin.so
- ##########
+ #ADD_PLUGINS = mysqlloggingplugin.so sqliteloggingplugin.so postgresqlloggingplugin.so dbfilterplugin.so dbresponderplugin.so
+@@ -23,11 +23,11 @@
+ SSL_OBJS = sslstate.o
+ endif
-CXX = g++
+CXX ?= g++
--CXXFLAGS = -Wall -O2 -fPIC
-+CXXFLAGS ?= -Wall -O2 -fPIC
+-CXXFLAGS = -Wall -O2 -fPIC $(SSL_FLAGS)
++CXXFLAGS ?= -Wall -O2 -fPIC $(SSL_FLAGS)
-PLUGIN_FLAGS = $(LIBS) -fPIC -shared -Wl,-soname,$@ -o $@
+PLUGIN_FLAGS ?= $(LIBS) -fPIC -shared -Wl,-soname,$@ -o $@
- IMSPECTOR_OBJS = main.o protocolplugin.o loggingplugin.o filterplugin.o
+ IMSPECTOR_OBJS = main.o protocolplugin.o loggingplugin.o filterplugin.o responderplugin.o $(SSL_OBJS)
-@@ -117,15 +117,15 @@
+@@ -162,15 +162,15 @@
install: imspector libimspector.so $(PLUGINS)
-mkdir -p $(DESTDIR)/$(PREFIX)/sbin
-mkdir -p $(DESTDIR)/$(PREFIX)/lib/imspector
@@ -34,7 +45,7 @@
- -install libimspector.so $(DESTDIR)/$(PREFIX)/lib/libimspector.so
+ -${BSD_INSTALL_PROGRAM} imspector $(DESTDIR)/$(PREFIX)/sbin/imspector
+ -${BSD_INSTALL_PROGRAM} libimspector.so $(DESTDIR)/$(PREFIX)/lib/libimspector.so
- -(for PLUGIN in $(PLUGINS); do \
+ -(for PLUGIN in $(PLUGINS) $(ADD_PLUGINS); do \
- install $$PLUGIN $(DESTDIR)/$(PREFIX)/lib/imspector/$$PLUGIN; \
+ ${BSD_INSTALL_PROGRAM} $$PLUGIN $(DESTDIR)/$(PREFIX)/lib/imspector/$$PLUGIN; \
done);
@@ -42,10 +53,10 @@
- -install imspector.conf $(DESTDIR)/$(PREFIX)/etc/imspector/imspector.conf
- -install badwords.txt $(DESTDIR)/$(PREFIX)/etc/imspector/badwords.txt
- -install acl.txt $(DESTDIR)/$(PREFIX)/etc/imspector/acl.txt
-+ -mkdir -p $(DESTDIR)/${ETCDIR}
-+ -${BSD_INSTALL_DATA} imspector.conf $(DESTDIR)/${ETCDIR}/imspector.conf.sample
-+ -${BSD_INSTALL_DATA} badwords.txt $(DESTDIR)/${ETCDIR}/badwords.txt.sample
-+ -${BSD_INSTALL_DATA} acl.txt $(DESTDIR)/${ETCDIR}/acl.txt.sample
++ -mkdir -p $(DESTDIR)/$(ETCDIR)
++ -${BSD_INSTALL_DATA} imspector.conf $(DESTDIR)/$(ETCDIR)/imspector.conf.sample
++ -${BSD_INSTALL_DATA} badwords.txt $(DESTDIR)/$(ETCDIR)/badwords.txt.sample
++ -${BSD_INSTALL_DATA} acl.txt $(DESTDIR)/$(ETCDIR)/acl.txt.sample
-mkdir -p /var/log/imspector
+ -mkdir -p /var/lib/imspector
- uninstall:
diff --git a/net-im/imspector/files/patch-icqprotocolplugin.cpp b/net-im/imspector/files/patch-icqprotocolplugin.cpp
new file mode 100644
index 000000000000..84ef455bed87
--- /dev/null
+++ b/net-im/imspector/files/patch-icqprotocolplugin.cpp
@@ -0,0 +1,11 @@
+--- icqprotocolplugin.cpp.orig 2011-06-10 23:51:17.870320723 +0400
++++ icqprotocolplugin.cpp 2011-06-10 23:54:37.586036961 +0400
+@@ -673,7 +673,7 @@
+ size_t inbytesleft = mylength - 4;
+ size_t outbytesleft = BUFFER_SIZE - 1; /* Trailing \0 */
+ size_t result = iconv(iconv_utf16be_utf8,
+- &inbuf, &inbytesleft, &outbuf, &outbytesleft);
++ (const char**) &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+
+ if (result == (size_t) -1)
+ {
diff --git a/net-im/imspector/files/patch-imspector.conf b/net-im/imspector/files/patch-imspector.conf
index ebae2c39a8e3..293a20e6ce37 100644
--- a/net-im/imspector/files/patch-imspector.conf
+++ b/net-im/imspector/files/patch-imspector.conf
@@ -1,7 +1,7 @@
---- imspector.conf Thu Mar 13 20:55:41 2008
-+++ imspector.conf Mon Mar 17 15:07:27 2008
-@@ -2,7 +2,7 @@
- #port=16667
+--- imspector.conf.orig 2008-09-04 17:48:13.000000000 +0400
++++ imspector.conf 2011-06-10 23:41:46.273771152 +0400
+@@ -4,7 +4,7 @@
+ #http_port=18080
# This is the default location of protocol and logging plugins.
-#plugin_dir=/usr/lib/imspector
@@ -9,12 +9,43 @@
# For dropping privs - you probably want to do this.
#user=imspector
-@@ -19,7 +19,7 @@
- gg_protocol=on
+@@ -12,19 +12,19 @@
+
+ # SSL support?
+ #ssl=on
+-#ssl_key=/usr/etc/imspector/serverkey.pem
++#ssl_key=%%PREFIX%%/etc/imspector/serverkey.pem
+
+ # Fixed cert?
+-#ssl_cert=/usr/etc/imspector/servercert.pem
++#ssl_cert=%%PREFIX%%/etc/imspector/servercert.pem
+
+ # Or certs created on-the-fly and signed against a CA
+-#ssl_ca_key=/usr/etc/imspector/cakey.pem
+-#ssl_ca_cert=/usr/etc/imspector/cacert.pem
++#ssl_ca_key=%%PREFIX%%/etc/imspector/cakey.pem
++#ssl_ca_cert=%%PREFIX%%/etc/imspector/cacert.pem
+ # And finally a directory to store the created certs
+ #ssl_cert_dir=/var/lib/imspector
+
+ # Directory of CA certs for IM server cert validation
+-#ssl_verify_dir=/usr/lib/ssl/certs
++#ssl_verify_dir=%%PREFIX%%/lib/ssl/certs
+ # Drop connection when the IM server has a bad cert
+ #ssl_verify=block
+
+@@ -70,12 +70,12 @@
+ #sqlite_file=/path/to/file
# Bad words filtering
--#badwords_filename=/etc/imspector/badwords.txt
+-#badwords_filename=/usr/etc/imspector/badwords.txt
+#badwords_filename=%%PREFIX%%/etc/imspector/badwords.txt
#badwords_replace_character=*
#badwords_block_count=1
+ # ACL
+-#acl_filename=/usr/etc/imspector/acl.txt
++#acl_filename=%%PREFIX%%/etc/imspector/acl.txt
+
+ # SQLite-backed filter
+ #db_filter_filename=/path/to/file
diff --git a/net-im/imspector/pkg-plist b/net-im/imspector/pkg-plist
index 1505b4edb9e0..bb81dffc9ac8 100644
--- a/net-im/imspector/pkg-plist
+++ b/net-im/imspector/pkg-plist
@@ -7,9 +7,15 @@
@unexec if cmp -s %D/%%ETCDIR%%/imspector.conf.sample %D/%%ETCDIR%%/imspector.conf; then rm -f %D/%%ETCDIR%%/imspector.conf; fi
%%ETCDIR%%/imspector.conf.sample
@exec if [ ! -f %D/%%ETCDIR%%/imspector.conf ] ; then cp -p %D/%F %B/imspector.conf; fi
+@exec /bin/mkdir -p /var/lib/imspector
+@exec /bin/mkdir -p /var/log/imspector
lib/imspector/aclfilterplugin.so
lib/imspector/badwordsfilterplugin.so
+lib/imspector/catsloggingplugin.so
+lib/imspector/censordfilterplugin.so
lib/imspector/debugloggingplugin.so
+lib/imspector/httpsprotocolplugin.so
+lib/imspector/jabberprotocolplugin.so
lib/imspector/fileloggingplugin.so
lib/imspector/ggprotocolplugin.so
lib/imspector/icqprotocolplugin.so
@@ -21,3 +27,6 @@ lib/libimspector.so
sbin/imspector
@dirrmtry etc/imspector
@dirrm lib/imspector
+@cwd /
+@dirrmtry var/lib/imspector
+@dirrmtry var/log/imspector