Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Feb 2006 09:43:43 GMT
From:      "Elisey O. Savateev" <b3k@mail.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/92760: New port: www/c-icap c-icap is an implementation of an ICAP server
Message-ID:  <200602030943.k139hhQ5031631@www.freebsd.org>
Resent-Message-ID: <200602030950.k139o4Ef054202@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         92760
>Category:       ports
>Synopsis:       New port: www/c-icap c-icap is an implementation of an ICAP server
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 03 09:50:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Elisey O. Savateev
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
FreeBSD beastie 6.0-STABLE FreeBSD 6.0-STABLE #8: Tue Jan 24 17:10:34 YEKT 2006     root@beastie:/usr/obj/usr/src/sys/CUSTOM  i386
>Description:
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.

WWW: http://www.chtsanti.net/c-icap

- Elisey Savateev
b3k@mail.ru
>How-To-Repeat:
              
>Fix:
# 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:
#
#	c-icap
#	c-icap/files
#	c-icap/files/patch-Makefile.in
#	c-icap/files/pkg-install.in
#	c-icap/files/patch-configure.in
#	c-icap/files/patch-configure
#	c-icap/files/patch-c-icap.conf.default.in
#	c-icap/files/pkg-deinstall.in
#	c-icap/files/c_icap.sh.in
#	c-icap/Makefile
#	c-icap/distinfo
#	c-icap/pkg-descr
#	c-icap/pkg-plist
#
echo c - c-icap
mkdir -p c-icap > /dev/null 2>&1
echo c - c-icap/files
mkdir -p c-icap/files > /dev/null 2>&1
echo x - c-icap/files/patch-Makefile.in
sed 's/^X//' >c-icap/files/patch-Makefile.in << 'END-of-c-icap/files/patch-Makefile.in'
X--- Makefile.in.bak	Fri Feb  3 13:14:20 2006
X+++ Makefile.in	Fri Feb  3 13:16:43 2006
X@@ -44,7 +44,7 @@
X 	icap-stretch$(EXEEXT)
X DIST_COMMON = README $(am__configure_deps) $(pkginclude_HEADERS) \
X 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
X-	$(srcdir)/c-icap.conf.in $(srcdir)/config.h.in \
X+	$(srcdir)/c-icap.conf.default.in $(srcdir)/config.h.in \
X 	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
X 	TODO compile config.guess config.sub depcomp install-sh \
X 	ltmain.sh missing
X@@ -57,7 +57,7 @@
X  configure.lineno configure.status.lineno
X mkinstalldirs = $(mkdir_p)
X CONFIG_HEADER = config.h
X-CONFIG_CLEAN_FILES = c-icap.conf
X+CONFIG_CLEAN_FILES = c-icap.conf.default
X am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(pkgincludedir)"
X libLTLIBRARIES_INSTALL = $(INSTALL)
X LTLIBRARIES = $(lib_LTLIBRARIES)
X@@ -313,8 +313,8 @@
X 
X ALL_INCS = $(INCS:%.h=include/%.h)
X pkginclude_HEADERS = $(ALL_INCS)
X-sysconf_DATA = c-icap.conf c-icap.magic
X-EXTRA_DIST = RECONF INSTALL.txt config-w32.h makefile.w32 c-icap.conf c_icap_dll.mak c-icap.conf.in c-icap.magic  c_icap.mak c_icap.def contrib/get_file.pl \
X+sysconf_DATA = c-icap.conf.default c-icap.magic.default
X+EXTRA_DIST = RECONF INSTALL.txt config-w32.h makefile.w32 c-icap.conf.default c_icap_dll.mak c-icap.conf.default.in c-icap.magic.default  c_icap.mak c_icap.def contrib/get_file.pl \
X              winnt_server.c  os/win32/dll_entry.c os/win32/makefile.w32 os/win32/net_io.c os/win32/proc_mutex.c\
X              os/win32/shared_mem.c os/win32/threads.c os/win32/utilfunc.c
X 
X@@ -373,7 +373,7 @@
X 
X distclean-hdr:
X 	-rm -f config.h stamp-h1
X-c-icap.conf: $(top_builddir)/config.status $(srcdir)/c-icap.conf.in
X+c-icap.conf: $(top_builddir)/config.status $(srcdir)/c-icap.conf.default.in
X 	cd $(top_builddir) && $(SHELL) ./config.status $@
X install-libLTLIBRARIES: $(lib_LTLIBRARIES)
X 	@$(NORMAL_INSTALL)
X@@ -1484,7 +1484,7 @@
X 
X info-am:
X 
X-install-data-am: install-data-local install-pkgincludeHEADERS
X+install-data-am: install-pkgincludeHEADERS
X 
X install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \
X 	install-sysconfDATA
X@@ -1530,7 +1530,7 @@
X 	distclean-recursive distclean-tags distcleancheck distdir \
X 	distuninstallcheck dvi dvi-am html html-am info info-am \
X 	install install-am install-binPROGRAMS install-data \
X-	install-data-am install-data-local install-exec \
X+	install-data-am install-exec \
X 	install-exec-am install-info install-info-am \
X 	install-libLTLIBRARIES install-man install-pkgincludeHEADERS \
X 	install-strip install-sysconfDATA installcheck installcheck-am \
X@@ -1544,8 +1544,6 @@
X 	uninstall-sysconfDATA
X 
X 
X-install-data-local:
X-	$(mkinstalldirs) $(LOGDIR); chgrp nobody $(LOGDIR);chmod 775 $(LOGDIR)
X # Tell versions [3.59,3.63) of GNU make to not export all variables.
X # Otherwise a system limit (for SysV at least) may be exceeded.
X .NOEXPORT:
END-of-c-icap/files/patch-Makefile.in
echo x - c-icap/files/pkg-install.in
sed 's/^X//' >c-icap/files/pkg-install.in << 'END-of-c-icap/files/pkg-install.in'
X#!/bin/sh
X# $FreeBSD$
X
XCICAP_USER=%%CICAP_USER%%
XCICAP_GROUP=%%CICAP_GROUP%%
X
XLOG_PATH=%%LOG_PATH%%
XTMP_PATH=%%TMP_PATH%%
X
Xif [ "$2" = "PRE-INSTALL" ]; then
X	if ! pw groupshow "$CICAP_USER" 2>/dev/null 1>&2; then
X		if pw groupadd $CICAP_GROUP; then
X			echo "=> Added group \"$CICAP_GROUP\"."
X		else
X			echo "=> Adding group \"$CICAP_GROUP\" failed..."
X			exit 1
X		fi
X	fi
X
X	if ! pw usershow "$CICAP_USER" 2>/dev/null 1>&2; then
X		if pw useradd $CICAP_USER -g $CICAP_GROUP -h - \
X			-s "/sbin/nologin" -d "/nonexistent" \
X			-c "c-icap daemon"; \
X		then
X			echo "=> Added user \"$CICAP_USER\"."
X		else
X			echo "=> Adding user \"$CICAP_USER\" failed..."
X			exit 1
X		fi
X	fi
Xelif [ "$2" = "POST-INSTALL" ]; then
X	if [ ! -d "$LOG_PATH" ]; then
X		mkdir -p "$LOG_PATH" || exit 1
X		touch "$LOG_PATH/access.log" "$LOG_PATH/server.log" || exit 1
X		chown -R "$CICAP_USER:$CICAP_GROUP" "$LOG_PATH" || exit 1
X	fi
X	if [ ! -d "$TMP_PATH" ]; then 
X		mkdir -p "$TMP_PATH" || exit 1
X		chmod 777 "$TMP_PATH" || exit 1
X	fi
Xfi
X
Xexit 0
END-of-c-icap/files/pkg-install.in
echo x - c-icap/files/patch-configure.in
sed 's/^X//' >c-icap/files/patch-configure.in << 'END-of-c-icap/files/patch-configure.in'
X--- configure.in.bak	Thu Feb  2 10:45:50 2006
X+++ configure.in	Thu Feb  2 10:46:13 2006
X@@ -198,4 +198,4 @@
X AM_CONDITIONAL(USEPERL,[test a"$perlcore" != a])
X AM_CONDITIONAL(USECLAMAV,[test a"$clamav" != ano])
X 
X-AC_OUTPUT([Makefile c-icap.conf services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile])
X+AC_OUTPUT([Makefile c-icap.conf.default services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile])
END-of-c-icap/files/patch-configure.in
echo x - c-icap/files/patch-configure
sed 's/^X//' >c-icap/files/patch-configure << 'END-of-c-icap/files/patch-configure'
X--- configure.bak	Thu Feb  2 10:46:33 2006
X+++ configure	Thu Feb  2 10:47:13 2006
X@@ -20614,7 +20614,7 @@
X fi
X 
X 
X-                                                                      ac_config_files="$ac_config_files Makefile c-icap.conf services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile"
X+                                                                      ac_config_files="$ac_config_files Makefile c-icap.conf.default services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile"
X cat >confcache <<\_ACEOF
X # This file is a shell script that caches the results of configure
X # tests run on this system so they can be shared between configure
X@@ -21200,7 +21200,7 @@
X   case "$ac_config_target" in
X   # Handling of arguments.
X   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
X-  "c-icap.conf" ) CONFIG_FILES="$CONFIG_FILES c-icap.conf" ;;
X+  "c-icap.conf.default" ) CONFIG_FILES="$CONFIG_FILES c-icap.conf.default" ;;
X   "services/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/Makefile" ;;
X   "services/echo/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/echo/Makefile" ;;
X   "services/sguard/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/sguard/Makefile" ;;
END-of-c-icap/files/patch-configure
echo x - c-icap/files/patch-c-icap.conf.default.in
sed 's/^X//' >c-icap/files/patch-c-icap.conf.default.in << 'END-of-c-icap/files/patch-c-icap.conf.default.in'
X--- c-icap.conf.default.in.bak	Fri Feb  3 10:18:30 2006
X+++ c-icap.conf.default.in	Fri Feb  3 10:20:15 2006
X@@ -3,7 +3,7 @@
X #
X 
X 
X-PidFile /var/run/c-icap.pid
X+PidFile @prefix@/var/run/c-icap.pid
X Timeout 300
X KeepAlive On
X MaxKeepAliveRequests 100
X@@ -25,11 +25,11 @@
X #ServerAdmin you@your.address # Not implemented yet
X #ServerName localhost:1344 # Not implemented yet
X 
X-TmpDir /var/tmp
X+TmpDir @prefix@/var/tmp
X MaxMemObject 131072
X 
X-ServerLog @prefix@/var/log/server.log
X-AccessLog @prefix@/var/log/access.log
X+ServerLog @prefix@/var/log/c_icap/server.log
X+AccessLog @prefix@/var/log/c_icap/access.log
X #DebugLevel 3
X 
X ModulesDir @prefix@/lib/c_icap
END-of-c-icap/files/patch-c-icap.conf.default.in
echo x - c-icap/files/pkg-deinstall.in
sed 's/^X//' >c-icap/files/pkg-deinstall.in << 'END-of-c-icap/files/pkg-deinstall.in'
X#!/bin/sh
X# $FreeBSD$
X
Xif [ "$2" != "POST-DEINSTALL" ]; then
X	exit 0
Xfi
X
XCICAP_USER=%%CICAP_USER%%
X
Xif pw usershow "$CICAP_USER" 2>/dev/null 1>&2; then
X	echo "==============================================================================="
X	echo "To delete $CICAP_USER user permanently, use 'pw userdel \"$CICAP_USER\"'"
X	echo "==============================================================================="
Xfi
X
Xexit 0
END-of-c-icap/files/pkg-deinstall.in
echo x - c-icap/files/c_icap.sh.in
sed 's/^X//' >c-icap/files/c_icap.sh.in << 'END-of-c-icap/files/c_icap.sh.in'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
X# PROVIDE: c-icap
X# REQUIRE: DAEMON cleanvar
X# BEFORE: LOGIN
X
X#
X# Add the following lines to /etc/rc.conf to enable c-icap:
X#
X# c_icap_enable="YES"
X#
X# See '%%PREFIX%%/bin/c-icap --help' for flags
X#
X
X. %%RC_SUBR%%
X
Xname="c_icap"
Xrcvar=`set_rcvar`
Xcommand="%%PREFIX%%/bin/c-icap"
X
Xrequired_dirs="%%TMP_PATH%%"
Xrequired_files="%%PREFIX%%/etc/c-icap.conf"
Xstop_postcmd="rm -f %%RUN_PATH%%/c-icap.pid"
X
Xload_rc_config "$name"
Xrun_rc_command "$1"
END-of-c-icap/files/c_icap.sh.in
echo x - c-icap/Makefile
sed 's/^X//' >c-icap/Makefile << 'END-of-c-icap/Makefile'
X# New ports collection makefile for:	c-icap
X# Date created:				30 January 2006
X# Whom:					Elisey Savateev <b3k@mail.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	c-icap
XPORTVERSION=	220505
XCATEGORIES=	www
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
XDISTNAME=	c_icap-${PORTVERSION}
X
XMAINTAINER=	b3k@mail.ru
XCOMMENT=	c-icap is an implementation of an ICAP server
X
XHAS_CONFIGURE=	yes
XINSTALLS_SHLIB=	yes
XUSE_RC_SUBR=	yes
XUSE_AUTOTOOLS=	libtool:15
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
XLDCONFIG_DIRS=	%%PREFIX%%/lib %%PREFIX%%/lib/c_icap
X
XLOG_DIR=	var/log/c_icap
XLOG_PATH=	${PREFIX}/${LOG_DIR}
XRUN_DIR=	var/run
XRUN_PATH=	${PREFIX}/${RUN_DIR}
XTMP_DIR=	var/tmp
XTMP_PATH=	${PREFIX}/${TMP_DIR}
XRC_DIR=		etc/rc.d
XRC_PATH=	${PREFIX}/${RC_DIR}
XPLIST_SUB=	LOG_DIR=${LOG_DIR} \
X			RUN_PATH=${RUN_PATH} \
X			TMP_DIR=${TMP_DIR} \
X			RC_DIR=${RC_DIR}
X
X# Redifine this if you need
XCICAP_USER?=	cicap
XCICAP_GROUP?=	cicap
X
XSUB_FILES=	pkg-install pkg-deinstall c_icap.sh
XSUB_LIST=	LOG_PATH=${LOG_PATH} \
X			RUN_PATH=${RUN_PATH} \
X			TMP_PATH=${TMP_PATH} \
X			CICAP_USER=${CICAP_USER} \
X			CICAP_GROUP=${CICAP_GROUP}
X
XOPTIONS=	CLAMAV "With srv_clamav service" on
X#			PERL "With Perl support" off
X
X.include <bsd.port.pre.mk>
X
X# Perl support not ready yet. Try to contact author or hack it by yourself.
XWITHOUT_PERL=	yes
X
X.if defined(WITH_PERL)
XUSE_PERL5=	yes
XPLIST_SUB+=	PERL=""
XCONFIGURE_ARGS+=	--with-perl=${PERL}
X.else
XPLIST_SUB+=	PERL="@comment "
XCONFIGURE_ARGS+=	--without-perl
X.endif
X
X.if defined(WITH_CLAMAV)
XLIB_DEPENDS+=	clamav.1:${PORTSDIR}/security/clamav
XPLIST_SUB+=	CLAMAV=""
XCONFIGURE_ARGS+=	--with-clamav
XCONFIGURE_ENV=	CFLAGS="-I${LOCALBASE}/include" \
X				LDFLAGS="-L${LOCALBASE}/lib"
X.else
XPLIST_SUB+=	CLAMAV="@comment "
XCONFIGURE_ARGS+=	--without-clamav
X.endif
X
Xpost-extract:
X	@${MV} ${WRKSRC}/c-icap.conf ${WRKSRC}/c-icap.conf.default
X	@${MV} ${WRKSRC}/c-icap.conf.in ${WRKSRC}/c-icap.conf.default.in
X	@${MV} ${WRKSRC}/c-icap.magic ${WRKSRC}/c-icap.magic.default
X
Xpost-patch:
X	@${REINPLACE_CMD} \
X	-e 's|User wwwrun|User ${CICAP_USER}|g' \
X	-e 's|Group nobody|Group ${CICAP_GROUP}|g' \
X	${WRKSRC}/c-icap.conf.default ${WRKSRC}/c-icap.conf.default.in
X.if !defined(WITH_PERL)
X	@${REINPLACE_CMD} -e 's|\(^Module perl\)|\#\1|g' \
X	${WRKSRC}/c-icap.conf.default.in
X.endif
X.if !defined(WITH_CLAMAV)
X	@${REINPLACE_CMD} \
X	-e 's|\(^Service antivirus\)|\#\1|g' \
X	-e 's|\(^srv_clamav\)|\#\1|g' \
X	${WRKSRC}/c-icap.conf.default.in
X.endif
X
Xpre-install:
X	@${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
X
Xpost-install:
X	@${INSTALL_SCRIPT} ${WRKDIR}/c_icap.sh ${RC_PATH}/c_icap.sh
X	@[ -f ${PREFIX}/etc/c-icap.conf ] || \
X		${CP} -p ${PREFIX}/etc/c-icap.conf.default ${PREFIX}/etc/c-icap.conf
X	@[ -f ${PREFIX}/etc/c-icap.magic ] || \
X		${CP} -p ${PREFIX}/etc/c-icap.magic.default ${PREFIX}/etc/c-icap.magic
X	@${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
X
X.include <bsd.port.post.mk>
END-of-c-icap/Makefile
echo x - c-icap/distinfo
sed 's/^X//' >c-icap/distinfo << 'END-of-c-icap/distinfo'
XMD5 (c_icap-220505.tar.gz) = acccc6a1c4dcae057b5cf5f90fa72fab
XSHA256 (c_icap-220505.tar.gz) = cfd83fc0ffaadfa098af1884c296999a51fcee06cebd95fe848b4c4766817ad6
XSIZE (c_icap-220505.tar.gz) = 394175
END-of-c-icap/distinfo
echo x - c-icap/pkg-descr
sed 's/^X//' >c-icap/pkg-descr << 'END-of-c-icap/pkg-descr'
Xc-icap is an implementation of an ICAP server. It can be used with HTTP proxies
Xthat support the ICAP protocol such as the Shweby or Squid proxy server.
Xc-icap allows the addition of modules, which can extend its functionality and
Xservices. For instance, such modules can be loggers, authenticators and
Xauthentication methods or access controlers.
X
XWWW: http://www.chtsanti.net/c-icap
X
X- Elisey Savateev
Xb3k@mail.ru
END-of-c-icap/pkg-descr
echo x - c-icap/pkg-plist
sed 's/^X//' >c-icap/pkg-plist << 'END-of-c-icap/pkg-plist'
X@comment $FreeBSD$
Xbin/c-icap
Xbin/icap-client
Xbin/icap-stretch
X@unexec if cmp -s %D/etc/c-icap.conf %D/etc/c-icap.conf.default; then rm -f %D/etc/c-icap.conf; fi
Xetc/c-icap.conf.default
X@exec [ -f %B/c-icap.conf ] || cp -p %%PREFIX%%/%F %B/c-icap.conf
X@unexec if cmp -s %D/etc/c-icap.magic %D/etc/c-icap.magic.default; then rm -f %D/etc/c-icap.magic; fi
Xetc/c-icap.magic.default
X@exec [ -f %B/c-icap.magic ] || cp -p %%PREFIX%%/%F %B/c-icap.magic
X@unexec if [ -f %%RUN_PATH%%/c-icap.pid ]; then %%PREFIX%%/%%RC_DIR%%/c_icap.sh stop; fi
X%%RC_DIR%%/c_icap.sh
Xinclude/c_icap/access.h
Xinclude/c_icap/body.h
Xinclude/c_icap/c-icap.h
Xinclude/c_icap/cfg_param.h
Xinclude/c_icap/ci_threads.h
Xinclude/c_icap/debug.h
Xinclude/c_icap/filetype.h
Xinclude/c_icap/header.h
Xinclude/c_icap/log.h
Xinclude/c_icap/module.h
Xinclude/c_icap/net_io.h
Xinclude/c_icap/proc_mutex.h
Xinclude/c_icap/proc_threads_queues.h
Xinclude/c_icap/request.h
Xinclude/c_icap/service.h
Xinclude/c_icap/shared_mem.h
Xinclude/c_icap/simple_api.h
Xinclude/c_icap/util.h
X@dirrm include/c_icap
X%%PERL%%lib/c_icap/perl_handler.so
X%%CLAMAV%%lib/c_icap/srv_clamav.so
Xlib/c_icap/srv_echo.so
Xlib/c_icap/srv_sguard.so
Xlib/c_icap/sys_logger.so
X@dirrm lib/c_icap
Xlib/libicapapi.so.0
Xlib/libicapapi.so
X%%LOG_DIR%%/access.log
X%%LOG_DIR%%/server.log
X@dirrm %%LOG_DIR%%
X@dirrmtry %%TMP_DIR%%
END-of-c-icap/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602030943.k139hhQ5031631>