summaryrefslogtreecommitdiff
path: root/security/squidclam
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2005-07-20 17:43:59 +0000
committerRenato Botelho <garga@FreeBSD.org>2005-07-20 17:43:59 +0000
commit172f2acbd860477aa865c8c4d208587c287008ec (patch)
tree388c318596dd676210b491cd1a78d48bed138212 /security/squidclam
parent- Update to 2.3-20050716 (diff)
Bridge betwean ClamAV antivirus software and Squid caching proxy.
Squidclam is a replacement for SquidClamAV-Redirector.py written in C using libclamav and libcurl Author: squidclam@users.sourceforge.net WWW: http://sourceforge.net/projects/squidclam/ PR: ports/82652 Submitted by: Alexander Novitsky <alecn2002@yandex.ru> Approved by: flz (mentor)
Notes
Notes: svn path=/head/; revision=139724
Diffstat (limited to 'security/squidclam')
-rw-r--r--security/squidclam/Makefile53
-rw-r--r--security/squidclam/distinfo2
-rw-r--r--security/squidclam/files/patch-configure57
-rw-r--r--security/squidclam/files/pkg-message.in9
-rw-r--r--security/squidclam/pkg-descr7
5 files changed, 128 insertions, 0 deletions
diff --git a/security/squidclam/Makefile b/security/squidclam/Makefile
new file mode 100644
index 000000000000..d1af0b3345b7
--- /dev/null
+++ b/security/squidclam/Makefile
@@ -0,0 +1,53 @@
+# New ports collection makefile for: squidclam
+# Date created: 2005-06-26
+# Whom: Alexander Novitsky <alecn2002@yandex.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= squidclam
+PORTVERSION= 0.11
+CATEGORIES= security
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+
+MAINTAINER= alecn2002@yandex.ru
+COMMENT= Bridge betwean ClamAV antivirus software and Squid caching proxy
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/clamscan:${PORTSDIR}/security/clamav \
+ ${LOCALBASE}/bin/curl:${PORTSDIR}/ftp/curl
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+USE_REINPLACE= yes
+NO_INSTALL_MANPAGES= yes
+
+PORTDOCS= README Changelog
+
+SUB_FILES= pkg-message
+
+PLIST_FILES= bin/squidclam %%EXAMPLESDIR%%/squidclam.conf
+PLIST_DIRS= %%EXAMPLESDIR%%
+
+.include <bsd.port.pre.mk>
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ -e 's|%%PREFIX%%|${PREFIX}|g' \
+ ${WRKSRC}/configure
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/$f ${DOCSDIR}/$f
+.endfor
+.endif
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/sample.conf ${EXAMPLESDIR}/${PORTNAME}.conf
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/security/squidclam/distinfo b/security/squidclam/distinfo
new file mode 100644
index 000000000000..74ac0cd5c00f
--- /dev/null
+++ b/security/squidclam/distinfo
@@ -0,0 +1,2 @@
+MD5 (squidclam-0.11.tar.gz) = a15a1f1d61f79c7f6b7830b9a45906b7
+SIZE (squidclam-0.11.tar.gz) = 10495
diff --git a/security/squidclam/files/patch-configure b/security/squidclam/files/patch-configure
new file mode 100644
index 000000000000..362e602c7fa8
--- /dev/null
+++ b/security/squidclam/files/patch-configure
@@ -0,0 +1,57 @@
+--- configure.orig Sun Apr 24 23:40:07 2005
++++ configure Sun Jun 26 01:49:42 2005
+@@ -4,52 +4,16 @@
+
+ CLAMLIBS="`clamav-config --libs || exit -1`"
+ CURLLIBS="`curl-config --libs || exit -1`"
+-CFLAGS="$CFLAGS $CURLLIBS $CLAMLIBS -lclamav -lcurl"
++CFLAGS="-I%%LOCALBASE%%/include $CFLAGS $CURLLIBS $CLAMLIBS -lclamav -lcurl"
+ OUTFILE=Makefile
+ BINARY=squidclam
+-TMPFILE=`mktemp`
+
+ # only use libs once
+ CFLAGS="`echo $CFLAGS | tr ' ' '\n' | sort -u | tr '\n' ' '`"
+
+-# no options allowed
+-if test $# -ne 0
+-then
+- echo ""
+- echo "This is just a very small script. No Options available."
+- echo "If you like to provide me with a better one please do :)"
+- echo ""
+- exit -1
+-fi
+-
+-# compiler test
+-if test x"$CC" = "x"
+-then
+- CC="gcc -Wall"
+-fi
+-
+-# can we generate an executable
+-cat > $TMPFILE.c << EOF
+-int main (void) {
+- return 0;
+-}
+-EOF
+-
+-$CC -o $TMPFILE.exe $TMPFILE.c
+-
+-if test $? -ne 0
+-then
+- echo "compiler not able to generate an executable"
+- exit -1
+-else
+- rm -f $TMPFILE*
+-fi
+-
+ # write makefile
+ cat > $OUTFILE << EOF
+-ifndef \$(DESTDIR)
+- DESTDIR="/usr/local/bin"
+-endif
++DESTDIR?= "%%PREFIX%%/bin"
+
+ CFLAGS=$CFLAGS
+
diff --git a/security/squidclam/files/pkg-message.in b/security/squidclam/files/pkg-message.in
new file mode 100644
index 000000000000..ce88a5e097ef
--- /dev/null
+++ b/security/squidclam/files/pkg-message.in
@@ -0,0 +1,9 @@
+***********************************************************************
+*
+* To use this software you need to make changes in squid config file.
+* Please refer to %%DOCSDIR%%/README.
+* You may find example of config file for this software here:
+* %%EXAMPLESDIR%%/squidclam.conf
+* Plce your work copy of squidclam.conf into %%PREFIX%%/etc/ directory.
+*
+***********************************************************************
diff --git a/security/squidclam/pkg-descr b/security/squidclam/pkg-descr
new file mode 100644
index 000000000000..27ebe37cee97
--- /dev/null
+++ b/security/squidclam/pkg-descr
@@ -0,0 +1,7 @@
+Bridge betwean ClamAV antivirus software and Squid caching proxy.
+
+Squidclam is a replacement for SquidClamAV-Redirector.py written
+in C using libclamav and libcurl
+
+Author: squidclam@users.sourceforge.net
+WWW: http://sourceforge.net/projects/squidclam/