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.

132 lines
3.3 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:=3.5.2
  10. PKG_RELEASE:=4
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v3/3.5/
  15. PKG_MD5SUM:=0330ec9f69e333c2a81fa4502ba96a22
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/squid/Default
  20. SECTION:=net
  21. CATEGORY:=Network
  22. SUBMENU:=Web Servers/Proxies
  23. URL:=http://www.squid-cache.org/
  24. endef
  25. define Package/squid
  26. $(call Package/squid/Default)
  27. MENU:=1
  28. DEPENDS:=+libopenssl +libpthread +librt +libltdl +libstdcpp +libgnutls
  29. TITLE:=full-featured Web proxy cache
  30. endef
  31. define Package/squid/description
  32. Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more.
  33. It reduces bandwidth and improves response times by caching and reusing
  34. frequently-requested web pages.
  35. endef
  36. define Package/squid-mod-cachemgr
  37. $(call Package/squid/Default)
  38. DEPENDS:=squid
  39. TITLE:=Web based proxy manager and reporting tool
  40. endef
  41. CONFIGURE_ARGS += \
  42. --config-cache \
  43. --datadir=/usr/share/squid \
  44. --libexecdir=/usr/lib/squid \
  45. --sysconfdir=/etc/squid \
  46. --enable-shared \
  47. --disable-static \
  48. --enable-icmp \
  49. --enable-delay-pools \
  50. --enable-icap-client \
  51. --enable-kill-parent-hack \
  52. --disable-snmp \
  53. --enable-ssl \
  54. --enable-cache-digests \
  55. --enable-auth \
  56. --enable-auth-basic \
  57. --enable-auth-ntlm \
  58. --enable-auth-negotiate \
  59. --enable-auth-digest \
  60. --enable-linux-netfilter \
  61. --disable-unlinkd \
  62. --enable-x-accelerator-vary \
  63. --disable-translation \
  64. --disable-auto-locale \
  65. --with-dl \
  66. --with-pthreads \
  67. --without-expat \
  68. --without-libxml2 \
  69. --without-nettle \
  70. --with-openssl=$(STAGING_DIR)/usr \
  71. --enable-epoll \
  72. --with-maxfd=4096 \
  73. --disable-external-acl-helpers \
  74. --disable-auth-negotiate \
  75. --disable-auth-ntlm \
  76. --disable-auth-digest \
  77. --disable-auth-basic \
  78. --disable-arch-native \
  79. --with-krb5-config=no \
  80. --without-libcap \
  81. --without-netfilter-conntrack
  82. CONFIGURE_VARS += \
  83. ac_cv_header_linux_netfilter_ipv4_h=yes \
  84. ac_cv_epoll_works=yes
  85. define Build/Compile
  86. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
  87. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  88. DESTDIR="$(PKG_INSTALL_DIR)" \
  89. install
  90. endef
  91. define Package/squid/install
  92. $(INSTALL_DIR) $(1)/usr/sbin
  93. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
  94. $(INSTALL_DIR) $(1)/etc/config
  95. $(INSTALL_CONF) ./files/squid.config $(1)/etc/config/squid
  96. $(INSTALL_DIR) $(1)/etc/squid
  97. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/
  98. $(INSTALL_CONF) ./files/squid.conf $(1)/etc/squid/
  99. $(INSTALL_DIR) $(1)/etc/init.d/
  100. $(INSTALL_BIN) ./files/squid.init $(1)/etc/init.d/squid
  101. $(INSTALL_DIR) $(1)/usr/share/squid/icons/
  102. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/icons/* $(1)/usr/share/squid/icons/
  103. $(INSTALL_DIR) $(1)/usr/share/squid/errors/templates/
  104. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/errors/templates/* $(1)/usr/share/squid/errors/templates/
  105. endef
  106. define Package/squid-mod-cachemgr/install
  107. $(INSTALL_DIR) $(1)/www/cgi-bin/
  108. $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/
  109. endef
  110. $(eval $(call BuildPackage,squid))
  111. $(eval $(call BuildPackage,squid-mod-cachemgr))