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
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/squid
/Default
27 URL
:=http
://www.squid-cache.org
/
31 $(call Package
/squid
/Default
)
33 DEPENDS
:=+libopenssl
+libpthread
34 TITLE
:=full-featured Web proxy cache
37 define Package
/squid
/description
38 Squid is a high-performance proxy caching server for web clients
,
39 supporting FTP
, gopher
, and HTTP data objects. Unlike traditional
40 caching software
, Squid handles
all requests in a single
,
41 non-blocking
, I
/O-driven process.
44 define Package
/squid
/conffiles
49 define Package
/squid-mod-cachemgr
50 $(call Package
/squid
/Default
)
52 TITLE
:=Web based proxy manager and reporting tool
55 define Package
/squid-mod-basic-auth-getpwnam
56 $(call Package
/squid
/Default
)
58 TITLE
:=getpwnam basic authentication helper
61 define Package
/squid-mod-basic-auth-ncsa
62 $(call Package
/squid
/Default
)
64 TITLE
:=NCSA basic authentication helper
67 define Package
/squid-mod-basic-auth-smb
68 $(call Package
/squid
/Default
)
70 TITLE
:=Samba basic authentication helper
73 define Package
/squid-mod-digest-auth-password
74 $(call Package
/squid
/Default
)
76 TITLE
:=Password digest authentication helper
79 define Package
/squid-mod-external-acl-ip-user
80 $(call Package
/squid
/Default
)
82 TITLE
:=IP user external ACL helper
85 define Package
/squid-mod-external-acl-unix-group
86 $(call Package
/squid
/Default
)
88 TITLE
:=Unix group external ACL helper
91 define Package
/squid-mod-ntlm-auth-fakeauth
92 $(call Package
/squid
/Default
)
94 TITLE
:=Fakeauth NTLM authentication helper
97 define Package
/squid-mod-ntlm-auth-smb-auth
98 $(call Package
/squid
/Default
)
100 TITLE
:=Samba NTLM authentication helper
103 define Build
/Configure
104 $(call Build
/Configure
/Default
, \
105 --datadir=/usr
/share
/squid \
106 --libexecdir
=/usr
/lib
/squid \
107 --sysconfdir
=/etc
/squid \
110 --enable-x-accelerator-vary \
114 --enable-kill-parent-hack \
118 --enable-err-languages
=English \
119 --enable-default-err-language
=English \
120 --enable-linux-netfilter \
122 --enable-external-acl-helpers
="" \
123 --enable-underscores \
124 --enable-cache-digests \
125 --enable-referer-log \
126 --enable-delay-pools \
127 --enable-useragent-log \
128 --with-openssl
=$(STAGING_DIR
)/usr \
129 --enable-auth
="basic digest ntlm" \
130 --enable-basic-auth-helpers
="getpwnam NCSA SMB" \
131 --enable-ntlm-auth-helpers
="fakeauth SMB" \
132 --enable-digest-auth-helpers
="password" \
133 --enable-external-acl-helpers
="ip_user unix_group" \
140 # pass INCLUDES to compile host sources against our OpenSSL, not the host one
141 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lib \
142 INCLUDES
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
144 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
145 DESTDIR
="$(PKG_INSTALL_DIR)" \
150 define Package
/$(1)/install
151 $(INSTALL_DIR
) $$(1)/usr
/lib
/squid
152 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/$(2) $$(1)/usr
/lib
/squid
/
155 $$(eval
$$(call BuildPackage
,$(1)))
158 define Package
/squid
/install
159 $(INSTALL_DIR
) $(1)/etc
/squid
160 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/mime.conf
$(1)/etc
/squid
/
161 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/squid.conf
$(1)/etc
/squid
/
162 $(INSTALL_DIR
) $(1)/usr
/share
/squid
163 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/squid
/* $(1)/usr
/share
/squid
/
164 $(INSTALL_DIR
) $(1)/usr
/sbin
165 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/squid
$(1)/usr
/sbin
/
166 $(INSTALL_DIR
) $(1)/usr
/lib
/squid
167 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/{unlinkd
,pinger
} $(1)/usr
/lib
/squid
/
170 define Package
/squid-mod-cachemgr
/install
171 $(INSTALL_DIR
) $(1)/www
/cgi-bin
/
172 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/cachemgr.cgi
$(1)/www
/cgi-bin
/
175 $(eval
$(call BuildPackage
,squid
))
176 $(eval
$(call BuildPackage
,squid-mod-cachemgr
))
177 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-getpwnam
,getpwname_auth
))
178 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-ncsa
,ncsa_auth
))
179 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-smb
,smb_auth
))
180 $(eval
$(call BuildPlugin
,squid-mod-digest-auth-password
,digest_pw_auth
))
181 $(eval
$(call BuildPlugin
,squid-mod-external-acl-ip-user
,ip_user_check
))
182 $(eval
$(call BuildPlugin
,squid-mod-external-acl-unix-group
,squid_unix_group
))
183 $(eval
$(call BuildPlugin
,squid-mod-ntlm-auth-fakeauth
,fakeauth_auth
))
184 $(eval
$(call BuildPlugin
,squid-mod-ntlm-auth-smb-auth
,ntlm_auth
))
186 $(eval
$(call RequireHeader
,/usr
/include/openssl
/ssl.h
, \
187 $(PKG_NAME
) requires the openssl development
(named like libssl-dev
, \
188 depending of your package manager
) package be installed on the host-system. \