# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # imspector-devel # imspector-devel/pkg-plist # imspector-devel/files # imspector-devel/files/patch-imspector.conf # imspector-devel/files/imspector.in # imspector-devel/files/patch-main.cpp # imspector-devel/files/patch-Makefile # imspector-devel/files/patch-icqprotocolplugin.cpp # imspector-devel/Makefile # imspector-devel/pkg-descr # imspector-devel/distinfo # echo c - imspector-devel mkdir -p imspector-devel > /dev/null 2>&1 echo x - imspector-devel/pkg-plist sed 's/^X//' >imspector-devel/pkg-plist << 'f060f30ab66c4046a25e454add09f88e' X@unexec if cmp -s %D/%%ETCDIR%%/acl.txt.sample %D/%%ETCDIR%%/acl.txt; then rm -f %D/%%ETCDIR%%/acl.txt; fi X%%ETCDIR%%/acl.txt.sample X@exec if [ ! -f %D/%%ETCDIR%%/acl.txt ] ; then cp -p %D/%F %B/acl.txt; fi X@unexec if cmp -s %D/%%ETCDIR%%/badwords.txt.sample %D/%%ETCDIR%%/badwords.txt; then rm -f %D/%%ETCDIR%%/badwords.txt; fi X%%ETCDIR%%/badwords.txt.sample X@exec if [ ! -f %D/%%ETCDIR%%/badwords.txt ] ; then cp -p %D/%F %B/badwords.txt; fi X@unexec if cmp -s %D/%%ETCDIR%%/imspector.conf.sample %D/%%ETCDIR%%/imspector.conf; then rm -f %D/%%ETCDIR%%/imspector.conf; fi X%%ETCDIR%%/imspector.conf.sample X@exec if [ ! -f %D/%%ETCDIR%%/imspector.conf ] ; then cp -p %D/%F %B/imspector.conf; fi X@exec /bin/mkdir -p /var/lib/imspector X@exec /bin/mkdir -p /var/log/imspector Xlib/imspector/aclfilterplugin.so Xlib/imspector/badwordsfilterplugin.so Xlib/imspector/catsloggingplugin.so Xlib/imspector/censordfilterplugin.so Xlib/imspector/debugloggingplugin.so Xlib/imspector/httpsprotocolplugin.so Xlib/imspector/jabberprotocolplugin.so Xlib/imspector/fileloggingplugin.so Xlib/imspector/ggprotocolplugin.so Xlib/imspector/icqprotocolplugin.so Xlib/imspector/ircprotocolplugin.so Xlib/imspector/miscfilterplugin.so Xlib/imspector/msnprotocolplugin.so Xlib/imspector/yahooprotocolplugin.so Xlib/libimspector.so Xsbin/imspector X@dirrmtry etc/imspector X@dirrm lib/imspector X@cwd / X@dirrmtry var/lib/imspector X@dirrmtry var/log/imspector f060f30ab66c4046a25e454add09f88e echo c - imspector-devel/files mkdir -p imspector-devel/files > /dev/null 2>&1 echo x - imspector-devel/files/patch-imspector.conf sed 's/^X//' >imspector-devel/files/patch-imspector.conf << '6159e588cee2fee9c8ba896fe269d789' X--- imspector.conf.orig 2008-09-04 17:48:13.000000000 +0400 X+++ imspector.conf 2011-06-10 23:41:46.273771152 +0400 X@@ -4,7 +4,7 @@ X #http_port=18080 X X # This is the default location of protocol and logging plugins. X-#plugin_dir=/usr/lib/imspector X+#plugin_dir=%%PREFIX%%/lib/imspector X X # For dropping privs - you probably want to do this. X #user=imspector X@@ -12,19 +12,19 @@ X X # SSL support? X #ssl=on X-#ssl_key=/usr/etc/imspector/serverkey.pem X+#ssl_key=%%PREFIX%%/etc/imspector/serverkey.pem X X # Fixed cert? X-#ssl_cert=/usr/etc/imspector/servercert.pem X+#ssl_cert=%%PREFIX%%/etc/imspector/servercert.pem X X # Or certs created on-the-fly and signed against a CA X-#ssl_ca_key=/usr/etc/imspector/cakey.pem X-#ssl_ca_cert=/usr/etc/imspector/cacert.pem X+#ssl_ca_key=%%PREFIX%%/etc/imspector/cakey.pem X+#ssl_ca_cert=%%PREFIX%%/etc/imspector/cacert.pem X # And finally a directory to store the created certs X #ssl_cert_dir=/var/lib/imspector X X # Directory of CA certs for IM server cert validation X-#ssl_verify_dir=/usr/lib/ssl/certs X+#ssl_verify_dir=%%PREFIX%%/lib/ssl/certs X # Drop connection when the IM server has a bad cert X #ssl_verify=block X X@@ -70,12 +70,12 @@ X #sqlite_file=/path/to/file X X # Bad words filtering X-#badwords_filename=/usr/etc/imspector/badwords.txt X+#badwords_filename=%%PREFIX%%/etc/imspector/badwords.txt X #badwords_replace_character=* X #badwords_block_count=1 X X # ACL X-#acl_filename=/usr/etc/imspector/acl.txt X+#acl_filename=%%PREFIX%%/etc/imspector/acl.txt X X # SQLite-backed filter X #db_filter_filename=/path/to/file 6159e588cee2fee9c8ba896fe269d789 echo x - imspector-devel/files/imspector.in sed 's/^X//' >imspector-devel/files/imspector.in << 'ac995636a35e3b04fd2333e7b3b48a76' X#!/bin/sh X X# PROVIDE: imspector X# REQUIRE: LOGIN X# KEYWORD: shutdown X# X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# imspector_enable (bool): Set to NO by default. X# Set it to YES to enable imspector. X# imspector_config (path): Set to %%PREFIX%%/etc/imspector/imspector.conf X# by default. X# X X. /etc/rc.subr X Xname="imspector" Xrcvar=${name}_enable X Xcommand=%%PREFIX%%/sbin/${name} X Xload_rc_config $name X X: ${imspector_enable="NO"} X: ${imspector_config="%%PREFIX%%/etc/imspector/imspector.conf"} X Xcommand_args="-c $imspector_config" X Xrun_rc_command "$1" ac995636a35e3b04fd2333e7b3b48a76 echo x - imspector-devel/files/patch-main.cpp sed 's/^X//' >imspector-devel/files/patch-main.cpp << 'd69f1e09f27298eb77d9eaad822f4aec' X--- main.cpp.orig 2010-02-23 20:21:10.000000000 +0300 X+++ main.cpp 2011-11-08 19:05:36.000000000 +0400 X@@ -17,11 +17,11 @@ X #include "imspector.h" X X /*! The default location for where to find the config file. */ X-#define DEFAULT_CONFIG "/usr/etc/imspector/imspector.conf" X+#define DEFAULT_CONFIG "%%PREFIX%%/etc/imspector/imspector.conf" X /*! The location of the logging process's UNIX socket. */ X #define LOGGING_SOCKET "/tmp/.imspectorlog" X /*! The default place for where to find plugins. */ X-#define DEFAULT_PLUGIN_DIR "/usr/lib/imspector" X+#define DEFAULT_PLUGIN_DIR "%%PREFIX%%/lib/imspector" X X #define DEFAULT_RESPONSE_PREFIX "Message from IMSpector: -=" X #define DEFAULT_RESPONSE_POSTFIX "=-" d69f1e09f27298eb77d9eaad822f4aec echo x - imspector-devel/files/patch-Makefile sed 's/^X//' >imspector-devel/files/patch-Makefile << 'fa02da8cc28b24c33946ff241d33e044' X--- Makefile.orig 2008-12-22 15:03:15.000000000 +0300 X+++ Makefile 2011-06-14 14:26:22.072210675 +0400 X@@ -1,5 +1,5 @@ X-DESTDIR = / X-PREFIX = /usr X+DESTDIR ?= / X+PREFIX ?= /usr X X ########## X # Comment this out if you dont want SSL X@@ -7,11 +7,11 @@ X X ########## X # Location of openssl installation X-SSL_DIR = /usr X+SSL_DIR ?= /usr X X ########## X # If using FreeBSD or OpenBSD COMMENT the below lines X-LIBS = -ldl X+#LIBS = -ldl X X # For any distro X #ADD_PLUGINS = mysqlloggingplugin.so sqliteloggingplugin.so postgresqlloggingplugin.so dbfilterplugin.so dbresponderplugin.so X@@ -23,11 +23,11 @@ X SSL_OBJS = sslstate.o X endif X X-CXX = g++ X+CXX ?= g++ X X-CXXFLAGS = -Wall -O2 -fPIC $(SSL_FLAGS) X+CXXFLAGS ?= -Wall -O2 -fPIC $(SSL_FLAGS) X X-PLUGIN_FLAGS = $(LIBS) -fPIC -shared -Wl,-soname,$@ -o $@ X+PLUGIN_FLAGS ?= $(LIBS) -fPIC -shared -Wl,-soname,$@ -o $@ X X IMSPECTOR_OBJS = main.o protocolplugin.o loggingplugin.o filterplugin.o responderplugin.o $(SSL_OBJS) X X@@ -54,7 +54,7 @@ X msnprotocolplugin.so: msnprotocolplugin.o libimspector.so X $(CXX) msnprotocolplugin.o libimspector.so $(PLUGIN_FLAGS) X icqprotocolplugin.so: icqprotocolplugin.o libimspector.so X- $(CXX) icqprotocolplugin.o libimspector.so $(PLUGIN_FLAGS) X+ $(CXX) icqprotocolplugin.o libimspector.so $(PLUGIN_FLAGS) -liconv -L${LOCALBASE}/lib X yahooprotocolplugin.so: yahooprotocolplugin.o libimspector.so X $(CXX) yahooprotocolplugin.o libimspector.so $(PLUGIN_FLAGS) X ircprotocolplugin.so: ircprotocolplugin.o libimspector.so X@@ -162,15 +162,15 @@ X install: imspector libimspector.so $(PLUGINS) X -mkdir -p $(DESTDIR)/$(PREFIX)/sbin X -mkdir -p $(DESTDIR)/$(PREFIX)/lib/imspector X- -install imspector $(DESTDIR)/$(PREFIX)/sbin/imspector X- -install libimspector.so $(DESTDIR)/$(PREFIX)/lib/libimspector.so X+ -${BSD_INSTALL_PROGRAM} imspector $(DESTDIR)/$(PREFIX)/sbin/imspector X+ -${BSD_INSTALL_PROGRAM} libimspector.so $(DESTDIR)/$(PREFIX)/lib/libimspector.so X -(for PLUGIN in $(PLUGINS) $(ADD_PLUGINS); do \ X- install $$PLUGIN $(DESTDIR)/$(PREFIX)/lib/imspector/$$PLUGIN; \ X+ ${BSD_INSTALL_PROGRAM} $$PLUGIN $(DESTDIR)/$(PREFIX)/lib/imspector/$$PLUGIN; \ X done); X- -mkdir -p $(DESTDIR)/$(PREFIX)/etc/imspector X- -install imspector.conf $(DESTDIR)/$(PREFIX)/etc/imspector/imspector.conf X- -install badwords.txt $(DESTDIR)/$(PREFIX)/etc/imspector/badwords.txt X- -install acl.txt $(DESTDIR)/$(PREFIX)/etc/imspector/acl.txt X+ -mkdir -p $(DESTDIR)/$(ETCDIR) X+ -${BSD_INSTALL_DATA} imspector.conf $(DESTDIR)/$(ETCDIR)/imspector.conf.sample X+ -${BSD_INSTALL_DATA} badwords.txt $(DESTDIR)/$(ETCDIR)/badwords.txt.sample X+ -${BSD_INSTALL_DATA} acl.txt $(DESTDIR)/$(ETCDIR)/acl.txt.sample X -mkdir -p /var/log/imspector X -mkdir -p /var/lib/imspector X fa02da8cc28b24c33946ff241d33e044 echo x - imspector-devel/files/patch-icqprotocolplugin.cpp sed 's/^X//' >imspector-devel/files/patch-icqprotocolplugin.cpp << '766030a0c684c7240e70a80cb650abb3' X--- icqprotocolplugin.cpp.orig 2010-11-23 17:53:29.000000000 +0300 X+++ icqprotocolplugin.cpp 2011-11-08 19:13:36.000000000 +0400 X@@ -10,6 +10,7 @@ X * in the README file. */ X X #include "imspector.h" X+#include X X #define PLUGIN_NAME "ICQ-AIM IMSpector protocol plugin" X #define PROTOCOL_NAME "ICQ-AIM" X@@ -675,7 +676,7 @@ X size_t inbytesleft = mylength - 4; X size_t outbytesleft = BUFFER_SIZE - 1; /* Trailing \0 */ X size_t result = iconv(iconv_utf16be_utf8, X- &inbuf, &inbytesleft, &outbuf, &outbytesleft); X+ (const char**) &inbuf, &inbytesleft, &outbuf, &outbytesleft); X X if (result == (size_t) -1) X { X@@ -810,7 +811,7 @@ X GET_TYPE(uint16_t) X X # if __BYTE_ORDER == __BIG_ENDIAN X- *rc = __bswap_16(*rc); X+ *rc = bswap16(*rc); X #endif X X return true; 766030a0c684c7240e70a80cb650abb3 echo x - imspector-devel/Makefile sed 's/^X//' >imspector-devel/Makefile << '904b96a43b24a895b529a6f943de304a' X# New ports collection makefile for: imspector-devel X# Date created: 08 Nov 2011 X# Whom: Mikhail T. X# X XPORTNAME= imspector XPORTVERSION= 20111108 XCATEGORIES= net-im XMASTER_SITES= http://www.imspector.org/downloads/snapshots/ X XMAINTAINER= m.tsatsenko@gmail.com XCOMMENT= IM transparent proxy with monitoring, blocking and content-filtering X XLICENSE= GPLv2 X XCFLAGS+= -fPIC -I ${LOCALBASE}/include -DHAVE_SSL XUSE_GMAKE= YES XUSE_ICONV= YES XUSE_OPENSSL= YES X XCONFLICTS= imspector-0.* X XLATEST_LINK= imspector-devel X XCONFIG_FILES= imspector.conf badwords.txt acl.txt X XUSE_RC_SUBR= ${PORTNAME} X XMAKE_ENV+= ETCDIR=${ETCDIR} X Xpost-extract: X ${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC} Xpost-patch: X @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \ X ${WRKSRC}/imspector.conf \ X ${WRKSRC}/main.cpp Xpost-install: X.for f in ${CONFIG_FILES} X @if [ ! -f ${ETCDIR}/${f} ]; then \ X ${CP} -p ${ETCDIR}/${f}.sample ${ETCDIR}/${f} ; \ X fi X.endfor X X.include 904b96a43b24a895b529a6f943de304a echo x - imspector-devel/pkg-descr sed 's/^X//' >imspector-devel/pkg-descr << '799e608bf544c638c6902784df612f19' XIMSpector is an Instant Messenger transparent proxy with monitoring, Xblocking, and content-filtering capabilities. X XThis is the development version from daily snapshots. X XWWW: http://www.imspector.org/ 799e608bf544c638c6902784df612f19 echo x - imspector-devel/distinfo sed 's/^X//' >imspector-devel/distinfo << '254e5a4a5334d55eb2b078483a4a2892' XSHA256 (imspector-20111108.tar.gz) = 36f3b1f3b722dc1e4aa7a020f07ef17fa71da060f2290e5e63b9887da70d8c82 XSIZE (imspector-20111108.tar.gz) = 88601 254e5a4a5334d55eb2b078483a4a2892 exit