initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,391 @@
From 1631a6c1f50e152b8a45d8279c96086e5636795b Mon Sep 17 00:00:00 2001
From: Christos Tsantilas <christos@chtsanti.net>
Date: Fri, 25 Jan 2019 06:42:22 -0800
Subject: [PATCH] Required fixes to compile and run under cygwin
[Retrieved (and backported) from:
https://github.com/c-icap/c-icap-server/commit/1631a6c1f50e152b8a45d8279c96086e5636795b,
which has the side effect of fixing the build with the musl C library]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Makefile.am | 2 +-
configure.ac | 10 +++++++---
header.c | 34 ----------------------------------
include/header.h | 8 --------
modules/Makefile.am | 34 ++++++++++++++++++++--------------
modules/bdb_tables.c | 17 +++++++++++++++--
modules/shared_cache.c | 12 ++++++++++++
modules/sys_logger.c | 13 +++++++++++++
services/echo/Makefile.am | 10 ++++++++--
services/ex-206/Makefile.am | 10 ++++++++--
utils/c-icap-mkbdb.c | 8 ++++----
11 files changed, 88 insertions(+), 70 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4c34033..ab80f4f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,7 +53,7 @@ c_icap_SOURCES = aserver.c request.c cfg_param.c \
libicapapi_la_CFLAGS= $(INVISIBILITY_CFLAG) -I$(srcdir)/include/ -Iinclude/ @ZLIB_ADD_FLAG@ @OPENSSL_ADD_FLAG@ @BZLIB_ADD_FLAG@ @BROTLI_ADD_FLAG@ @PCRE_ADD_FLAG@ -DCI_BUILD_LIB
libicapapi_la_LIBADD = @ZLIB_ADD_LDADD@ @BZLIB_ADD_LDADD@ @BROTLI_ADD_LDADD@ @PCRE_ADD_LDADD@ @DL_ADD_FLAG@ @THREADS_LDADD@ @OPENSSL_ADD_LDADD@
-libicapapi_la_LDFLAGS= -shared -version-info @CICAPLIB_VERSION@ @THREADS_LDFLAGS@
+libicapapi_la_LDFLAGS= -shared -version-info @CICAPLIB_VERSION@ @LIBS_LDFLAGS@ @THREADS_LDFLAGS@
export EXT_PROGRAMS_MKLIB = @ZLIB_LNDIR_LDADD@ @BZLIB_LNDIR_LDADD@ @BROTLI_LNDIR_LDADD@ @PCRE_LNDIR_LDADD@ @OPENSSL_LNDIR_LDADD@
diff --git a/configure.ac b/configure.ac
index 405571b..8059cb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,12 +45,14 @@ case "$host_os" in
CFLAGS="-D_REENTRANT $CFLAGS"
THREADS_LDADD="-lpthread"
THREADS_LDFLAGS=""
+ LIBS_LDFLAGS=""
;;
solaris2.*)
CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS $CFLAGS"
LIBS="-lsocket -lnsl -lrt $LIBS"
THREADS_LDADD="-lpthread"
THREADS_LDFLAGS=""
+ LIBS_LDFLAGS=""
;;
freebsd5*)
## If I understand how all those threading models works correctly
@@ -69,6 +71,7 @@ case "$host_os" in
CFLAGS="-pthread -D_THREAD_SAFE $CFLAGS"
THREADS_LDADD="-XCClinker -lc_r"
THREADS_LDFLAGS=""
+ LIBS_LDFLAGS=""
## FreeBSD has pthreads rwlocks from version 3 (I think)
# AC_DEFINE(HAVE_PTHREADS_RWLOCK,1,[Define HAVE_PTHREADS_RWLOCK if pthreads library supports rwlocks])
## 1:1 threads
@@ -82,24 +85,28 @@ case "$host_os" in
CFLAGS="-D_THREAD_SAFE $CFLAGS"
THREADS_LDADD="-XCClinker -lthr"
THREADS_LDFLAGS=""
+ LIBS_LDFLAGS=""
;;
cygwin*)
CFLAGS="-D_REENTRANT $CFLAGS"
THREADS_LDADD="-lpthread"
THREADS_LDFLAGS="";
+ LIBS_LDFLAGS="-no-undefined"
iscygwin="yes"
;;
*)
CFLAGS="-D_REENTRANT $CFLAGS"
THREADS_LDADD="-lpthread"
THREADS_LDFLAGS=""
+ LIBS_LDFLAGS=""
;;
esac
TEST_LIBS="$TEST_LIBS $THREADS_LDADD"
AC_SUBST(THREADS_LDADD)
AC_SUBST(THREADS_LDFLAGS)
+AC_SUBST(LIBS_LDFLAGS)
AC_DEFINE_UNQUOTED(C_ICAP_CONFIGURE_OPTIONS, "$ac_configure_args",
[configure command line used to configure c-icap])
@@ -984,9 +991,6 @@ LIBS="$LIBS $EXTRALIBS"
#Configure common flags
MODULES_LIBADD=""
-if test a"$iscygwin" != a; then
- MODULES_LIBADD="-L../../ -licapapi"
-fi
MODULES_CFLAGS="$INVISIBILITY_CFLAG -DCI_BUILD_MODULE"
AC_SUBST(MODULES_LIBADD)
AC_SUBST(MODULES_CFLAGS)
diff --git a/header.c b/header.c
index 807a2e0..266b958 100644
--- a/header.c
+++ b/header.c
@@ -110,21 +110,6 @@ const struct ci_error_code ci_error_codes[] = {
{505, "Unsupported version"} /*ICAP version not supported by server. */
};
-/*
-#ifdef __CYGWIN__
-int ci_error_code(int ec){
- return (ec >= EC_100 && ec < EC_MAX ? ci_error_codes[ec].code:1000);
-}
-
-const char *unknownerrorcode = "UNKNOWN ERROR CODE";
-
-const char *ci_error_code_string(int ec){
- return (ec >= EC_100 && ec < EC_MAX?ci_error_codes[ec].str:unknownerrorcode);
-}
-#endif
-*/
-
-
const char *ci_encaps_entities[] = {
"req-hdr",
"res-hdr",
@@ -134,25 +119,6 @@ const char *ci_encaps_entities[] = {
"opt-body"
};
-#ifdef __CYGWIN__
-
-const char *unknownentity = "UNKNOWN";
-const char *unknownmethod = "UNKNOWN";
-
-const char *ci_method_string(int method)
-{
- return (method <= ICAP_RESPMOD
- && method >= ICAP_OPTIONS ? CI_Methods[method] : unknownmethod);
-}
-
-
-const char *ci_encaps_entity_string(int e)
-{
- return (e <= ICAP_OPT_BODY
- && e >= ICAP_REQ_HDR ? CI_EncapsEntities[e] : unknownentity);
-}
-#endif
-
ci_headers_list_t *ci_headers_create()
{
ci_headers_list_t *h;
diff --git a/include/header.h b/include/header.h
index 4cab365..ed2de88 100644
--- a/include/header.h
+++ b/include/header.h
@@ -52,16 +52,8 @@ enum ci_encapsulated_entities {ICAP_REQ_HDR, ICAP_RES_HDR,
};
CI_DECLARE_DATA extern const char *ci_encaps_entities[];
-#ifdef __CYGWIN__
-
-const char *ci_encaps_entity_string(int e);
-
-#else
-
#define ci_encaps_entity_string(e) (e <= ICAP_OPT_BODY && e >= ICAP_REQ_HDR?ci_encaps_entities[e]:"UNKNOWN")
-#endif
-
/**
\typedef ci_headers_list_t
\ingroup HEADERS
diff --git a/modules/Makefile.am b/modules/Makefile.am
index e6e9270..2d43a60 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -21,38 +21,44 @@ endif
AM_CPPFLAGS=-I$(top_srcdir)/ -I$(top_srcdir)/include/ -I$(top_builddir)/include/
-sys_logger_la_LIBADD = @MODULES_LIBADD@
+if ISCYGWIN
+MODS_LIB_ADD=$(top_builddir)/libicapapi.la
+else
+MODS_LIB_ADD=
+endif
+
+sys_logger_la_LIBADD = $(MODS_LIB_ADD)
sys_logger_la_CFLAGS= @MODULES_CFLAGS@ @OPENSSL_ADD_FLAG@
-sys_logger_la_LDFLAGS= -module -avoid-version
+sys_logger_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@
sys_logger_la_SOURCES = sys_logger.c
-dnsbl_tables_la_LIBADD = @MODULES_LIBADD@
+dnsbl_tables_la_LIBADD = $(MODS_LIB_ADD)
dnsbl_tables_la_CFLAGS= @MODULES_CFLAGS@ @OPENSSL_ADD_FLAG@
-dnsbl_tables_la_LDFLAGS= -module -avoid-version
+dnsbl_tables_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@
dnsbl_tables_la_SOURCES = dnsbl_tables.c
-perl_handler_la_LIBADD = @MODULES_LIBADD@ @perllib@ -L@perlcore@ -lperl
+perl_handler_la_LIBADD = $(MODS_LIB_ADD) @perllib@ -L@perlcore@ -lperl
perl_handler_la_CFLAGS= @MODULES_CFLAGS@ @perlccflags@ -I@perlcore@
-perl_handler_la_LDFLAGS= -module -avoid-version @perlldflags@
+perl_handler_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@ @perlldflags@
perl_handler_la_SOURCES = perl_handler.c
-bdb_tables_la_LIBADD = @MODULES_LIBADD@ @BDB_ADD_LDADD@
+bdb_tables_la_LIBADD = $(MODS_LIB_ADD) @BDB_ADD_LDADD@
bdb_tables_la_CFLAGS= @MODULES_CFLAGS@ @BDB_ADD_FLAG@
-bdb_tables_la_LDFLAGS= -module -avoid-version
+bdb_tables_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@
bdb_tables_la_SOURCES = bdb_tables.c
-ldap_module_la_LIBADD = @MODULES_LIBADD@ @LDAP_ADD_LDADD@ $(top_builddir)/libicapapi.la
+ldap_module_la_LIBADD = $(MODS_LIB_ADD) @LDAP_ADD_LDADD@
ldap_module_la_CFLAGS= @MODULES_CFLAGS@ @LDAP_ADD_FLAG@
-ldap_module_la_LDFLAGS= -module -avoid-version
+ldap_module_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@
ldap_module_la_SOURCES = ldap_module.c
-memcached_cache_la_LIBADD= @MODULES_LIBADD@ @MEMCACHED_ADD_LDADD@
+memcached_cache_la_LIBADD= $(MODS_LIB_ADD) @MEMCACHED_ADD_LDADD@
memcached_cache_la_CFLAGS= @MODULES_CFLAGS@ @MEMCACHED_ADD_FLAG@
-memcached_cache_la_LDFLAGS= -module -avoid-version
+memcached_cache_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@
memcached_cache_la_SOURCES= memcached.c
-shared_cache_la_LIBADD= @MODULES_LIBADD@
+shared_cache_la_LIBADD= $(MODS_LIB_ADD)
shared_cache_la_CFLAGS= @OPENSSL_ADD_FLAG@
-shared_cache_la_LDFLAGS= -module -avoid-version
+shared_cache_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@
shared_cache_la_SOURCES= shared_cache.c
diff --git a/modules/bdb_tables.c b/modules/bdb_tables.c
index b8459be..1e908a9 100644
--- a/modules/bdb_tables.c
+++ b/modules/bdb_tables.c
@@ -176,8 +176,8 @@ void *bdb_table_open(struct ci_lookup_table *table)
/*We can not fork a Berkeley DB table, so we have to
open bdb tables for every child, on childs start-up procedure*/
- register_command_extend("openBDBtable", CHILD_START_CMD, table,
- command_real_open_table);
+ ci_command_register_action("openBDBtable", CHILD_START_CMD, table,
+ command_real_open_table);
return table->data;
}
@@ -257,3 +257,16 @@ void bdb_table_release_result(struct ci_lookup_table *table,void **val)
{
ci_buffer_free(val);
}
+
+ #ifdef __CYGWIN__
+#include <w32api/windows.h>
+void ci_command_register_action(const char *name, int type, void *data,
+ void (*command_action) (const char *name, int type, void *data))
+ {
+ typedef void (*RA)(const char *, int, void *, void(*)(const char *, int, void *));
+ RA fn;
+ fn = (RA)GetProcAddress(GetModuleHandle(NULL), "ci_command_register_action");
+ if (fn)
+ (*fn)(name, type, data, command_action);
+ }
+#endif
diff --git a/modules/shared_cache.c b/modules/shared_cache.c
index 103b760..a79d51a 100644
--- a/modules/shared_cache.c
+++ b/modules/shared_cache.c
@@ -345,3 +345,15 @@ void ci_shared_cache_destroy(struct ci_cache *cache)
ci_shared_mem_detach(&data->id);
}
+#ifdef __CYGWIN__
+#include <w32api/windows.h>
+void ci_command_register_action(const char *name, int type, void *data,
+ void (*command_action) (const char *name, int type, void *data))
+ {
+ typedef void (*RA)(const char *, int, void *, void(*)(const char *, int, void *));
+ RA fn;
+ fn = (RA)GetProcAddress(GetModuleHandle(NULL), "ci_command_register_action");
+ if (fn)
+ (*fn)(name, type, data, command_action);
+ }
+#endif
diff --git a/modules/sys_logger.c b/modules/sys_logger.c
index 1c47753..1764b0d 100644
--- a/modules/sys_logger.c
+++ b/modules/sys_logger.c
@@ -60,7 +60,20 @@ int cfg_syslog_access(const char *directive, const char **argv, void *setdata);
functions declared in log.c. This file is not included in c-icap library
but defined in primary c-icap binary.
*/
+#ifdef __CYGWIN__
+#include <w32api/windows.h>
+char *logformat_fmt(const char *name)
+{
+ typedef char* (*LF_FMT)(const char *);
+ LF_FMT fn;
+ fn = (LF_FMT)GetProcAddress(GetModuleHandle(NULL), "logformat_fmt");
+ if (fn)
+ return (*fn)(name);
+ return NULL;
+}
+#else
extern char *logformat_fmt(const char *name);
+#endif
/*Configuration Table .....*/
static struct ci_conf_entry conf_variables[] = {
diff --git a/services/echo/Makefile.am b/services/echo/Makefile.am
index 402c8f9..7d701b1 100644
--- a/services/echo/Makefile.am
+++ b/services/echo/Makefile.am
@@ -3,9 +3,15 @@ pkglib_LTLIBRARIES=srv_echo.la
AM_CPPFLAGS=-I$(top_srcdir)/ -I$(top_srcdir)/include/ -I$(top_builddir)/include/
-srv_echo_la_LIBADD = @MODULES_LIBADD@
+if ISCYGWIN
+MODS_LIB_ADD=$(top_builddir)/libicapapi.la
+else
+MODS_LIB_ADD=
+endif
+
+srv_echo_la_LIBADD = $(MODS_LIB_ADD)
srv_echo_la_CFLAGS= @MODULES_CFLAGS@ @OPENSSL_ADD_FLAG@
-srv_echo_la_LDFLAGS= -module -avoid-version
+srv_echo_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@
srv_echo_la_SOURCES = srv_echo.c
diff --git a/services/ex-206/Makefile.am b/services/ex-206/Makefile.am
index 44bbf21..ff73399 100644
--- a/services/ex-206/Makefile.am
+++ b/services/ex-206/Makefile.am
@@ -3,8 +3,14 @@ pkglib_LTLIBRARIES=srv_ex206.la
AM_CPPFLAGS=-I$(top_srcdir)/ -I$(top_srcdir)/include/ -I$(top_builddir)/include/
-srv_ex206_la_LIBADD = @MODULES_LIBADD@
+if ISCYGWIN
+MODS_LIB_ADD=$(top_builddir)/libicapapi.la
+else
+MODS_LIB_ADD=
+endif
+
+srv_ex206_la_LIBADD = $(MODS_LIB_ADD)
srv_ex206_la_CFLAGS= @MODULES_CFLAGS@ @OPENSSL_ADD_FLAG@
-srv_ex206_la_LDFLAGS= -module -avoid-version
+srv_ex206_la_LDFLAGS= -module -avoid-version @LIBS_LDFLAGS@
srv_ex206_la_SOURCES = srv_ex206.c
diff --git a/utils/c-icap-mkbdb.c b/utils/c-icap-mkbdb.c
index c29a46f..326ee1c 100644
--- a/utils/c-icap-mkbdb.c
+++ b/utils/c-icap-mkbdb.c
@@ -23,7 +23,7 @@ char *dbfile = NULL;
int DUMP_MODE = 0;
int VERSION_MODE = 0;
int USE_DBTREE = 0;
-long int PAGE_SIZE;
+long int DB_PAGE_SIZE;
ci_mem_allocator_t *allocator = NULL;
int cfg_set_type(const char *directive, const char **argv, void *setdata);
@@ -52,7 +52,7 @@ static struct ci_options_entry options[] = {
"The type of values"
},
{
- "-p", "page_size", &PAGE_SIZE, ci_cfg_size_long,
+ "-p", "page_size", &DB_PAGE_SIZE, ci_cfg_size_long,
"The page size to use for the database"
},
{
@@ -107,8 +107,8 @@ int open_db(char *path)
return 0;
}
- if (PAGE_SIZE > 512 && PAGE_SIZE <= 64*1024)
- db->set_pagesize(db, (uint32_t)PAGE_SIZE);
+ if (DB_PAGE_SIZE > 512 && DB_PAGE_SIZE <= 64*1024)
+ db->set_pagesize(db, (uint32_t)DB_PAGE_SIZE);
if ((ret = db->open(db, NULL, path, NULL,
(USE_DBTREE ? DB_BTREE : DB_HASH),
+18
View File
@@ -0,0 +1,18 @@
config BR2_PACKAGE_C_ICAP
bool "c-icap"
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU # fork()
help
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.
http://c-icap.sourceforge.net/
comment "c-icap needs a toolchain w/ threads and dynamic library"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
# (Re)create directories
mkdir -p /var/run/c-icap
mkdir -p /var/log/c-icap
case "$1" in
start)
printf "Starting c-icap server: "
start-stop-daemon -S -q -b -m -p /var/run/c-icap.pid \
-x /usr/bin/c-icap -- -N
[ $? == 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping c-icap server: "
start-stop-daemon -K -q -p /var/run/c-icap.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart|reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: /etc/init.d/S96cicap {start|stop|restart|reload}"
exit 1
esac
+6
View File
@@ -0,0 +1,6 @@
# Retrieved from https://sourceforge.net/projects/c-icap/files/c-icap/0.5.x/
md5 82fd2fba1a08a8a0cf3567fe24aa035d c_icap-0.5.7.tar.gz
sha1 3b2470e00abd1418bec3a440d3073d7a6231c4c1 c_icap-0.5.7.tar.gz
# Locally calculated
sha256 01ef17d7999d3476fe705abc56d0da562c2f180aafe08fc1269f419cad8521a9 c_icap-0.5.7.tar.gz
sha256 36b6d3fa47916943fd5fec313c584784946047ec1337a78b440e5992cb595f89 COPYING
+102
View File
@@ -0,0 +1,102 @@
################################################################################
#
# c-icap
#
################################################################################
C_ICAP_VERSION = 0.5.7
C_ICAP_SOURCE = c_icap-$(C_ICAP_VERSION).tar.gz
C_ICAP_SITE = http://downloads.sourceforge.net/c-icap
C_ICAP_LICENSE = LGPL-2.1+
C_ICAP_LICENSE_FILES = COPYING
C_ICAP_CPE_ID_VENDOR = c-icap_project
C_ICAP_INSTALL_STAGING = YES
C_ICAP_CONFIG_SCRIPTS = c-icap-config c-icap-libicapapi-config
C_ICAP_CONF_OPTS = \
--without-perl \
--enable-large-files \
--enable-ipv6
# Pre-seed cache variables for tests done with AC_TRY_RUN that are not
# cross-compile friendly
C_ICAP_CONF_ENV = ac_cv_10031b_ipc_sem=yes ac_cv_fcntl=yes
# c-icap adds '-Wl,-rpath -Wl,/usr/lib' to the link command line. This
# causes the linker to search for libraries that are listed as NEEDED
# in the libicapapi.so ELF header in host libraries, which breaks the
# build. The affected library is libz. Forcing AUTORECONF adds -lz to
# the link command line, and that makes the linker look first in
# sysroot, thus avoiding the build breakage.
C_ICAP_AUTORECONF = YES
ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
C_ICAP_CONF_OPTS += --with-bdb
C_ICAP_DEPENDENCIES += berkeleydb
else
C_ICAP_CONF_OPTS += --without-bdb
endif
ifeq ($(BR2_PACKAGE_BZIP2),y)
C_ICAP_CONF_OPTS += --with-bzlib
C_ICAP_DEPENDENCIES += bzip2
else
C_ICAP_CONF_OPTS += --without-bzlib
endif
ifeq ($(BR2_PACKAGE_LIBMEMCACHED),y)
C_ICAP_CONF_OPTS += --with-memcached
C_ICAP_DEPENDENCIES += libmemcached
else
C_ICAP_CONF_OPTS += --without-memcached
endif
ifeq ($(BR2_PACKAGE_OPENLDAP),y)
C_ICAP_CONF_OPTS += --with-ldap
C_ICAP_DEPENDENCIES += openldap
else
C_ICAP_CONF_OPTS += --without-ldap
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
C_ICAP_CONF_OPTS += --with-openssl
C_ICAP_DEPENDENCIES += openssl
else
C_ICAP_CONF_OPTS += --without-openssl
endif
ifeq ($(BR2_PACKAGE_PCRE),y)
C_ICAP_CONF_OPTS += --with-pcre
C_ICAP_DEPENDENCIES += pcre
else
C_ICAP_CONF_OPTS += --without-pcre
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
C_ICAP_CONF_OPTS += --with-zlib
C_ICAP_DEPENDENCIES += zlib
else
C_ICAP_CONF_OPTS += --without-zlib
endif
define C_ICAP_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/c-icap/S96cicap $(TARGET_DIR)/etc/init.d/S96cicap
endef
# Tweak the installation:
# - Removed unneeded sample configuration files (c-icap.*.default),
# since some real ones are also installed
# - Tweak some paths in the c-icap.conf configuration file
# - Tweak the -config scripts, because the generic
# <pkg>_CONFIG_SCRIPTS logic doesn't tweak them enough
define C_ICAP_TUNE_INSTALLATION
$(RM) -f $(TARGET_DIR)/etc/c-icap.*.default
$(SED) 's%/usr/etc/%/etc/%' $(TARGET_DIR)/etc/c-icap.conf
$(SED) 's%/usr/var/%/var/%' $(TARGET_DIR)/etc/c-icap.conf
$(SED) 's%INCDIR=.*%INCDIR=$(STAGING_DIR)/usr/include%' \
$(STAGING_DIR)/usr/bin/{c-icap,c-icap-libicapapi}-config
$(SED) 's%INCDIR2=.*%INCDIR2=$(STAGING_DIR)/usr/include/c_icap%' \
$(STAGING_DIR)/usr/bin/{c-icap,c-icap-libicapapi}-config
$(SED) 's%-L$$LIBDIR %%' $(STAGING_DIR)/usr/bin/c-icap-libicapapi-config
endef
C_ICAP_POST_INSTALL_TARGET_HOOKS += C_ICAP_TUNE_INSTALLATION
$(eval $(autotools-package))