1 ################################################################################
5 ################################################################################
7 SQUID_VERSION_MAJOR = 3.5
8 SQUID_VERSION = $(SQUID_VERSION_MAJOR).4
9 SQUID_SOURCE = squid-$(SQUID_VERSION).tar.xz
10 SQUID_SITE = http://www.squid-cache.org/Versions/v3/$(SQUID_VERSION_MAJOR)
11 SQUID_LICENSE = GPLv2+
12 SQUID_LICENSE_FILES = COPYING
13 # For 0001-assume-get-certificate-ok.patch
14 SQUID_AUTORECONF = YES
15 SQUID_DEPENDENCIES = libcap host-libcap host-pkgconf \
16 $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
18 ac_cv_epoll_works=yes \
19 ac_cv_func_setresuid=yes \
20 ac_cv_func_va_copy=yes \
21 ac_cv_func___va_copy=yes \
22 ac_cv_func_strnstr=no \
23 ac_cv_have_squid=yes \
24 BUILXCXX="$(HOSTCXX)" \
25 BUILDCXXFLAGS="$(HOST_CXXFLAGS)"
28 --enable-linux-netfilter \
29 --enable-removal-policies="lru,heap" \
30 --with-filedescriptors=1024 \
31 --disable-ident-lookups \
32 --with-krb5-config=no \
33 --enable-auth-basic="fake getpwnam" \
34 --enable-auth-digest="file" \
35 --enable-auth-negotiate="wrapper" \
36 --enable-auth-ntlm="fake" \
37 --disable-strict-error-checking \
38 --enable-external-acl-helpers="file_userip" \
39 --with-logdir=/var/log/squid/ \
40 --with-pidfile=/var/run/squid.pid \
41 --with-swapdir=/var/cache/squid/ \
42 --enable-icap-client \
43 --with-default-user=squid
45 # Atomics in Squid use __sync_add_and_fetch_8, i.e a 64 bits atomic
46 # operation. This atomic intrinsic is only available natively on
47 # 64-bit architectures that have atomic operations. On 32-bit
48 # architectures, it would be provided by libatomic, but Buildroot
49 # typically doesn't provide it.
50 ifeq ($(BR2_ARCH_HAS_ATOMICS)$(BR2_ARCH_IS_64),yy)
51 SQUID_CONF_ENV += squid_cv_gnu_atomics=yes
53 SQUID_CONF_ENV += squid_cv_gnu_atomics=no
56 # On uClibc librt needs libpthread
57 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
58 SQUID_CONF_ENV += ac_cv_search_shm_open="-lrt -lpthread"
61 ifeq ($(BR2_PACKAGE_OPENSSL),y)
62 SQUID_CONF_OPTS += --enable-ssl
63 SQUID_DEPENDENCIES += openssl
66 define SQUID_CLEANUP_TARGET
67 rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \
69 rm -f $(addprefix $(TARGET_DIR)/etc/, \
70 cachemgr.conf mime.conf.default squid.conf.default)
73 SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
76 squid -1 squid -1 * - - - Squid proxy cache
79 define SQUID_INSTALL_INIT_SYSV
80 $(INSTALL) -m 755 -D package/squid/S97squid \
81 $(TARGET_DIR)/etc/init.d/S97squid
84 $(eval $(autotools-package))