2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
12 PKG_VERSION
:=2.6.STABLE14
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=http
://www.squid-cache.org
/Versions
/v2
/2.6/
17 PKG_MD5SUM
:=eadb138d48320df8b99349121159c6bf
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/squid
/Default
28 URL
:=http
://www.squid-cache.org
/
32 $(call Package
/squid
/Default
)
34 DEPENDS
:=+libopenssl
+libpthread
35 TITLE
:=full-featured Web proxy cache
37 Squid is a high-performance proxy caching server for web clients
, \\\
38 supporting FTP
, gopher
, and HTTP data objects. Unlike traditional
\\\
39 caching software
, Squid handles
all requests in a single
, \\\
40 non-blocking
, I
/O-driven process.
43 define Package
/squid
/conffiles
48 define Package
/squid-mod-cachemgr
49 $(call Package
/squid
/Default
)
51 TITLE
:=Web based proxy manager and reporting tool
54 define Package
/squid-mod-basic-auth-getpwnam
55 $(call Package
/squid
/Default
)
57 TITLE
:=getpwnam basic authentication helper
60 define Package
/squid-mod-basic-auth-ncsa
61 $(call Package
/squid
/Default
)
63 TITLE
:=NCSA basic authentication helper
66 define Package
/squid-mod-basic-auth-smb
67 $(call Package
/squid
/Default
)
69 TITLE
:=Samba basic authentication helper
72 define Package
/squid-mod-digest-auth-password
73 $(call Package
/squid
/Default
)
75 TITLE
:=Password digest authentication helper
78 define Package
/squid-mod-external-acl-ip-user
79 $(call Package
/squid
/Default
)
81 TITLE
:=IP user external ACL helper
84 define Package
/squid-mod-external-acl-unix-group
85 $(call Package
/squid
/Default
)
87 TITLE
:=Unix group external ACL helper
90 define Package
/squid-mod-ntlm-auth-fakeauth
91 $(call Package
/squid
/Default
)
93 TITLE
:=Fakeauth NTLM authentication helper
96 define Package
/squid-mod-ntlm-auth-smb-auth
97 $(call Package
/squid
/Default
)
99 TITLE
:=Samba NTLM authentication helper
102 define Build
/Configure
103 $(call Build
/Configure
/Default
, \
104 --datadir=/usr
/share
/squid \
105 --libexecdir
=/usr
/lib
/squid \
106 --sysconfdir
=/etc
/squid \
109 --enable-x-accelerator-vary \
113 --enable-kill-parent-hack \
117 --enable-err-languages
=English \
118 --enable-default-err-language
=English \
119 --enable-linux-netfilter \
121 --enable-external-acl-helpers
="" \
122 --enable-underscores \
123 --enable-cache-digests \
124 --enable-referer-log \
125 --enable-delay-pools \
126 --enable-useragent-log \
127 --with-openssl
=$(STAGING_DIR
)/usr \
128 --enable-auth
="basic digest ntlm" \
129 --enable-basic-auth-helpers
="getpwnam NCSA SMB" \
130 --enable-ntlm-auth-helpers
="fakeauth SMB" \
131 --enable-digest-auth-helpers
="password" \
132 --enable-external-acl-helpers
="ip_user unix_group" \
139 # pass INCLUDES to compile host sources against our OpenSSL, not the host one
140 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lib \
141 INCLUDES
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
143 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
144 DESTDIR
="$(PKG_INSTALL_DIR)" \
149 define Package
/$(1)/install
150 $(INSTALL_DIR
) $$(1)/usr
/lib
/squid
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/$(2) $$(1)/usr
/lib
/squid
/
154 $$(eval
$$(call BuildPackage
,$(1)))
157 define Package
/squid
/install
158 $(INSTALL_DIR
) $(1)/etc
/squid
159 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/mime.conf
$(1)/etc
/squid
/
160 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/squid.conf
$(1)/etc
/squid
/
161 $(INSTALL_DIR
) $(1)/usr
/share
/squid
162 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/squid
/* $(1)/usr
/share
/squid
/
163 $(INSTALL_DIR
) $(1)/usr
/sbin
164 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/squid
$(1)/usr
/sbin
/
165 $(INSTALL_DIR
) $(1)/usr
/lib
/squid
166 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/{unlinkd
,pinger
} $(1)/usr
/lib
/squid
/
169 define Package
/squid-mod-cachemgr
/install
170 $(INSTALL_DIR
) $(1)/www
/cgi-bin
/
171 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/cachemgr.cgi
$(1)/www
/cgi-bin
/
174 $(eval
$(call BuildPackage
,squid
))
175 $(eval
$(call BuildPackage
,squid-mod-cachemgr
))
176 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-getpwnam
,getpwname_auth
))
177 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-ncsa
,ncsa_auth
))
178 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-smb
,smb_auth
))
179 $(eval
$(call BuildPlugin
,squid-mod-digest-auth-password
,digest_pw_auth
))
180 $(eval
$(call BuildPlugin
,squid-mod-external-acl-ip-user
,ip_user_check
))
181 $(eval
$(call BuildPlugin
,squid-mod-external-acl-unix-group
,squid_unix_group
))
182 $(eval
$(call BuildPlugin
,squid-mod-ntlm-auth-fakeauth
,fakeauth_auth
))
183 $(eval
$(call BuildPlugin
,squid-mod-ntlm-auth-smb-auth
,ntlm_auth
))
185 $(eval
$(call RequireHeader
,/usr
/include/openssl
/ssl.h
, \
186 $(PKG_NAME
) requires the openssl development
(named like libssl-dev
, \
187 depending of your package manager
) package be installed on the host-system. \