squid.mk 2.5 KB

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