svn commit: r302543 - in head: . www/c-icap www/c-icap/files

Martin Matuska mm at FreeBSD.org
Wed Aug 15 00:09:43 UTC 2012


Author: mm
Date: Wed Aug 15 00:09:41 2012
New Revision: 302543
URL: http://svn.freebsd.org/changeset/ports/302543

Log:
  Update c-icap to 0.2.1
  
  PR:		ports/170121
  Approved by:	maintainer (timeout)

Added:
  head/www/c-icap/files/c-icap.in
     - copied, changed from r301491, head/www/c-icap/files/c_icap.in
Deleted:
  head/www/c-icap/files/c_icap.in
  head/www/c-icap/files/patch-Makefile.in
  head/www/c-icap/files/patch-c-icap.conf.in
  head/www/c-icap/files/patch-configure
  head/www/c-icap/files/patch-configure.in
Modified:
  head/GIDs
  head/UIDs
  head/www/c-icap/Makefile
  head/www/c-icap/distinfo
  head/www/c-icap/files/pkg-deinstall.in
  head/www/c-icap/files/pkg-install.in
  head/www/c-icap/pkg-descr
  head/www/c-icap/pkg-plist

Modified: head/GIDs
==============================================================================
--- head/GIDs	Wed Aug 15 00:08:36 2012	(r302542)
+++ head/GIDs	Wed Aug 15 00:09:41 2012	(r302543)
@@ -237,5 +237,6 @@ hadoop:*:955:
 pandora:*:956:
 razorback:*:957:
 gnunet:*:958:
+c_icap:*:959:
 nogroup:*:65533:
 nobody:*:65534:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Wed Aug 15 00:08:36 2012	(r302542)
+++ head/UIDs	Wed Aug 15 00:09:41 2012	(r302543)
@@ -241,4 +241,5 @@ hadoop:*:955:955::0:0:hadoop user:/nonex
 pandora:*:956:956::0:0:Pandora FMS user:/usr/local/etc/pandora/home:/usr/sbin/nologin
 razorback:*:957:957::0:0:Razorback user:/var/run/razorback:/usr/sbin/nologin
 gnunet:*:958:958::0:0:GNUnet daemon:/var/lib/gnunet:/usr/sbin/nologin
+c_icap:*:959:959::0:0:c-icap daemon:/var/empty:/usr/sbin/nologin
 nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin

Modified: head/www/c-icap/Makefile
==============================================================================
--- head/www/c-icap/Makefile	Wed Aug 15 00:08:36 2012	(r302542)
+++ head/www/c-icap/Makefile	Wed Aug 15 00:09:41 2012	(r302543)
@@ -6,93 +6,119 @@
 #
 
 PORTNAME=	c-icap
-PORTVERSION=	060708
-PORTREVISION=	2
-PORTEPOCH=	1
+PORTVERSION=	0.2.1
+PORTEPOCH=	2
 CATEGORIES=	www
-MASTER_SITES=	SF/${PORTNAME}/OldFiles
-DISTNAME=	c_icap-${PORTVERSION}rc2
+MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/0.2.x/
+DISTNAME=	c_icap-${PORTVERSION}
 
-MAINTAINER=	tofig at freebsd.az
-COMMENT=	An implementation of an ICAP server
+MAINTAINER=	mm at FreeBSD.org
+COMMENT=	ICAP server implementation
+
+LICENSE=	LGPL21
+LICENSE_FILE=	${WRKSRC}/COPYING
 
 GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
-USE_RC_SUBR=	c_icap
-USE_AUTOTOOLS=	libtool
+USE_RC_SUBR=	c-icap
 
 SUB_FILES=	pkg-install pkg-deinstall
 
-OPTIONS=	CLAMAV "Build with srv_clamav service" on \
-		LARGE_FILES "Enable large files support" off \
-		IPV6 "Enable IPv6 support" off \
-		PERL "With Perl support" off
+OPTIONS_DEFINE=	BDB IPV6 LDAP PERL POSIXSEM LARGE_FILES
+OPTIONS_DEFAULT=	IPV6
+LARGE_FILES_DESC=	Enable large files support
+POSIXSEM_DESC=		Use POSIX Semaphores instead of SYSV IPC
 
-.include <bsd.port.pre.mk>
+CICAP_USER=	c_icap
+CICAP_GROUP=	c_icap
 
-LOG_DIR=	/var/log/c_icap
-TMP_DIR=	/var/tmp
-RUN_DIR=	/var/run
-PLIST_SUB+=	LOG_DIR=${LOG_DIR} RUN_DIR=${RUN_DIR}
+USERS=		${CICAP_USER}
+GROUPS=		${CICAP_GROUP}
 
-SUB_FILES=	pkg-install pkg-deinstall
-SUB_LIST=	LOG_DIR=${LOG_DIR} TMP_DIR=${TMP_DIR} RUN_DIR=${RUN_DIR}
+MAN8=		c-icap-client.8 \
+		c-icap-config.8 \
+		c-icap-libicapapi-config.8 \
+		c-icap-mkbdb.8 \
+		c-icap-stretch.8 \
+		c-icap.8
 
-.if defined(WITH_PERL)
-USE_PERL5=	yes
-PLIST_SUB+=	PERL=""
-CONFIGURE_ARGS+=	--with-perl=${PERL}
-.else
-PLIST_SUB+=	PERL="@comment "
-CONFIGURE_ARGS+=	--without-perl
+CONFIGURE_ARGS+=	--enable-static
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MBDB}
+USE_BDB=	yes
 .endif
 
-.if !defined(WITHOUT_CLAMAV)
-LIB_DEPENDS+=	clamav.7:${PORTSDIR}/security/clamav
-PLIST_SUB+=	CLAMAV=""
-CONFIGURE_ARGS+=	--with-clamav
-LDFLAGS+=	-L${LOCALBASE}/lib
-CFLAGS+=	-I${LOCALBASE}/include
+.if ${PORT_OPTIONS:MIPV6}
+CONFIGURE_ARGS+=	--enable-ipv6
 .else
-PLIST_SUB+=	CLAMAV="@comment "
-CONFIGURE_ARGS+=	--without-clamav
+CONFIGURE_ARGS+=	--disable-ipv6
 .endif
 
-.if defined(WITH_LARGE_FILES)
+.if ${PORT_OPTIONS:MLARGE_FILES}
 CONFIGURE_ARGS+=	--enable-large-files
 .else
 CONFIGURE_ARGS+=	--disable-large-files
 .endif
 
-.if defined(WITH_IPV6)
-CONFIGURE_ARGS+=	--enable-ipv6
+.if ${PORT_OPTIONS:MLDAP}
+USE_OPENLDAP=	YES
+.endif
+
+.if ${PORT_OPTIONS:MPERL}
+USE_PERL5=	yes
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MBDB}
+CFLAGS+=	-I${BDB_INCLUDE_DIR}
+LDFLAGS+=	-L${BDB_LIB_DIR}
+CONFIGURE_ARGS+=	--with-bdb=yes
+PLIST_SUB+=	BDB=""
 .else
-CONFIGURE_ARGS+=	--disable-ipv6
+CONFIGURE_ARGS+=	--with-bdb=no
+PLIST_SUB+=	BDB="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MLDAP}
+CONFIGURE_ARGS+=	--with-ldap=yes
+PLIST_SUB+=	LDAP=""
+.else
+CONFIGURE_ARGS+=	--with-ldap=no
+PLIST_SUB+=	LDAP="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MPERL}
+PLIST_SUB+=	PERL=""
+CONFIGURE_ARGS+=	--with-perl=${PERL}
+.else
+PLIST_SUB+=	PERL="@comment "
+CONFIGURE_ARGS+=	--without-perl
+.endif
+
+CFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+
+LOG_DIR=	/var/log/c-icap
+RUN_DIR=	/var/run/c-icap
+PLIST_SUB+=	LOG_DIR=${LOG_DIR} RUN_DIR=${RUN_DIR}
+
+SUB_FILES=	pkg-install pkg-deinstall
+SUB_LIST=	CICAP_USER=${CICAP_USER} CICAP_GROUP=${CICAP_GROUP} \
+		LOG_DIR=${LOG_DIR} RUN_DIR=${RUN_DIR}
+
 post-patch:
-	@${REINPLACE_CMD} -e 's|User wwwrun|User cicap|g' \
-		-e 's|Group nobody|Group cicap|g' \
-		-e 's|/var/run|${RUN_DIR}|g' \
-		-e 's|/var/tmp|${TMP_DIR}|g' \
-		-e 's|/var/log/c_icap|${LOG_DIR}|g' \
-		${WRKSRC}/c-icap.conf ${WRKSRC}/c-icap.conf.in
-	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
-		-e 's|icap_stretch_CFLAGS = -Iinclude/|icap_stretch_CFLAGS = -Iinclude/ ${PTHREAD_CFLAGS}|g' \
-		${WRKSRC}/Makefile.in ${WRKSRC}/Makefile.am
-.if !defined(WITH_PERL)
-	@${REINPLACE_CMD} -e 's|\(^Module perl\)|\#\1|g' \
-	${WRKSRC}/c-icap.conf.in
-.endif
-.if !defined(WITH_CLAMAV)
-	@${REINPLACE_CMD} -e 's|\(^Service antivirus\)|\#\1|g' \
-		-e 's|\(^srv_clamav\)|\#\1|g' \
+	@${REINPLACE_CMD} \
+		-e 's|@prefix@/var/log|/var/log/c-icap|g' \
 		${WRKSRC}/c-icap.conf.in
+.if ${PORT_OPTIONS:MPOSIXSEM}
+	@${REINPLACE_CMD} \
+		-e 's|@SYSV_IPC@|0|g' \
+		${WRKSRC}/include/c-icap-conf.h.in
 .endif
 
-pre-install:
-	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-install:
 	@[ -f ${PREFIX}/etc/c-icap.conf ] || \
 		${CP} -p ${PREFIX}/etc/c-icap.conf.default ${PREFIX}/etc/c-icap.conf

Modified: head/www/c-icap/distinfo
==============================================================================
--- head/www/c-icap/distinfo	Wed Aug 15 00:08:36 2012	(r302542)
+++ head/www/c-icap/distinfo	Wed Aug 15 00:09:41 2012	(r302543)
@@ -1,2 +1,2 @@
-SHA256 (c_icap-060708rc2.tar.gz) = b2d3c620f65deb2a237bb8e7a39c8f8c744f8614f06f9837fc24734c756c1453
-SIZE (c_icap-060708rc2.tar.gz) = 435659
+SHA256 (c_icap-0.2.1.tar.gz) = a5ec87f4c38e5df86c966348c9f32c77591da1fab9e113db7ac36ef87c9fb12a
+SIZE (c_icap-0.2.1.tar.gz) = 556687

Copied and modified: head/www/c-icap/files/c-icap.in (from r301491, head/www/c-icap/files/c_icap.in)
==============================================================================
--- head/www/c-icap/files/c_icap.in	Tue Jul 24 20:41:55 2012	(r301491, copy source)
+++ head/www/c-icap/files/c-icap.in	Wed Aug 15 00:09:41 2012	(r302543)
@@ -18,18 +18,27 @@
 
 . /etc/rc.subr
 
-name="c_icap"
+name=c_icap
 rcvar=c_icap_enable
 
 command="%%PREFIX%%/bin/c-icap"
-pidfile="%%RUN_DIR%%/c-icap.pid"
-required_dirs="%%TMP_DIR%%"
-required_files="%%PREFIX%%/etc/c-icap.conf"
 
 stop_postcmd="rm -f $pidfile"
 
 # read settings, set default values
 load_rc_config "$name"
 : ${c_icap_enable="NO"}
+: ${c_icap_conf="%%PREFIX%%/etc/c-icap.conf"}
+: ${c_icap_pidfile="%%RUN_DIR%%/c-icap.pid"}
+: ${c_icap_user="%%CICAP_USER%%"}
+
+pidfile="${c_icap_pidfile}"
+required_files="${c_icap_conf}"
+command_args="-f ${c_icap_conf}"
+stop_postcmd=stop_postcmd
+
+stop_postcmd() {
+	rm -f %%RUN_DIR%%/c-icap.ctl
+}
 
 run_rc_command "$1"

Modified: head/www/c-icap/files/pkg-deinstall.in
==============================================================================
--- head/www/c-icap/files/pkg-deinstall.in	Wed Aug 15 00:08:36 2012	(r302542)
+++ head/www/c-icap/files/pkg-deinstall.in	Wed Aug 15 00:09:41 2012	(r302543)
@@ -1,16 +1,29 @@
 #!/bin/sh
 # $FreeBSD$
 
+LOG_DIR=$DEST_DIR%%LOG_DIR%%
+RUN_DIR=$DEST_DIR%%RUN_DIR%%
+
 if [ "$2" != "POST-DEINSTALL" ]; then
 	exit 0
 fi
 
-CICAP_USER=cicap
+if [ -d "$LOG_DIR" ]; then
+	rmdir $LOG_DIR > /dev/null 2> /dev/null
+fi
+
+if [ -d "$RUN_DIR" ]; then
+	rmdir $RUN_DIR > /dev/null 2> /dev/null
+fi
 
-if pw usershow "$CICAP_USER" 2>/dev/null 1>&2; then
-	echo "==============================================================================="
-	echo "To delete $CICAP_USER user permanently, use 'pw userdel \"$CICAP_USER\"'"
-	echo "==============================================================================="
+if [ -d "$LOG_DIR" -o -d "$RUN_DIR" ]; then
+	echo "You may want to delete the following directories:"
+	if [ -d "$LOG_DIR" ]; then
+		echo "$LOG_DIR"
+	fi
+	if [ -d "$RUN_DIR" ]; then
+		echo "$RUN_DIR"
+	fi
 fi
 
 exit 0

Modified: head/www/c-icap/files/pkg-install.in
==============================================================================
--- head/www/c-icap/files/pkg-install.in	Wed Aug 15 00:08:36 2012	(r302542)
+++ head/www/c-icap/files/pkg-install.in	Wed Aug 15 00:09:41 2012	(r302543)
@@ -3,54 +3,22 @@
 
 DEST_DIR=${PKG_DESTDIR:-}
 
-CICAP_USER=cicap
-CICAP_GROUP=cicap
+_USER=%%CICAP_USER%%
+_GROUP=%%CICAP_GROUP%%
 
 LOG_DIR=$DEST_DIR%%LOG_DIR%%
-TMP_DIR=$DEST_DIR%%TMP_DIR%%
 RUN_DIR=$DEST_DIR%%RUN_DIR%%
 
-if [ "$2" = "PRE-INSTALL" ]; then
-	if ! pw groupshow "$CICAP_GROUP" 2>/dev/null 1>&2; then
-		if pw groupadd $CICAP_GROUP; then
-			echo "=> Added group \"$CICAP_GROUP\"."
-		else
-			echo "=> Adding group \"$CICAP_GROUP\" failed..."
-			exit 1
-		fi
-	fi
-
-	if ! pw usershow "$CICAP_USER" 2>/dev/null 1>&2; then
-		if pw useradd $CICAP_USER -g $CICAP_GROUP -h - \
-			-s "/sbin/nologin" -d "/nonexistent" \
-			-c "c-icap daemon"; \
-		then
-			echo "=> Added user \"$CICAP_USER\"."
-		else
-			echo "=> Adding user \"$CICAP_USER\" failed..."
-			exit 1
-		fi
-	fi
-elif [ "$2" = "POST-INSTALL" ]; then
-	if [ ! -d "$LOG_DIR" ]; then 
+if [ "$2" = "POST-INSTALL" ]; then
+	if [ ! -d "$LOG_DIR" ]; then
 		mkdir -p "$LOG_DIR" || exit 1
-		chown -R "$CICAP_USER:$CICAP_GROUP" "$LOG_DIR" || exit 1
-	fi
-
-	if [ ! -d "$TMP_DIR" ]; then
-		mkdir -p "$TMP_DIR" || exit 1
-		chown "$CICAP_USER:$CICAP_GROUP" "$TMP_DIR" || exit 1
 	fi
 
 	if [ ! -d "$RUN_DIR" ]; then
 		mkdir -p "$RUN_DIR" || exit 1
-		chown "$CICAP_USER:$CICAP_GROUP" "$RUN_DIR" || exit 1
-	fi
-
-	if [ ! -d "$RUN_DIR/c-icap" ]; then
-		mkdir -p "$RUN_DIR/c-icap" || exit 1
-		chown "$CICAP_USER:$CICAP_GROUP" "$RUN_DIR/c-icap" || exit 1
 	fi
+	chown -R "$_USER:$_GROUP" "$LOG_DIR" "$RUN_DIR" || exit 1
+	chmod 0750 "$LOG_DIR" "$RUN_DIR" || exit 1
 fi
 
 exit 0

Modified: head/www/c-icap/pkg-descr
==============================================================================
--- head/www/c-icap/pkg-descr	Wed Aug 15 00:08:36 2012	(r302542)
+++ head/www/c-icap/pkg-descr	Wed Aug 15 00:09:41 2012	(r302543)
@@ -1,7 +1,22 @@
-c-icap is an implementation of an ICAP server. It can be used with HTTP proxies
-that support the ICAP protocol such as the Shweby or Squid proxy server.
-c-icap allows the addition of modules, which can extend its functionality and
-services. For instance, such modules can be loggers, authenticators and
-authentication methods or access controlers.
+From the c-icap homepage:
 
-WWW: http://www.chtsanti.net/c-icap
+c-icap is an implementation of an ICAP server. It can be used with HTTP
+proxies that support the ICAP protocol to implement content adaptation and
+filtering services.
+
+Most of the commercial HTTP proxies must support the ICAP protocol. The open
+source Squid 3.x proxy server supports it. 
+
+Major features:
+
+    basic C API for developing custom content adaptation and filtering services
+    plugins interface
+    LDAP integration
+    simple ICAP client API
+
+Currently the following services have been implemented for the c-icap server:
+
+    Web antivirus service, using the clamav open-source antivirus engine
+    basic URL filtering service
+
+WWW: http://c-icap.sourceforge.net/

Modified: head/www/c-icap/pkg-plist
==============================================================================
--- head/www/c-icap/pkg-plist	Wed Aug 15 00:08:36 2012	(r302542)
+++ head/www/c-icap/pkg-plist	Wed Aug 15 00:09:41 2012	(r302543)
@@ -1,7 +1,10 @@
 @comment $FreeBSD$
 bin/c-icap
-bin/icap-client
-bin/icap-stretch
+bin/c-icap-client
+bin/c-icap-config
+bin/c-icap-libicapapi-config
+%%BDB%%bin/c-icap-mkbdb
+bin/c-icap-stretch
 @unexec if cmp -s %D/etc/c-icap.conf %D/etc/c-icap.conf.default; then rm -f %D/etc/c-icap.conf; fi
 etc/c-icap.conf.default
 @exec [ -f %B/c-icap.conf ] || cp -p %%PREFIX%%/%F %B/c-icap.conf
@@ -10,17 +13,22 @@ etc/c-icap.magic.default
 @exec [ -f %B/c-icap.magic ] || cp -p %%PREFIX%%/%F %B/c-icap.magic
 @unexec [ ! -f %%RUN_DIR%%/c-icap.pid ] || %D/etc/rc.d/c_icap stop
 include/c_icap/access.h
+include/c_icap/acl.h
+include/c_icap/array.h
 include/c_icap/body.h
-include/c_icap/c-icap.h
 include/c_icap/c-icap-conf.h
+include/c_icap/c-icap.h
+include/c_icap/cache.h
 include/c_icap/cfg_param.h
 include/c_icap/ci_threads.h
 include/c_icap/commands.h
 include/c_icap/debug.h
 include/c_icap/dlib.h
 include/c_icap/filetype.h
+include/c_icap/hash.h
 include/c_icap/header.h
 include/c_icap/log.h
+include/c_icap/lookup_table.h
 include/c_icap/mem.h
 include/c_icap/module.h
 include/c_icap/net_io.h
@@ -30,26 +38,34 @@ include/c_icap/request.h
 include/c_icap/service.h
 include/c_icap/shared_mem.h
 include/c_icap/simple_api.h
+include/c_icap/stats.h
+include/c_icap/txtTemplate.h
+include/c_icap/txt_format.h
+include/c_icap/types_ops.h
 include/c_icap/util.h
 @dirrm include/c_icap
+%%BDB%%lib/c_icap/bdb_tables.a
+%%BDB%%lib/c_icap/bdb_tables.la
+%%BDB%%lib/c_icap/bdb_tables.so
+lib/c_icap/dnsbl_tables.a
+lib/c_icap/dnsbl_tables.la
+lib/c_icap/dnsbl_tables.so
+%%LDAP%%lib/c_icap/ldap_module.a
+%%LDAP%%lib/c_icap/ldap_module.la
+%%LDAP%%lib/c_icap/ldap_module.so
 %%PERL%%lib/c_icap/perl_handler.a
 %%PERL%%lib/c_icap/perl_handler.la
 %%PERL%%lib/c_icap/perl_handler.so
-%%CLAMAV%%lib/c_icap/srv_clamav.a
-%%CLAMAV%%lib/c_icap/srv_clamav.la
-%%CLAMAV%%lib/c_icap/srv_clamav.so
 lib/c_icap/srv_echo.a
 lib/c_icap/srv_echo.la
 lib/c_icap/srv_echo.so
+lib/c_icap/srv_ex206.a
+lib/c_icap/srv_ex206.la
+lib/c_icap/srv_ex206.so
 lib/c_icap/sys_logger.a
 lib/c_icap/sys_logger.la
 lib/c_icap/sys_logger.so
-lib/c_icap/srv_url_check.a
-lib/c_icap/srv_url_check.so
-lib/c_icap/srv_url_check.la
 @dirrm lib/c_icap
 lib/libicapapi.la
-lib/libicapapi.so.0
+lib/libicapapi.so.2
 lib/libicapapi.so
- at unexec rmdir %%RUN_DIR%%/c-icap 2>/dev/null || true
- at unexec rmdir %%LOG_DIR%% 2>/dev/null || true



More information about the svn-ports-all mailing list