]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/squid/squid.mk
squid: bump version to 3.5.25
[coffee/buildroot.git] / package / squid / squid.mk
1 ################################################################################
2 #
3 # squid
4 #
5 ################################################################################
6
7 SQUID_VERSION_MAJOR = 3.5
8 SQUID_VERSION = $(SQUID_VERSION_MAJOR).25
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)
17 SQUID_CONF_ENV = \
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)"
26 SQUID_CONF_OPTS = \
27         --enable-async-io=8 \
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         --without-mit-krb5 \
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         --with-default-user=squid
43
44 # Atomics in Squid use __sync built-ins on 4 and 8 bytes. However, the
45 # configure script tests them using AC_TRY_RUN, so we have to give
46 # some hints.
47 ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4)$(BR2_TOOLCHAIN_HAS_SYNC_8),yy)
48 SQUID_CONF_ENV += squid_cv_gnu_atomics=yes
49 else
50 SQUID_CONF_ENV += squid_cv_gnu_atomics=no
51 endif
52
53 # On uClibc librt needs libpthread
54 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
55 SQUID_CONF_ENV += ac_cv_search_shm_open="-lrt -lpthread"
56 endif
57
58 ifeq ($(BR2_PACKAGE_OPENSSL),y)
59 SQUID_CONF_OPTS += --with-openssl
60 SQUID_DEPENDENCIES += openssl
61 else
62 SQUID_CONF_OPTS += --without-openssl
63 endif
64
65 ifeq ($(BR2_PACKAGE_GNUTLS),y)
66 SQUID_CONF_OPTS += --with-gnutls
67 SQUID_DEPENDENCIES += gnutls
68 else
69 SQUID_CONF_OPTS += --without-gnutls
70 endif
71
72 define SQUID_CLEANUP_TARGET
73         rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \
74                 RunCache RunAccel)
75         rm -f $(addprefix $(TARGET_DIR)/etc/, \
76                 cachemgr.conf mime.conf.default squid.conf.default)
77 endef
78
79 SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
80
81 define SQUID_USERS
82         squid -1 squid -1 * - - - Squid proxy cache
83 endef
84
85 define SQUID_INSTALL_INIT_SYSV
86         $(INSTALL) -m 755 -D package/squid/S97squid \
87                 $(TARGET_DIR)/etc/init.d/S97squid
88 endef
89
90 define SQUID_INSTALL_INIT_SYSTEMD
91         $(INSTALL) -D -m 0644 $(@D)/tools/systemd/squid.service \
92                 $(TARGET_DIR)/usr/lib/systemd/system/squid.service
93         mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
94         ln -sf ../../../..//usr/lib/systemd/system/squid.service \
95                 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/squid.service
96 endef
97
98 $(eval $(autotools-package))