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.

136 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_MD5SUM:=50016bf6e2d3a3a186a6c7236d251f63
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_INSTALL:=1
  18. # uses libcom_err.la
  19. PKG_BUILD_DEP:=libext2fs
  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:=+libopenssl +libpthread +librt +libltdl +libstdcpp
  31. TITLE:=full-featured Web proxy cache
  32. endef
  33. define Package/squid/description
  34. Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more.
  35. It reduces bandwidth and improves response times by caching and reusing
  36. frequently-requested web pages.
  37. endef
  38. define Package/squid-mod-cachemgr
  39. $(call Package/squid/Default)
  40. DEPENDS:=squid
  41. TITLE:=Web based proxy manager and reporting tool
  42. endef
  43. CONFIGURE_ARGS += \
  44. --config-cache \
  45. --datadir=/usr/share/squid \
  46. --libexecdir=/usr/lib/squid \
  47. --sysconfdir=/etc/squid \
  48. --enable-shared \
  49. --disable-static \
  50. --enable-icmp \
  51. --enable-delay-pools \
  52. --enable-icap-client \
  53. --enable-kill-parent-hack \
  54. --disable-snmp \
  55. --enable-ssl \
  56. --enable-ssl-crtd \
  57. --enable-cache-digests \
  58. --enable-linux-netfilter \
  59. --disable-unlinkd \
  60. --enable-x-accelerator-vary \
  61. --disable-translation \
  62. --disable-auto-locale \
  63. --with-dl \
  64. --with-pthreads \
  65. --without-expat \
  66. --without-libxml2 \
  67. --without-gnutls \
  68. --without-nettle \
  69. --with-openssl=$(STAGING_DIR)/usr \
  70. --enable-epoll \
  71. --with-maxfd=4096 \
  72. --disable-external-acl-helpers \
  73. --disable-auth-negotiate \
  74. --disable-auth-ntlm \
  75. --disable-auth-digest \
  76. --disable-auth-basic \
  77. --disable-arch-native \
  78. --with-krb5-config=no \
  79. --without-libcap \
  80. --without-netfilter-conntrack
  81. CONFIGURE_VARS += \
  82. ac_cv_header_linux_netfilter_ipv4_h=yes \
  83. ac_cv_epoll_works=yes \
  84. squid_cv_gnu_atomics=no
  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)/usr/lib/squid
  95. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/ssl_crtd $(1)/usr/lib/squid
  96. $(INSTALL_DIR) $(1)/etc/config
  97. $(INSTALL_CONF) ./files/squid.config $(1)/etc/config/squid
  98. $(INSTALL_DIR) $(1)/etc/squid
  99. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/
  100. $(INSTALL_CONF) ./files/squid.conf $(1)/etc/squid/
  101. $(INSTALL_DIR) $(1)/etc/init.d/
  102. $(INSTALL_BIN) ./files/squid.init $(1)/etc/init.d/squid
  103. $(INSTALL_DIR) $(1)/usr/share/squid/icons/
  104. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/icons/* $(1)/usr/share/squid/icons/
  105. $(INSTALL_DIR) $(1)/usr/share/squid/errors/templates/
  106. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/errors/templates/* $(1)/usr/share/squid/errors/templates/
  107. endef
  108. define Package/squid-mod-cachemgr/install
  109. $(INSTALL_DIR) $(1)/www/cgi-bin/
  110. $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/
  111. endef
  112. $(eval $(call BuildPackage,squid))
  113. $(eval $(call BuildPackage,squid-mod-cachemgr))