diff options
author | Sergey Matveychuk <sem@FreeBSD.org> | 2006-03-27 06:40:18 +0000 |
---|---|---|
committer | Sergey Matveychuk <sem@FreeBSD.org> | 2006-03-27 06:40:18 +0000 |
commit | e4c6263ada854abf64a1c9a6d352009dc997a5ee (patch) | |
tree | d5f1a59bdc2236de2de50231de8633625a656c20 /www/c-icap | |
parent | 968e60b826b5aeed3e5380b308cfdbdac5d0799f (diff) | |
download | ports-e4c6263ada854abf64a1c9a6d352009dc997a5ee.tar.gz ports-e4c6263ada854abf64a1c9a6d352009dc997a5ee.zip |
Notes
Diffstat (limited to 'www/c-icap')
-rw-r--r-- | www/c-icap/Makefile | 87 | ||||
-rw-r--r-- | www/c-icap/distinfo | 3 | ||||
-rw-r--r-- | www/c-icap/files/c_icap.sh.in | 32 | ||||
-rw-r--r-- | www/c-icap/files/patch-Makefile.in | 67 | ||||
-rw-r--r-- | www/c-icap/files/patch-c-icap.conf.default.in | 26 | ||||
-rw-r--r-- | www/c-icap/files/patch-configure | 20 | ||||
-rw-r--r-- | www/c-icap/files/patch-configure.in | 8 | ||||
-rw-r--r-- | www/c-icap/files/pkg-deinstall.in | 16 | ||||
-rw-r--r-- | www/c-icap/files/pkg-install.in | 36 | ||||
-rw-r--r-- | www/c-icap/pkg-descr | 10 | ||||
-rw-r--r-- | www/c-icap/pkg-plist | 53 |
11 files changed, 358 insertions, 0 deletions
diff --git a/www/c-icap/Makefile b/www/c-icap/Makefile new file mode 100644 index 000000000000..2e18f7d8b2e0 --- /dev/null +++ b/www/c-icap/Makefile @@ -0,0 +1,87 @@ +# New ports collection makefile for: c-icap +# Date created: 30 January 2006 +# Whom: Elisey Savateev <b3k@mail.ru> +# +# $FreeBSD$ +# + +PORTNAME= c-icap +PORTVERSION= 220505 +CATEGORIES= www +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTNAME= c_icap-${PORTVERSION} + +MAINTAINER= b3k@mail.ru +COMMENT= An implementation of an ICAP server + +GNU_CONFIGURE= yes +INSTALLS_SHLIB= yes +USE_RC_SUBR= c_icap.sh +USE_AUTOTOOLS= libtool:15 +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +LDCONFIG_DIRS= %%PREFIX%%/lib %%PREFIX%%/lib/c_icap + +SUB_FILES= pkg-install pkg-deinstall + +OPTIONS= CLAMAV "With srv_clamav service" on +# PERL "With Perl support" off + +.include <bsd.port.pre.mk> + +# Perl support not ready yet. Try to contact author or hack it by yourself. +WITHOUT_PERL= yes + +.if defined(WITH_PERL) +USE_PERL5= yes +PLIST_SUB+= PERL="" +CONFIGURE_ARGS+= --with-perl=${PERL} +.else +PLIST_SUB+= PERL="@comment " +CONFIGURE_ARGS+= --without-perl +.endif + +.if defined(WITH_CLAMAV) +LIB_DEPENDS+= clamav.1:${PORTSDIR}/security/clamav +PLIST_SUB+= CLAMAV="" +CONFIGURE_ARGS+= --with-clamav +CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" +.else +PLIST_SUB+= CLAMAV="@comment " +CONFIGURE_ARGS+= --without-clamav +.endif + +post-extract: + @${MV} ${WRKSRC}/c-icap.conf ${WRKSRC}/c-icap.conf.default + @${MV} ${WRKSRC}/c-icap.conf.in ${WRKSRC}/c-icap.conf.default.in + @${MV} ${WRKSRC}/c-icap.magic ${WRKSRC}/c-icap.magic.default + +post-patch: + @${REINPLACE_CMD} -e 's|User wwwrun|User cicap|g' \ + -e 's|Group nobody|Group cicap|g' \ + ${WRKSRC}/c-icap.conf.default ${WRKSRC}/c-icap.conf.default.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.default.in +.endif +.if !defined(WITH_CLAMAV) + @${REINPLACE_CMD} -e 's|\(^Service antivirus\)|\#\1|g' \ + -e 's|\(^srv_clamav\)|\#\1|g' \ + ${WRKSRC}/c-icap.conf.default.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 + @[ -f ${PREFIX}/etc/c-icap.magic ] || \ + ${CP} -p ${PREFIX}/etc/c-icap.magic.default ${PREFIX}/etc/c-icap.magic + @${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL + +.include <bsd.port.post.mk> diff --git a/www/c-icap/distinfo b/www/c-icap/distinfo new file mode 100644 index 000000000000..483b14e5acde --- /dev/null +++ b/www/c-icap/distinfo @@ -0,0 +1,3 @@ +MD5 (c_icap-220505.tar.gz) = acccc6a1c4dcae057b5cf5f90fa72fab +SHA256 (c_icap-220505.tar.gz) = cfd83fc0ffaadfa098af1884c296999a51fcee06cebd95fe848b4c4766817ad6 +SIZE (c_icap-220505.tar.gz) = 394175 diff --git a/www/c-icap/files/c_icap.sh.in b/www/c-icap/files/c_icap.sh.in new file mode 100644 index 000000000000..ea7722b70630 --- /dev/null +++ b/www/c-icap/files/c_icap.sh.in @@ -0,0 +1,32 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: c-icap +# REQUIRE: DAEMON cleanvar +# BEFORE: LOGIN + +# +# Add the following lines to /etc/rc.conf to enable c-icap: +# +# c_icap_enable="YES" +# +# See '%%PREFIX%%/bin/c-icap --help' for flags +# + +. %%RC_SUBR%% + +name="c_icap" +rcvar=`set_rcvar` +command="%%PREFIX%%/bin/c-icap" + +required_dirs="/var/tmp" +required_files="%%PREFIX%%/etc/c-icap.conf" +stop_postcmd="rm -f /var/run/c-icap.pid" + +# set default +c_icap_enable=${c_icap_enable:-"NO"} + +load_rc_config "$name" +run_rc_command "$1" diff --git a/www/c-icap/files/patch-Makefile.in b/www/c-icap/files/patch-Makefile.in new file mode 100644 index 000000000000..6ff6c79ecbac --- /dev/null +++ b/www/c-icap/files/patch-Makefile.in @@ -0,0 +1,67 @@ +--- Makefile.in.bak Fri Feb 3 13:14:20 2006 ++++ Makefile.in Fri Feb 3 13:16:43 2006 +@@ -44,7 +44,7 @@ + icap-stretch$(EXEEXT) + DIST_COMMON = README $(am__configure_deps) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +- $(srcdir)/c-icap.conf.in $(srcdir)/config.h.in \ ++ $(srcdir)/c-icap.conf.default.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + TODO compile config.guess config.sub depcomp install-sh \ + ltmain.sh missing +@@ -57,7 +57,7 @@ + configure.lineno configure.status.lineno + mkinstalldirs = $(mkdir_p) + CONFIG_HEADER = config.h +-CONFIG_CLEAN_FILES = c-icap.conf ++CONFIG_CLEAN_FILES = c-icap.conf.default + am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(pkgincludedir)" + libLTLIBRARIES_INSTALL = $(INSTALL) + LTLIBRARIES = $(lib_LTLIBRARIES) +@@ -313,8 +313,8 @@ + + ALL_INCS = $(INCS:%.h=include/%.h) + pkginclude_HEADERS = $(ALL_INCS) +-sysconf_DATA = c-icap.conf c-icap.magic +-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 \ ++sysconf_DATA = c-icap.conf.default c-icap.magic.default ++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 \ + winnt_server.c os/win32/dll_entry.c os/win32/makefile.w32 os/win32/net_io.c os/win32/proc_mutex.c\ + os/win32/shared_mem.c os/win32/threads.c os/win32/utilfunc.c + +@@ -373,7 +373,7 @@ + + distclean-hdr: + -rm -f config.h stamp-h1 +-c-icap.conf: $(top_builddir)/config.status $(srcdir)/c-icap.conf.in ++c-icap.conf: $(top_builddir)/config.status $(srcdir)/c-icap.conf.default.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +@@ -1484,7 +1484,7 @@ + + info-am: + +-install-data-am: install-data-local install-pkgincludeHEADERS ++install-data-am: install-pkgincludeHEADERS + + install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ + install-sysconfDATA +@@ -1530,7 +1530,7 @@ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ +- install-data-am install-data-local install-exec \ ++ install-data-am install-exec \ + install-exec-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pkgincludeHEADERS \ + install-strip install-sysconfDATA installcheck installcheck-am \ +@@ -1544,8 +1544,6 @@ + uninstall-sysconfDATA + + +-install-data-local: +- $(mkinstalldirs) $(LOGDIR); chgrp nobody $(LOGDIR);chmod 775 $(LOGDIR) + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/www/c-icap/files/patch-c-icap.conf.default.in b/www/c-icap/files/patch-c-icap.conf.default.in new file mode 100644 index 000000000000..ebcaa824970d --- /dev/null +++ b/www/c-icap/files/patch-c-icap.conf.default.in @@ -0,0 +1,26 @@ +--- c-icap.conf.default.in.bak Fri Feb 3 10:18:30 2006 ++++ c-icap.conf.default.in Fri Feb 3 10:20:15 2006 +@@ -3,7 +3,7 @@ + # + + +-PidFile /var/run/c-icap.pid ++PidFile @prefix@/var/run/c-icap.pid + Timeout 300 + KeepAlive On + MaxKeepAliveRequests 100 +@@ -25,11 +25,11 @@ + #ServerAdmin you@your.address # Not implemented yet + #ServerName localhost:1344 # Not implemented yet + +-TmpDir /var/tmp ++TmpDir @prefix@/var/tmp + MaxMemObject 131072 + +-ServerLog @prefix@/var/log/server.log +-AccessLog @prefix@/var/log/access.log ++ServerLog @prefix@/var/log/c_icap/server.log ++AccessLog @prefix@/var/log/c_icap/access.log + #DebugLevel 3 + + ModulesDir @prefix@/lib/c_icap diff --git a/www/c-icap/files/patch-configure b/www/c-icap/files/patch-configure new file mode 100644 index 000000000000..f6188fbadc63 --- /dev/null +++ b/www/c-icap/files/patch-configure @@ -0,0 +1,20 @@ +--- configure.bak Thu Feb 2 10:46:33 2006 ++++ configure Thu Feb 2 10:47:13 2006 +@@ -20614,7 +20614,7 @@ + fi + + +- ac_config_files="$ac_config_files Makefile c-icap.conf services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile" ++ ac_config_files="$ac_config_files Makefile c-icap.conf.default services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile" + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +@@ -21200,7 +21200,7 @@ + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; +- "c-icap.conf" ) CONFIG_FILES="$CONFIG_FILES c-icap.conf" ;; ++ "c-icap.conf.default" ) CONFIG_FILES="$CONFIG_FILES c-icap.conf.default" ;; + "services/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/Makefile" ;; + "services/echo/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/echo/Makefile" ;; + "services/sguard/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/sguard/Makefile" ;; diff --git a/www/c-icap/files/patch-configure.in b/www/c-icap/files/patch-configure.in new file mode 100644 index 000000000000..16e68e6497fa --- /dev/null +++ b/www/c-icap/files/patch-configure.in @@ -0,0 +1,8 @@ +--- configure.in.bak Thu Feb 2 10:45:50 2006 ++++ configure.in Thu Feb 2 10:46:13 2006 +@@ -198,4 +198,4 @@ + AM_CONDITIONAL(USEPERL,[test a"$perlcore" != a]) + AM_CONDITIONAL(USECLAMAV,[test a"$clamav" != ano]) + +-AC_OUTPUT([Makefile c-icap.conf services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile]) ++AC_OUTPUT([Makefile c-icap.conf.default services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile]) diff --git a/www/c-icap/files/pkg-deinstall.in b/www/c-icap/files/pkg-deinstall.in new file mode 100644 index 000000000000..aabf042f9622 --- /dev/null +++ b/www/c-icap/files/pkg-deinstall.in @@ -0,0 +1,16 @@ +#!/bin/sh +# $FreeBSD$ + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +CICAP_USER=cicap + +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 "===============================================================================" +fi + +exit 0 diff --git a/www/c-icap/files/pkg-install.in b/www/c-icap/files/pkg-install.in new file mode 100644 index 000000000000..b64313cf80c6 --- /dev/null +++ b/www/c-icap/files/pkg-install.in @@ -0,0 +1,36 @@ +#!/bin/sh +# $FreeBSD$ + +CICAP_USER=cicap +CICAP_GROUP=cicap + +LOG_PATH=/var/log +TMP_PATH=/var/tmp + +if [ "$2" = "PRE-INSTALL" ]; then + if ! pw groupshow "$CICAP_USER" 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 + touch "$LOG_PATH/access.log" "$LOG_PATH/server.log" || exit 1 + chown -R "$CICAP_USER:$CICAP_GROUP" "$LOG_PATH" || exit 1 +fi + +exit 0 diff --git a/www/c-icap/pkg-descr b/www/c-icap/pkg-descr new file mode 100644 index 000000000000..a33298e88bcc --- /dev/null +++ b/www/c-icap/pkg-descr @@ -0,0 +1,10 @@ +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 diff --git a/www/c-icap/pkg-plist b/www/c-icap/pkg-plist new file mode 100644 index 000000000000..910f189bed92 --- /dev/null +++ b/www/c-icap/pkg-plist @@ -0,0 +1,53 @@ +@comment $FreeBSD$ +bin/c-icap +bin/icap-client +bin/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 +@unexec if cmp -s %D/etc/c-icap.magic %D/etc/c-icap.magic.default; then rm -f %D/etc/c-icap.magic; fi +etc/c-icap.magic.default +@exec [ -f %B/c-icap.magic ] || cp -p %%PREFIX%%/%F %B/c-icap.magic +@unexec %D/etc/rc.d/c_icap.sh stop; fi +include/c_icap/access.h +include/c_icap/body.h +include/c_icap/c-icap.h +include/c_icap/cfg_param.h +include/c_icap/ci_threads.h +include/c_icap/debug.h +include/c_icap/filetype.h +include/c_icap/header.h +include/c_icap/log.h +include/c_icap/module.h +include/c_icap/net_io.h +include/c_icap/proc_mutex.h +include/c_icap/proc_threads_queues.h +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/util.h +@dirrm include/c_icap +%%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_sguard.a +lib/c_icap/srv_sguard.la +lib/c_icap/srv_sguard.so +lib/c_icap/sys_logger.a +lib/c_icap/sys_logger.la +lib/c_icap/sys_logger.so +@dirrm lib/c_icap +lib/libicapapi.a +lib/libicapapi.la +lib/libicapapi.so.0 +lib/libicapapi.so +@cwd / +var/log/access.log +var/log/server.log |