DESCRIPTION:= is obselete
[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.6.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.6/
17 PKG_MD5SUM:=eadb138d48320df8b99349121159c6bf
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 endef
37
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.
43 endef
44
45 define Package/squid/conffiles
46 /etc/squid/mime.conf
47 /etc/squid/squid.conf
48 endef
49
50 define Package/squid-mod-cachemgr
51 $(call Package/squid/Default)
52 DEPENDS:=squid
53 TITLE:=Web based proxy manager and reporting tool
54 endef
55
56 define Package/squid-mod-basic-auth-getpwnam
57 $(call Package/squid/Default)
58 DEPENDS:=squid
59 TITLE:=getpwnam basic authentication helper
60 endef
61
62 define Package/squid-mod-basic-auth-ncsa
63 $(call Package/squid/Default)
64 DEPENDS:=squid
65 TITLE:=NCSA basic authentication helper
66 endef
67
68 define Package/squid-mod-basic-auth-smb
69 $(call Package/squid/Default)
70 DEPENDS:=squid
71 TITLE:=Samba basic authentication helper
72 endef
73
74 define Package/squid-mod-digest-auth-password
75 $(call Package/squid/Default)
76 DEPENDS:=squid
77 TITLE:=Password digest authentication helper
78 endef
79
80 define Package/squid-mod-external-acl-ip-user
81 $(call Package/squid/Default)
82 DEPENDS:=squid
83 TITLE:=IP user external ACL helper
84 endef
85
86 define Package/squid-mod-external-acl-unix-group
87 $(call Package/squid/Default)
88 DEPENDS:=squid
89 TITLE:=Unix group external ACL helper
90 endef
91
92 define Package/squid-mod-ntlm-auth-fakeauth
93 $(call Package/squid/Default)
94 DEPENDS:=squid
95 TITLE:=Fakeauth NTLM authentication helper
96 endef
97
98 define Package/squid-mod-ntlm-auth-smb-auth
99 $(call Package/squid/Default)
100 DEPENDS:=squid
101 TITLE:=Samba NTLM authentication helper
102 endef
103
104 define Build/Configure
105 $(call Build/Configure/Default, \
106 --datadir=/usr/share/squid \
107 --libexecdir=/usr/lib/squid \
108 --sysconfdir=/etc/squid \
109 --enable-shared \
110 --enable-static \
111 --enable-x-accelerator-vary \
112 --with-pthreads \
113 --with-dl \
114 --enable-icmp \
115 --enable-kill-parent-hack \
116 --enable-arp-acl \
117 --enable-ssl \
118 --enable-htcp \
119 --enable-err-languages=English \
120 --enable-default-err-language=English \
121 --enable-linux-netfilter \
122 --enable-icmp \
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" \
135 --enable-epoll \
136 --with-maxfd=4096 \
137 )
138 endef
139
140 define Build/Compile
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" \
144 all
145 $(MAKE) -C $(PKG_BUILD_DIR) \
146 DESTDIR="$(PKG_INSTALL_DIR)" \
147 all install
148 endef
149
150 define BuildPlugin
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/
154 endef
155
156 $$(eval $$(call BuildPackage,$(1)))
157 endef
158
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/
169 endef
170
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/
174 endef
175
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))
186
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. \
190 ))