3 include $(TOPDIR
)/rules.mk
6 PKG_VERSION
:=2.5.STABLE13
8 PKG_MD5SUM
:=3e64468e123be1246d17486dab6bee87
10 PKG_SOURCE_URL
:=http
://www.squid-cache.org
/Versions
/v2
/2.5/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
12 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
14 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
16 AUTH_MODULES
:=basic digest ntlm
17 ifneq ($(BR2_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM
),)
18 BASIC_AUTH_HELPERS
+= getpwnam
20 ifneq ($(BR2_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA
),)
21 BASIC_AUTH_HELPERS
+= NCSA
23 ifneq ($(BR2_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB
),)
24 BASIC_AUTH_HELPERS
+= SMB
26 ifneq ($(BR2_PACKAGE_SQUID_MOD_BASIC_AUTH_WINBIND
),)
27 BASIC_AUTH_HELPERS
+= winbind
30 ifneq ($(BR2_PACKAGE_SQUID_MOD_DIGEST_AUTH_PASSWORD
),)
31 DIGEST_AUTH_HELPERS
:=password
34 ifneq ($(BR2_PACKAGE_SQUID_MOD_EXTERNAL_ACL_IP_USER
),)
35 EXTERNAL_ACL_HELPERS
+= ip_user
37 ifneq ($(BR2_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
),)
38 EXTERNAL_ACL_HELPERS
+= unix_group
40 ifneq ($(BR2_PACKAGE_SQUID_MOD_EXTERNAL_ACL_WINBIND_GROUP
),)
41 EXTERNAL_ACL_HELPERS
+= winbind_group
44 ifneq ($(BR2_PACKAGE_SQUID_MOD_NTLM_AUTH_FAKEAUTH
),)
45 NTLM_AUTH_HELPERS
+= fakeauth
47 ifneq ($(BR2_PACKAGE_SQUID_MOD_NTLM_AUTH_SMB_AUTH
),)
48 NTLM_AUTH_HELPERS
+= SMB
50 ifneq ($(BR2_PACKAGE_SQUID_MOD_NTLM_AUTH_WINBIND_AUTH
),)
51 NTLM_AUTH_HELPERS
+= winbind
54 include $(TOPDIR
)/package
/rules.mk
56 define PKG_mod_template
59 install -d
-m0755
$$(IDIR_
$(1))/usr
/lib
/squid
60 if
[ -e
$(PKG_INSTALL_DIR
)/usr
/lib
/squid
/$(2) ]; then \
61 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/$(2) $$(IDIR_
$(1))/usr
/lib
/squid
/ ; \
63 $(RSTRIP
) $$(IDIR_
$(1))
64 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
69 $(eval
$(call PKG_template
,SQUID
,$(PKG_NAME
),$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
70 $(eval
$(call PKG_template
,SQUID_MOD_BASIC_AUTH_GETPWNAM
,$(PKG_NAME
)-mod-basic-auth-getpwnam
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
71 $(eval
$(call PKG_template
,SQUID_MOD_BASIC_AUTH_NCSA
,$(PKG_NAME
)-mod-basic-auth-ncsa
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
72 $(eval
$(call PKG_template
,SQUID_MOD_BASIC_AUTH_SMB
,$(PKG_NAME
)-mod-basic-auth-smb
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
73 $(eval
$(call PKG_template
,SQUID_MOD_BASIC_AUTH_WINBIND
,$(PKG_NAME
)-mod-basic-auth-winbind
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
74 $(eval
$(call PKG_template
,SQUID_MOD_DIGEST_AUTH_PASSWORD
,$(PKG_NAME
)-mod-digest-auth-password
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
75 $(eval
$(call PKG_template
,SQUID_MOD_EXTERNAL_ACL_IP_USER
,$(PKG_NAME
)-mod-external-acl-ip-user
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
76 $(eval
$(call PKG_template
,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
,$(PKG_NAME
)-mod-external-acl-unix-group
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
77 $(eval
$(call PKG_template
,SQUID_MOD_EXTERNAL_ACL_WINBIND_GROUP
,$(PKG_NAME
)-mod-external-acl-winbind-group
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
78 $(eval
$(call PKG_template
,SQUID_MOD_NTLM_AUTH_FAKEAUTH
,$(PKG_NAME
)-mod-ntlm-auth-fakeauth
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
79 $(eval
$(call PKG_template
,SQUID_MOD_NTLM_AUTH_SMB_AUTH
,$(PKG_NAME
)-mod-ntlm-auth-smb-auth
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
80 $(eval
$(call PKG_template
,SQUID_MOD_NTLM_AUTH_WINBIND_AUTH
,$(PKG_NAME
)-mod-ntlm-auth-winbind-auth
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
82 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_GETPWNAM
,getpwname_auth
))
83 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_LDAP
,ldap
))
84 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_NCSA
,ncsa_auth
))
85 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_SMB
,smb_auth
))
86 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_WINBIND
,wb_auth
))
87 $(eval
$(call PKG_mod_template
,SQUID_MOD_DIGEST_AUTH_PASSWORD
,digest_pw_auth
))
88 $(eval
$(call PKG_mod_template
,SQUID_MOD_EXTERNAL_ACL_IP_USER
,ip_user_check
))
89 $(eval
$(call PKG_mod_template
,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP
,ldap_auth
))
90 $(eval
$(call PKG_mod_template
,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
,squid_unix_group
))
91 $(eval
$(call PKG_mod_template
,SQUID_MOD_EXTERNAL_ACL_WINBIND_GROUP
,wb_group
))
92 $(eval
$(call PKG_mod_template
,SQUID_MOD_NTLM_AUTH_FAKEAUTH
,fakeauth_auth
))
93 $(eval
$(call PKG_mod_template
,SQUID_MOD_NTLM_AUTH_SMB_AUTH
,ntlm_auth
))
94 $(eval
$(call PKG_mod_template
,SQUID_MOD_NTLM_AUTH_WINBIND_AUTH
,wb_ntlmauth
))
96 $(PKG_BUILD_DIR
)/.configured
:
97 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
98 $(TARGET_CONFIGURE_OPTS
) \
99 CFLAGS
="$(TARGET_CFLAGS)" \
100 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
101 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
102 ac_cv_sizeof_void_p
=4 \
103 ac_cv_sizeof_short
=2 \
105 ac_cv_sizeof_long
=4 \
106 ac_cv_sizeof_long_long
=8 \
107 ac_cv_sizeof___int64
=0 \
108 ac_cv_sizeof_int16_t
=2 \
109 ac_cv_sizeof_uint16_t
=2 \
110 ac_cv_sizeof_u_int16_t
=2 \
111 ac_cv_sizeof_int32_t
=4 \
112 ac_cv_sizeof_uint32_t
=4 \
113 ac_cv_sizeof_u_int32_t
=4 \
114 ac_cv_sizeof_int64_t
=8 \
115 ac_cv_sizeof_uint64_t
=8 \
116 ac_cv_sizeof_u_int64_t
=8 \
117 ac_cv_func_setresuid
=no \
118 ac_cv_func_va_copy
=no \
119 ac_cv_func___va_copy
=no \
121 --target
=$(GNU_TARGET_NAME
) \
122 --host
=$(GNU_TARGET_NAME
) \
123 --build
=$(GNU_HOST_NAME
) \
124 --program-prefix
="" \
125 --program-suffix
="" \
129 --datadir=/usr
/share
/squid \
130 --includedir=/usr
/include \
131 --infodir=/usr
/share
/info \
133 --libexecdir
=/usr
/lib
/squid \
134 --localstatedir
=/var \
135 --mandir=/usr
/share
/man \
136 --sbindir
=/usr
/sbin \
137 --sysconfdir
=/etc
/squid \
138 $(DISABLE_LARGEFILE
) \
142 --enable-x-accelerator-vary \
146 --enable-kill-parent-hack \
150 --enable-err-languages
=English \
151 --enable-default-err-language
=English \
152 --enable-linux-netfilter \
154 --enable-external-acl-helpers
="" \
155 --enable-underscores \
156 --enable-cache-digests \
157 --enable-referer-log \
158 --enable-delay-pools \
159 --enable-useragent-log \
160 --with-openssl
=$(STAGING_DIR
)/usr \
161 --enable-auth
="$(AUTH_MODULES)" \
162 --enable-basic-auth-helpers
="$(BASIC_AUTH_HELPERS)" \
163 --enable-ntlm-auth-helpers
="$(NTLM_AUTH_HELPERS)" \
164 --enable-digest-auth-helpers
="$(DIGEST_AUTH_HELPERS)" \
165 --enable-external-acl-helpers
="$(EXTERNAL_ACL_HELPERS)" \
169 $(PKG_BUILD_DIR
)/.built
:
170 rm -rf
$(PKG_INSTALL_DIR
)
171 mkdir
-p
$(PKG_INSTALL_DIR
)
172 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
173 DESTDIR
=$(PKG_INSTALL_DIR
) \
178 install -d
-m0755
$(IDIR_SQUID
)/etc
/squid
179 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/mime.conf
$(IDIR_SQUID
)/etc
/squid
/
180 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/squid.conf
$(IDIR_SQUID
)/etc
/squid
/
181 install -d
-m0755
$(IDIR_SQUID
)/usr
/share
/squid
182 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/squid
/* $(IDIR_SQUID
)/usr
/share
/squid
/
183 install -d
-m0755
$(IDIR_SQUID
)/usr
/sbin
184 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/squid
$(IDIR_SQUID
)/usr
/sbin
/
185 $(RSTRIP
) $(IDIR_SQUID
)
186 $(IPKG_BUILD
) $(IDIR_SQUID
) $(PACKAGE_DIR
)