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.6 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.27
  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/v3/3.5/ \
  15. http://www2.pl.squid-cache.org/Versions/v3/3.5/ \
  16. http://www.squid-cache.org/Versions/v3/3.5/
  17. PKG_HASH:=5ddb4367f2dc635921f9ca7a59d8b87edb0412fa203d1543393ac3c7f9fef0ec
  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. MENU:=1
  27. endef
  28. define Package/squid
  29. $(call Package/squid/Default)
  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-mit-krb5 \
  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. squid_cv_gnu_atomics=no
  86. define Build/Compile
  87. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
  88. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  89. DESTDIR="$(PKG_INSTALL_DIR)" \
  90. install
  91. endef
  92. define Package/squid/install
  93. $(INSTALL_DIR) $(1)/usr/sbin
  94. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
  95. $(INSTALL_DIR) $(1)/usr/lib/squid
  96. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/ssl_crtd $(1)/usr/lib/squid
  97. $(INSTALL_DIR) $(1)/etc/config
  98. $(INSTALL_CONF) ./files/squid.config $(1)/etc/config/squid
  99. $(INSTALL_DIR) $(1)/etc/squid
  100. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/
  101. $(INSTALL_CONF) ./files/squid.conf $(1)/etc/squid/
  102. $(INSTALL_DIR) $(1)/etc/init.d/
  103. $(INSTALL_BIN) ./files/squid.init $(1)/etc/init.d/squid
  104. $(INSTALL_DIR) $(1)/usr/share/squid/icons/
  105. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/icons/* $(1)/usr/share/squid/icons/
  106. $(INSTALL_DIR) $(1)/usr/share/squid/errors/templates/
  107. $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/errors/templates/* $(1)/usr/share/squid/errors/templates/
  108. endef
  109. define Package/squid-mod-cachemgr/install
  110. $(INSTALL_DIR) $(1)/www/cgi-bin/
  111. $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/
  112. endef
  113. $(eval $(call BuildPackage,squid))
  114. $(eval $(call BuildPackage,squid-mod-cachemgr))