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.

133 lines
3.4 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.6
  10. PKG_RELEASE:=1
  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:=93e18bd257857e35bb634ddb8a348563
  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
  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-ssl-crtd \
  55. --enable-cache-digests \
  56. --enable-linux-netfilter \
  57. --disable-unlinkd \
  58. --enable-x-accelerator-vary \
  59. --disable-translation \
  60. --disable-auto-locale \
  61. --with-dl \
  62. --with-pthreads \
  63. --without-expat \
  64. --without-libxml2 \
  65. --without-gnutls \
  66. --without-nettle \
  67. --with-openssl=$(STAGING_DIR)/usr \
  68. --enable-epoll \
  69. --with-maxfd=4096 \
  70. --disable-external-acl-helpers \
  71. --disable-auth-negotiate \
  72. --disable-auth-ntlm \
  73. --disable-auth-digest \
  74. --disable-auth-basic \
  75. --disable-arch-native \
  76. --with-krb5-config=no \
  77. --without-libcap \
  78. --without-netfilter-conntrack
  79. CONFIGURE_VARS += \
  80. ac_cv_header_linux_netfilter_ipv4_h=yes \
  81. ac_cv_epoll_works=yes \
  82. squid_cv_gnu_atomics=no
  83. define Build/Compile
  84. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
  85. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  86. DESTDIR="$(PKG_INSTALL_DIR)" \
  87. install
  88. endef
  89. define Package/squid/install
  90. $(INSTALL_DIR) $(1)/usr/sbin
  91. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
  92. $(INSTALL_DIR) $(1)/usr/lib/squid
  93. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/ssl_crtd $(1)/usr/lib/squid
  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))