1################################################################################ 2# 3# squid 4# 5################################################################################ 6 7SQUID_VERSION = 4.17 8SQUID_SOURCE = squid-$(SQUID_VERSION).tar.xz 9SQUID_SITE = http://www.squid-cache.org/Versions/v4 10SQUID_LICENSE = GPL-2.0+ 11SQUID_LICENSE_FILES = COPYING 12SQUID_CPE_ID_VENDOR = squid-cache 13SQUID_SELINUX_MODULES = apache squid 14SQUID_DEPENDENCIES = libcap host-libcap libtool libxml2 host-pkgconf \ 15 $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack) 16SQUID_CONF_ENV = \ 17 ac_cv_epoll_works=yes \ 18 ac_cv_func_setresuid=yes \ 19 ac_cv_func_va_copy=yes \ 20 ac_cv_func___va_copy=yes \ 21 ac_cv_func_strnstr=no \ 22 ac_cv_have_squid=yes \ 23 BUILDCXX="$(HOSTCXX)" \ 24 BUILDCXXFLAGS="$(HOST_CXXFLAGS)" 25SQUID_CONF_OPTS = \ 26 --enable-async-io=8 \ 27 --enable-linux-netfilter \ 28 --enable-removal-policies="lru,heap" \ 29 --with-filedescriptors=1024 \ 30 --disable-ident-lookups \ 31 --enable-auth-basic="fake getpwnam" \ 32 --enable-auth-digest="file" \ 33 --enable-auth-negotiate="wrapper" \ 34 --enable-auth-ntlm="fake" \ 35 --disable-strict-error-checking \ 36 --enable-external-acl-helpers="file_userip" \ 37 --disable-ltdl-install \ 38 --without-included-ltdl \ 39 --with-logdir=/var/log/squid/ \ 40 --with-pidfile=/var/run/squid.pid \ 41 --with-swapdir=/var/cache/squid/ \ 42 --with-default-user=squid 43 44ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) 45SQUID_CONF_ENV += LIBS=-latomic 46endif 47 48ifeq ($(BR2_PACKAGE_LIBKRB5),y) 49SQUID_CONF_OPTS += --with-mit-krb5 50SQUID_DEPENDENCIES += libkrb5 51else 52SQUID_CONF_OPTS += --without-mit-krb5 53endif 54 55ifeq ($(BR2_PACKAGE_OPENSSL),y) 56SQUID_CONF_OPTS += --with-openssl 57SQUID_DEPENDENCIES += openssl 58else 59SQUID_CONF_OPTS += --without-openssl 60endif 61 62ifeq ($(BR2_PACKAGE_GNUTLS),y) 63SQUID_CONF_OPTS += --with-gnutls 64SQUID_DEPENDENCIES += gnutls 65else 66SQUID_CONF_OPTS += --without-gnutls 67endif 68 69ifeq ($(BR2_PACKAGE_SYSTEMD),y) 70SQUID_CONF_OPTS += --with-systemd 71SQUID_DEPENDENCIES += systemd 72else 73SQUID_CONF_OPTS += --without-systemd 74endif 75 76define SQUID_CLEANUP_TARGET 77 rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \ 78 RunCache RunAccel) 79 rm -f $(addprefix $(TARGET_DIR)/etc/, \ 80 cachemgr.conf mime.conf.default squid.conf.default) 81endef 82 83SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET 84 85define SQUID_USERS 86 squid -1 squid -1 * - - - Squid proxy cache 87endef 88 89define SQUID_INSTALL_INIT_SYSV 90 $(INSTALL) -m 755 -D package/squid/S97squid \ 91 $(TARGET_DIR)/etc/init.d/S97squid 92endef 93 94define SQUID_INSTALL_INIT_SYSTEMD 95 $(INSTALL) -D -m 0644 $(@D)/tools/systemd/squid.service \ 96 $(TARGET_DIR)/usr/lib/systemd/system/squid.service 97endef 98 99$(eval $(autotools-package)) 100