summaryrefslogtreecommitdiff
path: root/www/c-icap
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2011-05-11 04:29:18 +0000
committeradam <adam@pkgsrc.org>2011-05-11 04:29:18 +0000
commitafa427182a2485052362f9b2127a576f8a398a62 (patch)
tree423df7c7cc28a897662fd9b41e1300ad0caf78a0 /www/c-icap
parent07dad213c1dc794516427d198604f96d8ec9c7db (diff)
downloadpkgsrc-afa427182a2485052362f9b2127a576f8a398a62.tar.gz
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.
Diffstat (limited to 'www/c-icap')
-rw-r--r--www/c-icap/DESCR6
-rw-r--r--www/c-icap/Makefile38
-rw-r--r--www/c-icap/PLIST52
-rw-r--r--www/c-icap/buildlink3.mk14
-rw-r--r--www/c-icap/distinfo7
-rw-r--r--www/c-icap/options.mk35
-rw-r--r--www/c-icap/patches/patch-Makefile.in21
-rw-r--r--www/c-icap/patches/patch-configure29
8 files changed, 202 insertions, 0 deletions
diff --git a/www/c-icap/DESCR b/www/c-icap/DESCR
new file mode 100644
index 00000000000..bfabd642e2e
--- /dev/null
+++ b/www/c-icap/DESCR
@@ -0,0 +1,6 @@
+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.
diff --git a/www/c-icap/Makefile b/www/c-icap/Makefile
new file mode 100644
index 00000000000..b8d52a6fc83
--- /dev/null
+++ b/www/c-icap/Makefile
@@ -0,0 +1,38 @@
+# $NetBSD: Makefile,v 1.1.1.1 2011/05/11 04:29:18 adam Exp $
+
+DISTNAME= c_icap-0.1.5
+PKGNAME= ${DISTNAME:S/_/-/}
+CATEGORIES= www
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=c-icap/}
+
+MAINTAINER= adam@NetBSD.org
+HOMEPAGE= http://c-icap.sourceforge.net/
+COMMENT= Implementation of an ICAP server
+LICENSE= gnu-lgpl-v2.1
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_LANGUAGES= c
+USE_LIBTOOL= yes
+USE_TOOLS+= gmake
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --enable-large-files
+
+EGDIR= ${PREFIX}/share/c-icap
+CONF_FILES= ${EGDIR}/c-icap.conf.default ${PKG_SYSCONFDIR}/c-icap.conf
+CONF_FILES+= ${EGDIR}/c-icap.magic.default ${PKG_SYSCONFDIR}/c-icap.magic
+
+BUILD_DEFS+= VARBASE
+
+SUBST_CLASSES+= fix-path
+SUBST_STAGE.fix-path= pre-configure
+SUBST_MESSAGE.fix-path= Fixing paths.
+SUBST_FILES.fix-path= c-icap.conf.in
+SUBST_SED.fix-path= -e 's, @prefix@/var, ${VARBASE},g'
+SUBST_SED.fix-path+= -e 's, /var, ${VARBASE},g'
+
+.include "options.mk"
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/c-icap/PLIST b/www/c-icap/PLIST
new file mode 100644
index 00000000000..efe51b61c74
--- /dev/null
+++ b/www/c-icap/PLIST
@@ -0,0 +1,52 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2011/05/11 04:29:18 adam Exp $
+bin/c-icap
+bin/c-icap-client
+bin/c-icap-config
+bin/c-icap-libicapapi-config
+${PLIST.bdb}bin/c-icap-mkbdb
+bin/c-icap-stretch
+include/c_icap/access.h
+include/c_icap/acl.h
+include/c_icap/body.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
+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/stats.h
+include/c_icap/txtTemplate.h
+include/c_icap/txt_format.h
+include/c_icap/types_ops.h
+include/c_icap/util.h
+${PLIST.bdb}lib/c_icap/bdb_tables.la
+lib/c_icap/dnsbl_tables.la
+${PLIST.ldap}lib/c_icap/ldap_module.la
+${PLIST.perl}lib/c_icap/perl_handler.la
+lib/c_icap/srv_echo.la
+lib/c_icap/sys_logger.la
+lib/libicapapi.la
+man/man8/c-icap-client.8
+man/man8/c-icap-config.8
+man/man8/c-icap-libicapapi-config.8
+man/man8/c-icap-mkbdb.8
+man/man8/c-icap-stretch.8
+man/man8/c-icap.8
+share/c-icap/c-icap.conf.default
+share/c-icap/c-icap.magic.default
diff --git a/www/c-icap/buildlink3.mk b/www/c-icap/buildlink3.mk
new file mode 100644
index 00000000000..2139ed6bb37
--- /dev/null
+++ b/www/c-icap/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2011/05/11 04:29:18 adam Exp $
+
+BUILDLINK_TREE+= c-icap
+
+.if !defined(C_ICAP_BUILDLINK3_MK)
+C_ICAP_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.c-icap+= c-icap>=0.1.5
+BUILDLINK_PKGSRCDIR.c-icap?= ../../www/c-icap
+
+.include "../../devel/zlib/buildlink3.mk"
+.endif # C_ICAP_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -c-icap
diff --git a/www/c-icap/distinfo b/www/c-icap/distinfo
new file mode 100644
index 00000000000..a72f4f1f319
--- /dev/null
+++ b/www/c-icap/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2011/05/11 04:29:18 adam Exp $
+
+SHA1 (c_icap-0.1.5.tar.gz) = 1ec7e5639daa7af7bd3264a5c6e325c718a07a7b
+RMD160 (c_icap-0.1.5.tar.gz) = 830447543a0ef21e96f13e53f5221ee4d2b252ae
+Size (c_icap-0.1.5.tar.gz) = 528684 bytes
+SHA1 (patch-Makefile.in) = 50f68b9c071d9552a37360591a27d07590759b5b
+SHA1 (patch-configure) = ef069f6377c9b96c40af1301b03464e981436ba4
diff --git a/www/c-icap/options.mk b/www/c-icap/options.mk
new file mode 100644
index 00000000000..cdcdd2ce1be
--- /dev/null
+++ b/www/c-icap/options.mk
@@ -0,0 +1,35 @@
+# $NetBSD: options.mk,v 1.1.1.1 2011/05/11 04:29:18 adam Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.c-icap
+PKG_SUPPORTED_OPTIONS= bdb ldap perl
+PKG_SUGGESTED_OPTIONS= bdb ldap perl
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= bdb ldap perl
+
+.if !empty(PKG_OPTIONS:Mbdb)
+PLIST.bdb= yes
+BDB_ACCEPTED= db5 db4
+CONFIGURE_ARGS+= --with-bdb=${BDBBASE}
+. include "../../mk/bdb.buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-bdb
+.endif
+
+.if !empty(PKG_OPTIONS:Mldap)
+PLIST.ldap= yes
+CONFIGURE_ARGS+= --with-ldap
+. include "../../databases/openldap-client/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-ldap
+.endif
+
+.if !empty(PKG_OPTIONS:Mperl)
+PLIST.perl= yes
+USE_TOOLS+= perl:build
+CONFIGURE_ARGS+= --with-perl
+. include "../../lang/perl5/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-perl
+.endif
diff --git a/www/c-icap/patches/patch-Makefile.in b/www/c-icap/patches/patch-Makefile.in
new file mode 100644
index 00000000000..6f7bc0fa065
--- /dev/null
+++ b/www/c-icap/patches/patch-Makefile.in
@@ -0,0 +1,21 @@
+$NetBSD: patch-Makefile.in,v 1.1.1.1 2011/05/11 04:29:18 adam Exp $
+
+Handle configuration files.
+
+--- Makefile.in.orig 2011-03-28 19:22:39.000000000 +0000
++++ Makefile.in
+@@ -1560,11 +1560,9 @@ doc:
+ $(DOXYGEN) c-icap.dox
+
+ install-data-local:
+- $(mkinstalldirs) $(DESTDIR)$(CONFIGDIR);
+- $(INSTALL) c-icap.conf $(DESTDIR)$(CONFIGDIR)/c-icap.conf.default
+- $(INSTALL) c-icap.magic $(DESTDIR)$(CONFIGDIR)/c-icap.magic.default
+- if test ! -f $(DESTDIR)$(CONFIGDIR)/c-icap.conf; then $(INSTALL) c-icap.conf $(DESTDIR)$(CONFIGDIR)/c-icap.conf; fi
+- if test ! -f $(DESTDIR)$(CONFIGDIR)/c-icap.magic; then $(INSTALL) c-icap.magic $(DESTDIR)$(CONFIGDIR)/c-icap.magic; fi
++ $(mkinstalldirs) $(DESTDIR)$(datadir)/c-icap;
++ $(INSTALL) c-icap.conf $(DESTDIR)$(datadir)/c-icap/c-icap.conf.default
++ $(INSTALL) c-icap.magic $(DESTDIR)$(datadir)/c-icap/c-icap.magic.default
+ $(mkinstalldirs) $(DESTDIR)$(LOGDIR);
+ $(mkinstalldirs) $(DESTDIR)$(SOCKDIR);
+ chgrp nogroup $(DESTDIR)$(LOGDIR) || echo -e "*********\nWARNING! Can not set group for the log dir $(DESTDIR)$(LOGDIR)\n*********\n"
diff --git a/www/c-icap/patches/patch-configure b/www/c-icap/patches/patch-configure
new file mode 100644
index 00000000000..9753a816942
--- /dev/null
+++ b/www/c-icap/patches/patch-configure
@@ -0,0 +1,29 @@
+$NetBSD: patch-configure,v 1.1.1.1 2011/05/11 04:29:18 adam Exp $
+
+Detect Berkeley DB.
+
+--- configure.orig 2011-05-05 12:27:48.000000000 +0000
++++ configure
+@@ -11647,11 +11647,11 @@ rm -f core conftest.err conftest.$ac_obj
+ # Save old CFLAGS/LDFLAGS
+ OLDCFLAGS=$CFLAGS
+ OLDLDFLAGS=$LDFLAGS
+- for DBVER in 49 48 47 46 45 44 43 42; do
++ for DBVER in 4 5 6; do
+ if test -d $libdbpath/include/db$DBVER; then
+ echo -n "checking for Berleley DB under $libdbpath/include/db$DBVER and $libdbpath/lib/db$DBVER... "
+ CFLAGS="-I$libdbpath/include/db$DBVER $OLDCFLAGS"
+- LDFLAGS="-L $libdbpath/lib/db$DBVER -ldb $OLDLDFLAGS"
++ LDFLAGS="-L $libdbpath/lib -ldb$DBVER $OLDLDFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -11665,7 +11665,7 @@ rm -f core conftest.err conftest.$ac_obj
+
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- echo yes;BDB_ADD_LDFLAG="-L$libdbpath/lib/db$DBVER -ldb"; BDB_ADD_FLAG="-I$libdbpath/include/db$DBVER";libdb="yes";
++ echo yes;BDB_ADD_LDFLAG="-L$libdbpath/lib -ldb$DBVER"; BDB_ADD_FLAG="-I$libdbpath/include/db$DBVER";libdb="yes";
+ else
+ libdb="no"; echo "no";
+