summaryrefslogtreecommitdiff
path: root/net-im/imspector
diff options
context:
space:
mode:
authorMichael Scheidell <scheidell@FreeBSD.org>2012-06-24 17:36:25 +0000
committerMichael Scheidell <scheidell@FreeBSD.org>2012-06-24 17:36:25 +0000
commit92a638a8b902e0863bd3ad7a51298396aa0b840d (patch)
treed3cc791ddcc9d4e78c45b3c10aefa1e186435c0e /net-im/imspector
parent- Change pre-install: to post-install: (diff)
- Update to 20111108
- Add MSN 2011 protocol support PR: ports/162511 Submitted by: "Mikhail T." <m.tsatsenko@gmail.com> (maintainer)
Notes
Notes: svn path=/head/; revision=299901
Diffstat (limited to 'net-im/imspector')
-rw-r--r--net-im/imspector/Makefile10
-rw-r--r--net-im/imspector/distinfo4
-rw-r--r--net-im/imspector/files/imspector.in6
-rw-r--r--net-im/imspector/files/patch-icqprotocolplugin.cpp23
-rw-r--r--net-im/imspector/files/patch-main.cpp14
-rw-r--r--net-im/imspector/pkg-descr2
-rw-r--r--net-im/imspector/pkg-plist7
7 files changed, 45 insertions, 21 deletions
diff --git a/net-im/imspector/Makefile b/net-im/imspector/Makefile
index 9405f6c1cb8a..40c334a5c49b 100644
--- a/net-im/imspector/Makefile
+++ b/net-im/imspector/Makefile
@@ -6,19 +6,21 @@
#
PORTNAME= imspector
-PORTVERSION= 0.9
-PORTREVISION= 1
+PORTVERSION= 20111108
CATEGORIES= net-im
-MASTER_SITES= http://www.imspector.org/downloads/
+MASTER_SITES= http://www.imspector.org/downloads/ \
+ http://tsatsenko.ru/ports/distfiles/
MAINTAINER= m.tsatsenko@gmail.com
COMMENT= IM transparent proxy with monitoring, blocking and content-filtering
LICENSE= GPLv2
+
CFLAGS+= -fPIC -I ${LOCALBASE}/include -DHAVE_SSL
USE_GMAKE= YES
USE_ICONV= YES
USE_OPENSSL= YES
+USE_LDCONFIG= ${LOCALBASE}/lib/imspector
CONFIG_FILES= imspector.conf badwords.txt acl.txt
@@ -26,6 +28,8 @@ USE_RC_SUBR= ${PORTNAME}
MAKE_ENV+= ETCDIR=${ETCDIR}
+post-extract:
+ ${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
post-patch:
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
${WRKSRC}/imspector.conf \
diff --git a/net-im/imspector/distinfo b/net-im/imspector/distinfo
index 8b4fdc7246de..1c6218e048e5 100644
--- a/net-im/imspector/distinfo
+++ b/net-im/imspector/distinfo
@@ -1,2 +1,2 @@
-SHA256 (imspector-0.9.tar.gz) = f864110caa72d0fd16dc49d593374669e61279d0e83fb381f455b8cef31ca57b
-SIZE (imspector-0.9.tar.gz) = 66087
+SHA256 (imspector-20111108.tar.gz) = 36f3b1f3b722dc1e4aa7a020f07ef17fa71da060f2290e5e63b9887da70d8c82
+SIZE (imspector-20111108.tar.gz) = 88601
diff --git a/net-im/imspector/files/imspector.in b/net-im/imspector/files/imspector.in
index 412e1dde1870..4100b9f76189 100644
--- a/net-im/imspector/files/imspector.in
+++ b/net-im/imspector/files/imspector.in
@@ -9,21 +9,21 @@
#
# imspector_enable (bool): Set to NO by default.
# Set it to YES to enable imspector.
-# imspector_config (path): Set to %%PREFIX%%/etc/imspector/imspector.conf
+# imspector_config (path): Set to %%ETCDIR%%/imspector.conf
# by default.
#
. /etc/rc.subr
name="imspector"
-rcvar=imspector_enable
+rcvar=${name}_enable
command=%%PREFIX%%/sbin/${name}
load_rc_config $name
: ${imspector_enable="NO"}
-: ${imspector_config="%%PREFIX%%/etc/imspector/imspector.conf"}
+: ${imspector_config="%%ETCDIR%%/imspector.conf"}
command_args="-c $imspector_config"
diff --git a/net-im/imspector/files/patch-icqprotocolplugin.cpp b/net-im/imspector/files/patch-icqprotocolplugin.cpp
index 84ef455bed87..02e0d38e18fc 100644
--- a/net-im/imspector/files/patch-icqprotocolplugin.cpp
+++ b/net-im/imspector/files/patch-icqprotocolplugin.cpp
@@ -1,6 +1,14 @@
---- 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 @@
+--- icqprotocolplugin.cpp.orig 2010-11-23 17:53:29.000000000 +0300
++++ icqprotocolplugin.cpp 2011-11-08 19:13:36.000000000 +0400
+@@ -10,6 +10,7 @@
+ * in the README file. */
+
+ #include "imspector.h"
++#include <sys/endian.h>
+
+ #define PLUGIN_NAME "ICQ-AIM IMSpector protocol plugin"
+ #define PROTOCOL_NAME "ICQ-AIM"
+@@ -675,7 +676,7 @@
size_t inbytesleft = mylength - 4;
size_t outbytesleft = BUFFER_SIZE - 1; /* Trailing \0 */
size_t result = iconv(iconv_utf16be_utf8,
@@ -9,3 +17,12 @@
if (result == (size_t) -1)
{
+@@ -810,7 +811,7 @@
+ GET_TYPE(uint16_t)
+
+ # if __BYTE_ORDER == __BIG_ENDIAN
+- *rc = __bswap_16(*rc);
++ *rc = bswap16(*rc);
+ #endif
+
+ return true;
diff --git a/net-im/imspector/files/patch-main.cpp b/net-im/imspector/files/patch-main.cpp
index afd558343a68..2b06b18d5147 100644
--- a/net-im/imspector/files/patch-main.cpp
+++ b/net-im/imspector/files/patch-main.cpp
@@ -1,14 +1,16 @@
---- main.cpp Thu Mar 13 20:55:41 2008
-+++ main.cpp Mon Mar 17 15:07:27 2008
-@@ -9,9 +9,9 @@
-
+--- main.cpp.orig 2010-02-23 20:21:10.000000000 +0300
++++ main.cpp 2011-11-08 19:05:36.000000000 +0400
+@@ -17,11 +17,11 @@
#include "imspector.h"
+ /*! The default location for where to find the config file. */
-#define DEFAULT_CONFIG "/usr/etc/imspector/imspector.conf"
+#define DEFAULT_CONFIG "%%PREFIX%%/etc/imspector/imspector.conf"
+ /*! The location of the logging process's UNIX socket. */
#define LOGGING_SOCKET "/tmp/.imspectorlog"
+ /*! The default place for where to find plugins. */
-#define DEFAULT_PLUGIN_DIR "/usr/lib/imspector"
+#define DEFAULT_PLUGIN_DIR "%%PREFIX%%/lib/imspector"
- std::vector<class ProtocolPlugin> protocolplugins;
- std::vector<class FilterPlugin> filterplugins;
+ #define DEFAULT_RESPONSE_PREFIX "Message from IMSpector: -="
+ #define DEFAULT_RESPONSE_POSTFIX "=-"
diff --git a/net-im/imspector/pkg-descr b/net-im/imspector/pkg-descr
index 302a46cae56b..7f5ac0bc7bb8 100644
--- a/net-im/imspector/pkg-descr
+++ b/net-im/imspector/pkg-descr
@@ -1,4 +1,6 @@
IMSpector is an Instant Messenger transparent proxy with monitoring,
blocking, and content-filtering capabilities.
+This is the development version from daily snapshots.
+
WWW: http://www.imspector.org/
diff --git a/net-im/imspector/pkg-plist b/net-im/imspector/pkg-plist
index bb81dffc9ac8..c0fd4592263c 100644
--- a/net-im/imspector/pkg-plist
+++ b/net-im/imspector/pkg-plist
@@ -25,8 +25,7 @@ lib/imspector/msnprotocolplugin.so
lib/imspector/yahooprotocolplugin.so
lib/libimspector.so
sbin/imspector
-@dirrmtry etc/imspector
+@dirrmtry %%ETCDIR%%
@dirrm lib/imspector
-@cwd /
-@dirrmtry var/lib/imspector
-@dirrmtry var/log/imspector
+@unexec rmdir /var/lib/imspector 2>/dev/null || true
+@unexec rmdir /var/log/imspector 2>/dev/null || true