1 ################################################################################
5 ################################################################################
7 SQUID_VERSION_MAJOR = 3.5
8 SQUID_VERSION = $(SQUID_VERSION_MAJOR).27
9 SQUID_SOURCE = squid-$(SQUID_VERSION).tar.xz
10 SQUID_SITE = http://www.squid-cache.org/Versions/v3/$(SQUID_VERSION_MAJOR)
11 SQUID_LICENSE = GPL-2.0+
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 BUILDCXX="$(HOSTCXX)" \
25 BUILDCXXFLAGS="$(HOST_CXXFLAGS)"
28 $(if $(BR2_TOOLCHAIN_USES_MUSL),--disable-linux-netfilter,--enable-linux-netfilter) \
29 --enable-removal-policies="lru,heap" \
30 --with-filedescriptors=1024 \
31 --disable-ident-lookups \
32 --enable-auth-basic="fake getpwnam" \
33 --enable-auth-digest="file" \
34 --enable-auth-negotiate="wrapper" \
35 --enable-auth-ntlm="fake" \
36 --disable-strict-error-checking \
37 --enable-external-acl-helpers="file_userip" \
38 --with-logdir=/var/log/squid/ \
39 --with-pidfile=/var/run/squid.pid \
40 --with-swapdir=/var/cache/squid/ \
41 --with-default-user=squid
43 # Atomics in Squid use __sync built-ins on 4 and 8 bytes. However, the
44 # configure script tests them using AC_TRY_RUN, so we have to give
46 ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4)$(BR2_TOOLCHAIN_HAS_SYNC_8),yy)
47 SQUID_CONF_ENV += squid_cv_gnu_atomics=yes
49 SQUID_CONF_ENV += squid_cv_gnu_atomics=no
52 ifeq ($(BR2_PACKAGE_LIBKRB5),y)
53 SQUID_CONF_OPTS += --with-mit-krb5
54 SQUID_DEPENDENCIES += libkrb5
56 SQUID_CONF_OPTS += --without-mit-krb5
59 ifeq ($(BR2_PACKAGE_OPENSSL),y)
60 SQUID_CONF_OPTS += --with-openssl
61 SQUID_DEPENDENCIES += openssl
63 SQUID_CONF_OPTS += --without-openssl
66 ifeq ($(BR2_PACKAGE_GNUTLS),y)
67 SQUID_CONF_OPTS += --with-gnutls
68 SQUID_DEPENDENCIES += gnutls
70 SQUID_CONF_OPTS += --without-gnutls
73 define SQUID_CLEANUP_TARGET
74 rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \
76 rm -f $(addprefix $(TARGET_DIR)/etc/, \
77 cachemgr.conf mime.conf.default squid.conf.default)
80 SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
83 squid -1 squid -1 * - - - Squid proxy cache
86 define SQUID_INSTALL_INIT_SYSV
87 $(INSTALL) -m 755 -D package/squid/S97squid \
88 $(TARGET_DIR)/etc/init.d/S97squid
91 define SQUID_INSTALL_INIT_SYSTEMD
92 $(INSTALL) -D -m 0644 $(@D)/tools/systemd/squid.service \
93 $(TARGET_DIR)/usr/lib/systemd/system/squid.service
94 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
95 ln -sf ../../../..//usr/lib/systemd/system/squid.service \
96 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/squid.service
99 $(eval $(autotools-package))