python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / c-icap / c-icap.mk
blob3078721bce53b8f6a02334758fcb69ccda0e2ded
1 ################################################################################
3 # c-icap
5 ################################################################################
7 C_ICAP_VERSION = 0.4.2
8 C_ICAP_SOURCE = c_icap-$(C_ICAP_VERSION).tar.gz
9 C_ICAP_SITE = http://downloads.sourceforge.net/c-icap
10 C_ICAP_LICENSE = LGPLv2.1+
11 C_ICAP_LICENSE_FILES = COPYING
12 C_ICAP_INSTALL_STAGING = YES
13 C_ICAP_CONFIG_SCRIPTS = c-icap-config c-icap-libicapapi-config
14 C_ICAP_CONF_OPTS = \
15 --with-process-mutexes=posix \
16 --without-ldap \
17 --without-perl \
18 --enable-large-files \
19 --enable-ipv6
20 # Pre-seed cache variables for tests done with AC_TRY_RUN that are not
21 # cross-compile friendly
22 C_ICAP_CONF_ENV = ac_cv_10031b_ipc_sem=yes ac_cv_fcntl=yes
23 # c-icap adds '-Wl,-rpath -Wl,/usr/lib' to the link command line. This
24 # causes the linker to search for libraries that are listed as NEEDED
25 # in the libicapapi.so ELF header in host libraries, which breaks the
26 # build. The affected library is libz. Forcing AUTORECONF adds -lz to
27 # the link command line, and that makes the linker look first in
28 # sysroot, thus avoiding the build breakage.
29 C_ICAP_AUTORECONF = YES
31 ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
32 C_ICAP_CONF_OPTS += --with-berkeleydb
33 C_ICAP_DEPENDENCIES += berkeleydb
34 else
35 C_ICAP_CONF_OPTS += --without-berkeleydb
36 endif
38 ifeq ($(BR2_PACKAGE_BZIP2),y)
39 C_ICAP_CONF_OPTS += --with-bzip2
40 C_ICAP_DEPENDENCIES += bzip2
41 else
42 C_ICAP_CONF_OPTS += --without-bzip2
43 endif
45 ifeq ($(BR2_PACKAGE_ZLIB),y)
46 C_ICAP_CONF_OPTS += --with-zlib
47 C_ICAP_DEPENDENCIES += zlib
48 else
49 C_ICAP_CONF_OPTS += --without-zlib
50 endif
52 define C_ICAP_INSTALL_INIT_SYSV
53 $(INSTALL) -m 0755 -D package/c-icap/S96cicap $(TARGET_DIR)/etc/init.d/S96cicap
54 endef
56 # Tweak the installation:
57 # - Removed unneeded sample configuration files (c-icap.*.default),
58 # since some real ones are also installed
59 # - Tweak some paths in the c-icap.conf configuration file
60 # - Tweak the -config scripts, because the generic
61 # <pkg>_CONFIG_SCRIPTS logic doesn't tweak them enough
62 define C_ICAP_TUNE_INSTALLATION
63 $(RM) -f $(TARGET_DIR)/etc/c-icap.*.default
64 $(SED) 's%/usr/etc/%/etc/%' $(TARGET_DIR)/etc/c-icap.conf
65 $(SED) 's%/usr/var/%/var/%' $(TARGET_DIR)/etc/c-icap.conf
66 $(SED) 's%INCDIR=.*%INCDIR=$(STAGING_DIR)/usr/include%' \
67 $(STAGING_DIR)/usr/bin/{c-icap,c-icap-libicapapi}-config
68 $(SED) 's%INCDIR2=.*%INCDIR2=$(STAGING_DIR)/usr/include/c_icap%' \
69 $(STAGING_DIR)/usr/bin/{c-icap,c-icap-libicapapi}-config
70 $(SED) 's%-L$$LIBDIR %%' $(STAGING_DIR)/usr/bin/c-icap-libicapapi-config
71 endef
73 C_ICAP_POST_INSTALL_TARGET_HOOKS += C_ICAP_TUNE_INSTALLATION
75 $(eval $(autotools-package))