remove incorrect host dependancy
[openwrt/svn-archive/archive.git] / net / squid / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8 #
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=squid
12 PKG_VERSION:=2.5.STABLE13
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v2/2.5/
18 PKG_MD5SUM:=3e64468e123be1246d17486dab6bee87
19 PKG_CAT:=bzcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/squid
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libopenssl
29 TITLE:=full-featured Web proxy cache
30 DESCRIPTION:=Squid is a high-performance proxy caching server for web clients, \\\
31 supporting FTP, gopher, and HTTP data objects. Unlike traditional \\\
32 caching software, Squid handles all requests in a single, \\\
33 non-blocking, I/O-driven process.
34 URL:=http://www.squid-cache.org
35 MENU:=1
36 endef
37
38 define Package/squid-mod-basic-auth-getpwnam
39 SECTION:=net
40 CATEGORY:=Network
41 DEPENDS:=squid
42 TITLE:=getpwnam basic authentication helper
43 endef
44
45 define Package/squid-mod-basic-auth-ncsa
46 SECTION:=net
47 CATEGORY:=Network
48 DEPENDS:=squid
49 TITLE:=NCSA basic authentication helper
50 endef
51
52 define Package/squid-mod-basic-auth-smb
53 SECTION:=net
54 CATEGORY:=Network
55 DEPENDS:=squid
56 TITLE:=Samba basic authentication helper
57 endef
58
59 define Package/squid-mod-basic-auth-winbind
60 SECTION:=net
61 CATEGORY:=Network
62 DEPENDS:=squid
63 TITLE:=Winbind basic authentication helper
64 endef
65
66 define Package/squid-mod-digest-auth-password
67 SECTION:=net
68 CATEGORY:=Network
69 DEPENDS:=squid
70 TITLE:=Password digest authentication helper
71 endef
72
73 define Package/squid-mod-external-acl-ip-user
74 SECTION:=net
75 CATEGORY:=Network
76 DEPENDS:=squid
77 TITLE:=IP user external ACL helper
78 endef
79
80 define Package/squid-mod-external-acl-unix-group
81 SECTION:=net
82 CATEGORY:=Network
83 DEPENDS:=squid
84 TITLE:=Unix group external ACL helper
85 endef
86
87 define Package/squid-mod-external-acl-winbind-group
88 SECTION:=net
89 CATEGORY:=Network
90 DEPENDS:=squid
91 TITLE:=Winbind group external ACL helper
92 endef
93
94 define Package/squid-mod-ntlm-auth-fakeauth
95 SECTION:=net
96 CATEGORY:=Network
97 DEPENDS:=squid
98 TITLE:=Fakeauth NTLM authentication helper
99 endef
100
101 define Package/squid-mod-ntlm-auth-smb-auth
102 SECTION:=net
103 CATEGORY:=Network
104 DEPENDS:=squid
105 TITLE:=Samba NTLM authentication helper
106 endef
107
108 define Package/squid-mod-ntlm-auth-winbind-auth
109 SECTION:=net
110 CATEGORY:=Network
111 DEPENDS:=squid
112 TITLE:=Winbind NTLM authentication helper
113 endef
114
115 define Build/Configure
116 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
117 $(TARGET_CONFIGURE_OPTS) \
118 CFLAGS="$(TARGET_CFLAGS)" \
119 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
120 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
121 ac_cv_sizeof_void_p=4 \
122 ac_cv_sizeof_short=2 \
123 ac_cv_sizeof_int=4 \
124 ac_cv_sizeof_long=4 \
125 ac_cv_sizeof_long_long=8 \
126 ac_cv_sizeof___int64=0 \
127 ac_cv_sizeof_int16_t=2 \
128 ac_cv_sizeof_uint16_t=2 \
129 ac_cv_sizeof_u_int16_t=2 \
130 ac_cv_sizeof_int32_t=4 \
131 ac_cv_sizeof_uint32_t=4 \
132 ac_cv_sizeof_u_int32_t=4 \
133 ac_cv_sizeof_int64_t=8 \
134 ac_cv_sizeof_uint64_t=8 \
135 ac_cv_sizeof_u_int64_t=8 \
136 ac_cv_func_setresuid=no \
137 ac_cv_func_va_copy=no \
138 ac_cv_func___va_copy=no \
139 ./configure \
140 --target=$(GNU_TARGET_NAME) \
141 --host=$(GNU_TARGET_NAME) \
142 --build=$(GNU_HOST_NAME) \
143 --program-prefix="" \
144 --program-suffix="" \
145 --prefix=/usr \
146 --exec-prefix=/usr \
147 --bindir=/usr/bin \
148 --datadir=/usr/share/squid \
149 --includedir=/usr/include \
150 --infodir=/usr/share/info \
151 --libdir=/usr/lib \
152 --libexecdir=/usr/lib/squid \
153 --localstatedir=/var \
154 --mandir=/usr/share/man \
155 --sbindir=/usr/sbin \
156 --sysconfdir=/etc/squid \
157 $(DISABLE_LARGEFILE) \
158 --enable-shared \
159 --enable-static \
160 --with-gnu-ld \
161 --enable-x-accelerator-vary \
162 --with-pthreads \
163 --with-dl \
164 --enable-icmp \
165 --enable-kill-parent-hack \
166 --enable-arp-acl \
167 --enable-ssl \
168 --enable-htcp \
169 --enable-err-languages=English \
170 --enable-default-err-language=English \
171 --enable-linux-netfilter \
172 --enable-icmp \
173 --enable-external-acl-helpers="" \
174 --enable-underscores \
175 --enable-cache-digests \
176 --enable-referer-log \
177 --enable-delay-pools \
178 --enable-useragent-log \
179 --with-openssl=$(STAGING_DIR)/usr \
180 --enable-auth="basic digest ntlm" \
181 --enable-basic-auth-helpers="getpwnam NCSA SMB winbind" \
182 --enable-ntlm-auth-helpers="fakeauth SMB winbind" \
183 --enable-digest-auth-helpers="password" \
184 --enable-external-acl-helpers="ip_user unix_group winbind_group" \
185 );
186 endef
187
188 define Build/Compile
189 rm -rf $(PKG_INSTALL_DIR)
190 mkdir -p $(PKG_INSTALL_DIR)
191 $(MAKE) -C $(PKG_BUILD_DIR) \
192 DESTDIR=$(PKG_INSTALL_DIR) \
193 all install
194 endef
195
196 define Package/squid/install
197 install -d -m0755 $(1)/etc/squid
198 $(CP) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/
199 $(CP) $(PKG_INSTALL_DIR)/etc/squid/squid.conf $(1)/etc/squid/
200 install -d -m0755 $(1)/usr/share/squid
201 $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/* $(1)/usr/share/squid/
202 install -d -m0755 $(1)/usr/sbin
203 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
204 endef
205
206 define BuildPlugin
207 define Package/$(1)/install
208 install -d -m0755 $$(1)/usr/lib/squid
209 $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/$(2) $$(1)/usr/lib/squid/
210 endef
211
212 $$(eval $$(call BuildPackage,$(1)))
213 endef
214
215 $(eval $(call BuildPackage,squid))
216 $(eval $(call BuildPlugin,squid-mod-basic-auth-getpwnam,getpwname_auth))
217 $(eval $(call BuildPlugin,squid-mod-basic-auth-ncsa,ncsa_auth))
218 $(eval $(call BuildPlugin,squid-mod-basic-auth-smb,smb_auth))
219 $(eval $(call BuildPlugin,squid-mod-basic-auth-winbind,wb_auth))
220 $(eval $(call BuildPlugin,squid-mod-digest-auth-password,digest_pw_auth))
221 $(eval $(call BuildPlugin,squid-mod-external-acl-ip-user,ip_user_check))
222 $(eval $(call BuildPlugin,squid-mod-external-acl-unix-group,squid_unix_group))
223 $(eval $(call BuildPlugin,squid-mod-external-acl-winbind-group,wb_group))
224 $(eval $(call BuildPlugin,squid-mod-ntlm-auth-fakeauth,fakeauth_auth))
225 $(eval $(call BuildPlugin,squid-mod-ntlm-auth-smb-auth,ntlm_auth))
226 $(eval $(call BuildPlugin,squid-mod-ntlm-auth-winbind-auth,wb_ntlmauth))