update axtls to 1.1.4, rename awhttpd to axhttpd, (un)install dev files
[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.STABLE14
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v2/2.5/
17 PKG_MD5SUM:=f413e0b887a5f9b2a75350243ed5564c
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/squid/Default
26 SECTION:=net
27 CATEGORY:=Network
28 URL:=http://www.squid-cache.org/
29 endef
30
31 define Package/squid
32 $(call Package/squid/Default)
33 MENU:=1
34 DEPENDS:=+libopenssl +libpthread
35 TITLE:=full-featured Web proxy cache
36 DESCRIPTION:=\
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.
41 endef
42
43 define Package/squid/conffiles
44 /etc/squid/mime.conf
45 /etc/squid/squid.conf
46 endef
47
48 define Package/squid-mod-cachemgr
49 $(call Package/squid/Default)
50 DEPENDS:=squid
51 TITLE:=Web based proxy manager and reporting tool
52 endef
53
54 define Package/squid-mod-basic-auth-getpwnam
55 $(call Package/squid/Default)
56 DEPENDS:=squid
57 TITLE:=getpwnam basic authentication helper
58 endef
59
60 define Package/squid-mod-basic-auth-ncsa
61 $(call Package/squid/Default)
62 DEPENDS:=squid
63 TITLE:=NCSA basic authentication helper
64 endef
65
66 define Package/squid-mod-basic-auth-smb
67 $(call Package/squid/Default)
68 DEPENDS:=squid
69 TITLE:=Samba basic authentication helper
70 endef
71
72 define Package/squid-mod-basic-auth-winbind
73 $(call Package/squid/Default)
74 DEPENDS:=squid
75 TITLE:=Winbind basic authentication helper
76 endef
77
78 define Package/squid-mod-digest-auth-password
79 $(call Package/squid/Default)
80 DEPENDS:=squid
81 TITLE:=Password digest authentication helper
82 endef
83
84 define Package/squid-mod-external-acl-ip-user
85 $(call Package/squid/Default)
86 DEPENDS:=squid
87 TITLE:=IP user external ACL helper
88 endef
89
90 define Package/squid-mod-external-acl-unix-group
91 $(call Package/squid/Default)
92 DEPENDS:=squid
93 TITLE:=Unix group external ACL helper
94 endef
95
96 define Package/squid-mod-external-acl-winbind-group
97 $(call Package/squid/Default)
98 DEPENDS:=squid
99 TITLE:=Winbind group external ACL helper
100 endef
101
102 define Package/squid-mod-ntlm-auth-fakeauth
103 $(call Package/squid/Default)
104 DEPENDS:=squid
105 TITLE:=Fakeauth NTLM authentication helper
106 endef
107
108 define Package/squid-mod-ntlm-auth-smb-auth
109 $(call Package/squid/Default)
110 DEPENDS:=squid
111 TITLE:=Samba NTLM authentication helper
112 endef
113
114 define Package/squid-mod-ntlm-auth-winbind-auth
115 $(call Package/squid/Default)
116 DEPENDS:=squid
117 TITLE:=Winbind NTLM authentication helper
118 endef
119
120 define Build/Configure
121 $(call Build/Configure/Default, \
122 --datadir=/usr/share/squid \
123 --libexecdir=/usr/lib/squid \
124 --sysconfdir=/etc/squid \
125 --enable-shared \
126 --enable-static \
127 --enable-x-accelerator-vary \
128 --with-pthreads \
129 --with-dl \
130 --enable-icmp \
131 --enable-kill-parent-hack \
132 --enable-arp-acl \
133 --enable-ssl \
134 --enable-htcp \
135 --enable-err-languages=English \
136 --enable-default-err-language=English \
137 --enable-linux-netfilter \
138 --enable-icmp \
139 --enable-external-acl-helpers="" \
140 --enable-underscores \
141 --enable-cache-digests \
142 --enable-referer-log \
143 --enable-delay-pools \
144 --enable-useragent-log \
145 --with-openssl=$(STAGING_DIR)/usr \
146 --enable-auth="basic digest ntlm" \
147 --enable-basic-auth-helpers="getpwnam NCSA SMB winbind" \
148 --enable-ntlm-auth-helpers="fakeauth SMB winbind" \
149 --enable-digest-auth-helpers="password" \
150 --enable-external-acl-helpers="ip_user unix_group winbind_group" \
151 )
152 endef
153
154 define Build/Compile
155 # pass INCLUDES to compile host sources against our OpenSSL, not the host one
156 $(MAKE) -C $(PKG_BUILD_DIR)/lib \
157 INCLUDES="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
158 all
159 $(MAKE) -C $(PKG_BUILD_DIR) \
160 DESTDIR="$(PKG_INSTALL_DIR)" \
161 all install
162 endef
163
164 define BuildPlugin
165 define Package/$(1)/install
166 $(INSTALL_DIR) $$(1)/usr/lib/squid
167 $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/$(2) $$(1)/usr/lib/squid/
168 endef
169
170 $$(eval $$(call BuildPackage,$(1)))
171 endef
172
173 define Package/squid/install
174 $(INSTALL_DIR) $(1)/etc/squid
175 $(CP) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/
176 $(CP) $(PKG_INSTALL_DIR)/etc/squid/squid.conf $(1)/etc/squid/
177 $(INSTALL_DIR) $(1)/usr/share/squid
178 $(CP) $(PKG_INSTALL_DIR)/usr/share/squid/* $(1)/usr/share/squid/
179 $(INSTALL_DIR) $(1)/usr/sbin
180 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
181 $(INSTALL_DIR) $(1)/usr/lib/squid
182 $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/{unlinkd,pinger} $(1)/usr/lib/squid/
183 endef
184
185 define Package/squid-mod-cachemgr/install
186 $(INSTALL_DIR) $(1)/www/cgi-bin/
187 $(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/
188 endef
189
190 $(eval $(call BuildPackage,squid))
191 $(eval $(call BuildPackage,squid-mod-cachemgr))
192 $(eval $(call BuildPlugin,squid-mod-basic-auth-getpwnam,getpwname_auth))
193 $(eval $(call BuildPlugin,squid-mod-basic-auth-ncsa,ncsa_auth))
194 $(eval $(call BuildPlugin,squid-mod-basic-auth-smb,smb_auth))
195 $(eval $(call BuildPlugin,squid-mod-basic-auth-winbind,wb_auth))
196 $(eval $(call BuildPlugin,squid-mod-digest-auth-password,digest_pw_auth))
197 $(eval $(call BuildPlugin,squid-mod-external-acl-ip-user,ip_user_check))
198 $(eval $(call BuildPlugin,squid-mod-external-acl-unix-group,squid_unix_group))
199 $(eval $(call BuildPlugin,squid-mod-external-acl-winbind-group,wb_group))
200 $(eval $(call BuildPlugin,squid-mod-ntlm-auth-fakeauth,fakeauth_auth))
201 $(eval $(call BuildPlugin,squid-mod-ntlm-auth-smb-auth,ntlm_auth))
202 $(eval $(call BuildPlugin,squid-mod-ntlm-auth-winbind-auth,wb_ntlmauth))