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