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
38 define Package
/squid
/description
39 Squid is a high-performance proxy caching server for web clients
,
40 supporting FTP
, gopher
, and HTTP data objects. Unlike traditional
41 caching software
, Squid handles
all requests in a single
,
42 non-blocking
, I
/O-driven process.
45 define Package
/squid
/conffiles
50 define Package
/squid-mod-cachemgr
51 $(call Package
/squid
/Default
)
53 TITLE
:=Web based proxy manager and reporting tool
56 define Package
/squid-mod-basic-auth-getpwnam
57 $(call Package
/squid
/Default
)
59 TITLE
:=getpwnam basic authentication helper
62 define Package
/squid-mod-basic-auth-ncsa
63 $(call Package
/squid
/Default
)
65 TITLE
:=NCSA basic authentication helper
68 define Package
/squid-mod-basic-auth-smb
69 $(call Package
/squid
/Default
)
71 TITLE
:=Samba basic authentication helper
74 define Package
/squid-mod-digest-auth-password
75 $(call Package
/squid
/Default
)
77 TITLE
:=Password digest authentication helper
80 define Package
/squid-mod-external-acl-ip-user
81 $(call Package
/squid
/Default
)
83 TITLE
:=IP user external ACL helper
86 define Package
/squid-mod-external-acl-unix-group
87 $(call Package
/squid
/Default
)
89 TITLE
:=Unix group external ACL helper
92 define Package
/squid-mod-ntlm-auth-fakeauth
93 $(call Package
/squid
/Default
)
95 TITLE
:=Fakeauth NTLM authentication helper
98 define Package
/squid-mod-ntlm-auth-smb-auth
99 $(call Package
/squid
/Default
)
101 TITLE
:=Samba NTLM authentication helper
104 define Build
/Configure
105 $(call Build
/Configure
/Default
, \
106 --datadir=/usr
/share
/squid \
107 --libexecdir
=/usr
/lib
/squid \
108 --sysconfdir
=/etc
/squid \
111 --enable-x-accelerator-vary \
115 --enable-kill-parent-hack \
119 --enable-err-languages
=English \
120 --enable-default-err-language
=English \
121 --enable-linux-netfilter \
123 --enable-external-acl-helpers
="" \
124 --enable-underscores \
125 --enable-cache-digests \
126 --enable-referer-log \
127 --enable-delay-pools \
128 --enable-useragent-log \
129 --with-openssl
=$(STAGING_DIR
)/usr \
130 --enable-auth
="basic digest ntlm" \
131 --enable-basic-auth-helpers
="getpwnam NCSA SMB" \
132 --enable-ntlm-auth-helpers
="fakeauth SMB" \
133 --enable-digest-auth-helpers
="password" \
134 --enable-external-acl-helpers
="ip_user unix_group" \
141 # pass INCLUDES to compile host sources against our OpenSSL, not the host one
142 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lib \
143 INCLUDES
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
145 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
146 DESTDIR
="$(PKG_INSTALL_DIR)" \
151 define Package
/$(1)/install
152 $(INSTALL_DIR
) $$(1)/usr
/lib
/squid
153 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/$(2) $$(1)/usr
/lib
/squid
/
156 $$(eval
$$(call BuildPackage
,$(1)))
159 define Package
/squid
/install
160 $(INSTALL_DIR
) $(1)/etc
/squid
161 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/mime.conf
$(1)/etc
/squid
/
162 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/squid.conf
$(1)/etc
/squid
/
163 $(INSTALL_DIR
) $(1)/usr
/share
/squid
164 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/squid
/* $(1)/usr
/share
/squid
/
165 $(INSTALL_DIR
) $(1)/usr
/sbin
166 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/squid
$(1)/usr
/sbin
/
167 $(INSTALL_DIR
) $(1)/usr
/lib
/squid
168 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/{unlinkd
,pinger
} $(1)/usr
/lib
/squid
/
171 define Package
/squid-mod-cachemgr
/install
172 $(INSTALL_DIR
) $(1)/www
/cgi-bin
/
173 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/cachemgr.cgi
$(1)/www
/cgi-bin
/
176 $(eval
$(call BuildPackage
,squid
))
177 $(eval
$(call BuildPackage
,squid-mod-cachemgr
))
178 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-getpwnam
,getpwname_auth
))
179 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-ncsa
,ncsa_auth
))
180 $(eval
$(call BuildPlugin
,squid-mod-basic-auth-smb
,smb_auth
))
181 $(eval
$(call BuildPlugin
,squid-mod-digest-auth-password
,digest_pw_auth
))
182 $(eval
$(call BuildPlugin
,squid-mod-external-acl-ip-user
,ip_user_check
))
183 $(eval
$(call BuildPlugin
,squid-mod-external-acl-unix-group
,squid_unix_group
))
184 $(eval
$(call BuildPlugin
,squid-mod-ntlm-auth-fakeauth
,fakeauth_auth
))
185 $(eval
$(call BuildPlugin
,squid-mod-ntlm-auth-smb-auth
,ntlm_auth
))
187 $(eval
$(call RequireHeader
,/usr
/include/openssl
/ssl.h
, \
188 $(PKG_NAME
) requires the openssl development
(named like libssl-dev
, \
189 depending of your package manager
) package be installed on the host-system. \