squid.mk 2.6 KB

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