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.

134 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.12
  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_HASH:=8bc83f3869f7404aefb10883109e28443255cf6dde50a13904c7954619707a42
  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-mit-krb5 \
  78. --without-libcap \
  79. --without-netfilter-conntrack
  80. CONFIGURE_VARS += \
  81. ac_cv_header_linux_netfilter_ipv4_h=yes \
  82. ac_cv_epoll_works=yes \
  83. squid_cv_gnu_atomics=no
  84. define Build/Compile
  85. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
  86. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  87. DESTDIR="$(PKG_INSTALL_DIR)" \
  88. install
  89. endef
  90. define Package/squid/install
  91. $(INSTALL_DIR) $(1)/usr/sbin
  92. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
  93. $(INSTALL_DIR) $(1)/usr/lib/squid
  94. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/ssl_crtd $(1)/usr/lib/squid
  95. $(INSTALL_DIR) $(1)/etc/config
  96. $(INSTALL_CONF) ./files/squid.config $(1)/etc/config/squid
  97. $(INSTALL_DIR) $(1)/etc/squid
  98. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/
  99. $(INSTALL_CONF) ./files/squid.conf $(1)/etc/squid/
  100. $(INSTALL_DIR) $(1)/etc/init.d/
  101. $(INSTALL_BIN) ./files/squid.init $(1)/etc/init.d/squid
  102. $(INSTALL_DIR) $(1)/usr/share/squid/icons/
  103. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/icons/* $(1)/usr/share/squid/icons/
  104. $(INSTALL_DIR) $(1)/usr/share/squid/errors/templates/
  105. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/errors/templates/* $(1)/usr/share/squid/errors/templates/
  106. endef
  107. define Package/squid-mod-cachemgr/install
  108. $(INSTALL_DIR) $(1)/www/cgi-bin/
  109. $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/
  110. endef
  111. $(eval $(call BuildPackage,squid))
  112. $(eval $(call BuildPackage,squid-mod-cachemgr))