You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

155 lines
4.8 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=squid
  9. PKG_VERSION:=4.0.24
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v4/ \
  15. http://www2.pl.squid-cache.org/Versions/v4/ \
  16. http://www.squid-cache.org/Versions/v4/
  17. PKG_HASH:=091da0d763307dcc0f5c784ab07ea0c5a093f6dfac60f17ff26e2a6d50f76a07
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/squid/Default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=Web Servers/Proxies
  25. URL:=http://www.squid-cache.org/
  26. endef
  27. define Package/squid
  28. $(call Package/squid/Default)
  29. MENU:=1
  30. DEPENDS:=+libpthread +librt +libltdl +libstdcpp +libatomic +USE_GLIBC:libbsd
  31. DEPENDS+= +SQUID_use-gnutls:libgnutls +!SQUID_use-gnutls:libopenssl
  32. DEPENDS+= +SQUID_with-libcap:libcap
  33. DEPENDS+= +SQUID_with-nettle:libnettle
  34. DEPENDS+= +SQUID_with-expat:libexpat
  35. DEPENDS+= +SQUID_with-libxml2:libxml2
  36. USERID:=squid=137:squid=137
  37. TITLE:=full-featured Web proxy cache
  38. endef
  39. define Package/squid/description
  40. Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more.
  41. It reduces bandwidth and improves response times by caching and reusing
  42. frequently-requested web pages.
  43. endef
  44. define Package/squid/config
  45. source "$(SOURCE)/Config.in"
  46. endef
  47. define Package/squid/conffiles
  48. /etc/squid/squid.conf
  49. endef
  50. define Package/squid-mod-cachemgr
  51. $(call Package/squid/Default)
  52. DEPENDS:=squid
  53. TITLE:=Web based proxy manager and reporting tool
  54. endef
  55. CONFIGURE_ARGS += \
  56. --config-cache \
  57. --datadir=/usr/share/squid \
  58. --libexecdir=/usr/lib/squid \
  59. --sysconfdir=/etc/squid \
  60. --enable-shared \
  61. --disable-static \
  62. --enable-delay-pools \
  63. --enable-kill-parent-hack \
  64. --enable-ssl \
  65. --enable-cache-digests \
  66. --enable-linux-netfilter \
  67. --disable-unlinkd \
  68. --enable-x-accelerator-vary \
  69. --disable-translation \
  70. --disable-auto-locale \
  71. --with-dl \
  72. --with-pthreads \
  73. --enable-epoll \
  74. --with-maxfd=2048 \
  75. --disable-ecap \
  76. --disable-external-acl-helpers \
  77. --disable-arch-native \
  78. --with-krb5-config=no \
  79. --without-mit-krb5 \
  80. --without-netfilter-conntrack \
  81. --disable-ident-lookups \
  82. $(if $(CONFIG_SQUID_auth-basic),--enable,--disable)-auth-basic \
  83. $(if $(CONFIG_SQUID_auth-digest),--enable,--disable)-auth-digest \
  84. $(if $(CONFIG_SQUID_auth-ntlm),--enable,--disable)-auth-ntlm \
  85. $(if $(CONFIG_SQUID_auth-negotiate),--enable,--disable)-auth-negotiate \
  86. $(if $(CONFIG_SQUID_enable-ipv6),--enable,--disable)-dlmalloc \
  87. $(if $(CONFIG_SQUID_enable-ipv6),--enable,--disable)-ipv6 \
  88. $(if $(CONFIG_SQUID_enable-ssl-crtd),--enable-ssl-crtd) \
  89. $(if $(CONFIG_SQUID_use-gnutls),--with,--without)-gnutls \
  90. $(if $(CONFIG_SQUID_use-gnutls),--without-openssl) \
  91. $(if $(CONFIG_SQUID_use-gnutls),,--with-openssl="$(STAGING_DIR)/usr") \
  92. $(if $(CONFIG_SQUID_enable-icmp),--enable,--disable)-icmp \
  93. $(if $(CONFIG_SQUID_enable-icap-client),--enable,--disable)-icap-client \
  94. $(if $(CONFIG_SQUID_enable-snmp),--enable,--disable)-snmp \
  95. $(if $(CONFIG_SQUID_with-libcap),--with,--without)-libcap \
  96. $(if $(CONFIG_SQUID_with-nettle),--with,--without)-nettle \
  97. $(if $(CONFIG_SQUID_with-expat),--with,--without)-expat \
  98. $(if $(CONFIG_SQUID_with-libxml2),--with,--without)-libxml2
  99. CONFIGURE_VARS += \
  100. ac_cv_header_linux_netfilter_ipv4_h=yes \
  101. ac_cv_epoll_works=yes
  102. define Build/Compile
  103. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
  104. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  105. DESTDIR="$(PKG_INSTALL_DIR)" \
  106. install
  107. endef
  108. define Package/squid/install
  109. $(INSTALL_DIR) $(1)/usr/sbin
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
  111. $(INSTALL_DIR) $(1)/usr/lib/squid
  112. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/* $(1)/usr/lib/squid/
  113. $(INSTALL_DIR) $(1)/etc/config
  114. $(INSTALL_CONF) ./files/squid.config $(1)/etc/config/squid
  115. $(INSTALL_DIR) $(1)/etc/squid
  116. $(CP) $(PKG_INSTALL_DIR)/etc/squid/* $(1)/etc/squid/
  117. $(INSTALL_CONF) ./files/squid.conf $(1)/etc/squid/
  118. $(INSTALL_DIR) $(1)/etc/init.d/
  119. $(INSTALL_BIN) ./files/squid.init $(1)/etc/init.d/squid
  120. $(INSTALL_DIR) $(1)/usr/share/squid/icons/
  121. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/icons/* $(1)/usr/share/squid/icons/
  122. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/mib.txt $(1)/usr/share/squid/
  123. $(INSTALL_DIR) $(1)/usr/share/squid/errors/templates/
  124. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/errors/templates/* $(1)/usr/share/squid/errors/templates/
  125. endef
  126. define Package/squid-mod-cachemgr/install
  127. $(INSTALL_DIR) $(1)/www/cgi-bin/
  128. $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/
  129. endef
  130. $(eval $(call BuildPackage,squid))
  131. $(eval $(call BuildPackage,squid-mod-cachemgr))