1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include ${ADK_TOPDIR}/rules.mk
9 PKG_HASH
:= c4b8a2efb85acc600e506605f175298ce3324048e60f4708926d354fe4b5c7a0
10 PKG_DESCR
:= web and cache proxy
11 PKG_SECTION
:= net
/proxy
13 PKG_BUILDDEP
:= libtool
14 PKG_NEEDS
:= threads c
++
15 PKG_URL
:= http
://www.squid-cache.org
/
16 PKG_SITES
:= http
://www.squid-cache.org
/Versions
/v3
/3.5/
18 PKG_SYSTEM_DEPENDS
:= !mikrotik-rb532
20 PKG_SUBPKGS
:= SQUID SQUID_MOD_BASIC_AUTH_GETPWNAM SQUID_MOD_BASIC_AUTH_NCSA
21 PKG_SUBPKGS
+= SQUID_MOD_BASIC_AUTH_SMB SQUID_MOD_DIGEST_AUTH_FILE
22 PKG_SUBPKGS
+= SQUID_MOD_EXTERNAL_ACL_FILE_USERIP SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
23 PKG_SUBPKGS
+= SQUID_MOD_NTLM_AUTH_FAKE SQUID_MOD_BASIC_AUTH_LDAP
25 PKGSD_SQUID_MOD_BASIC_AUTH_GETPWNAM
:= authentication via getpwnam
26 PKGSN_SQUID_MOD_BASIC_AUTH_GETPWNAM
:= squid
27 PKGSD_SQUID_MOD_BASIC_AUTH_NCSA
:= authentication via NCSA
28 PKGSN_SQUID_MOD_BASIC_AUTH_NCSA
:= squid
29 PKGSD_SQUID_MOD_BASIC_AUTH_SMB
:= authentication via SMB
30 PKGSN_SQUID_MOD_BASIC_AUTH_SMB
:= squid
31 PKGSD_SQUID_MOD_DIGEST_AUTH_FILE
:= digest authentication with file
32 PKGSN_SQUID_MOD_DIGEST_AUTH_FILE
:= squid
33 PKGSD_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP
:= external acl file userip
34 PKGSN_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP
:= squid
35 PKGSD_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
:= external acl unix group
36 PKGSN_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
:= squid
37 PKGSD_SQUID_MOD_NTLM_AUTH_FAKE
:= ntlm auth fake
38 PKGSN_SQUID_MOD_NTLM_AUTH_FAKE
:= squid
39 PKGSD_SQUID_MOD_BASIC_AUTH_LDAP
:= basic authentication via LDAP
40 PKGSN_SQUID_MOD_BASIC_AUTH_LDAP
:= squid
42 PKGSS_SQUID_MOD_BASIC_AUTH_LDAP
:= libopenldap
43 PKGSB_SQUID_MOD_BASIC_AUTH_LDAP
:= openldap
45 PKG_HOST_DEPENDS
:= !netbsd
!cygwin
47 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
48 BASIC_AUTH_HELPERS
+= getpwnam
50 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA},)
51 BASIC_AUTH_HELPERS
+= NCSA
53 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB},)
54 BASIC_AUTH_HELPERS
+= SMB
56 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_LDAP},)
57 BASIC_AUTH_HELPERS
+= LDAP
59 ifeq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB}${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA}${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
60 BASIC_AUTH_HELPERS
:= none
63 ifneq (${ADK_PACKAGE_SQUID_MOD_DIGEST_AUTH_FILE},)
64 DIGEST_AUTH_HELPERS
:= file
66 DIGEST_AUTH_HELPERS
:= none
68 ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP},)
69 EXTERNAL_ACL_HELPERS
+= file_userip
71 ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
72 EXTERNAL_ACL_HELPERS
+= unix_group
74 ifeq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP}${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
75 EXTERNAL_ACL_HELPERS
:= none
78 ifneq (${ADK_PACKAGE_SQUID_MOD_NTLM_AUTH_FAKE},)
79 NTLM_AUTH_HELPERS
+= fake
81 NTLM_AUTH_HELPERS
+= none
84 include ${ADK_TOPDIR}/mk
/package.mk
86 define PKG_mod_template
88 INSTALL_MODS_
$${ADK_PACKAGE_
${1}}+= ${2}-install
91 ${INSTALL_DIR} $${IDIR_
${1}}/usr
/lib
/squid
92 ${INSTALL_BIN} ${WRKINST}/usr
/lib
/squid
/${2} \
93 $${IDIR_
${1}}/usr
/lib
/squid
/
96 $(eval
$(call PKG_template
,SQUID
,squid
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
97 $(eval
$(call PKG_template
,SQUID_MOD_BASIC_AUTH_GETPWNAM
,squid-mod-basic-auth-getpwnam
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
98 $(eval
$(call PKG_template
,SQUID_MOD_BASIC_AUTH_NCSA
,squid-mod-basic-auth-ncsa
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
99 $(eval
$(call PKG_template
,SQUID_MOD_BASIC_AUTH_SMB
,squid-mod-basic-auth-smb
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
100 $(eval
$(call PKG_template
,SQUID_MOD_BASIC_AUTH_LDAP
,squid-mod-basic-auth-ldap
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
101 $(eval
$(call PKG_template
,SQUID_MOD_DIGEST_AUTH_FILE
,squid-mod-digest-auth-file
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
102 $(eval
$(call PKG_template
,SQUID_MOD_EXTERNAL_ACL_FILE_USERIP
,squid-mod-external-acl-file-userip
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
103 $(eval
$(call PKG_template
,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
,squid-mod-external-acl-unix-group
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
104 $(eval
$(call PKG_template
,SQUID_MOD_NTLM_AUTH_FAKE
,squid-mod-ntlm-auth-fake
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
106 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_GETPWNAM
,basic_getpwnam_auth
))
107 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_LDAP
,basic_ldap_auth
))
108 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_NCSA
,basic_ncsa_auth
))
109 $(eval
$(call PKG_mod_template
,SQUID_MOD_BASIC_AUTH_SMB
,basic_smb_auth
))
110 $(eval
$(call PKG_mod_template
,SQUID_MOD_DIGEST_AUTH_FILE
,digest_file_auth
))
111 $(eval
$(call PKG_mod_template
,SQUID_MOD_EXTERNAL_ACL_FILE_USERIP
,ext_file_userip_acl
))
112 $(eval
$(call PKG_mod_template
,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP
,ldap_auth
))
113 $(eval
$(call PKG_mod_template
,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
,ext_unix_group_acl
))
114 $(eval
$(call PKG_mod_template
,SQUID_MOD_NTLM_AUTH_FAKE
,ntlm_fake_auth
))
116 TARGET_LDFLAGS
+= -lpthread
117 HOST_CXXFLAGS
+= -static-libstdc
++
119 AUTOTOOL_STYLE
:= autoreconf
120 CONFIGURE_ENV
+= ac_cv_sizeof_void_p
=4 \
121 ac_cv_sizeof_short
=2 \
123 ac_cv_sizeof_long
=4 \
124 ac_cv_sizeof_long_long
=8 \
125 ac_cv_sizeof___int64
=0 \
126 ac_cv_sizeof_int16_t
=2 \
127 ac_cv_sizeof_uint16_t
=2 \
128 ac_cv_sizeof_u_int16_t
=2 \
129 ac_cv_sizeof_int32_t
=4 \
130 ac_cv_sizeof_uint32_t
=4 \
131 ac_cv_sizeof_u_int32_t
=4 \
132 ac_cv_sizeof_int64_t
=8 \
133 ac_cv_sizeof_uint64_t
=8 \
134 ac_cv_sizeof_u_int64_t
=8 \
135 ac_cv_func_setresuid
=no \
136 ac_cv_func_va_copy
=no \
137 ac_cv_func___va_copy
=no \
138 ac_cv_epoll_works
=yes \
139 ac_cv_lib_nsl_main
=no \
140 ac_cv_func_strnstr
=no \
141 squid_cv_pf_inet6
=yes \
142 squid_cv_gnu_atomics
=yes \
144 XAKE_FLAGS
+= MKDIR_P
="mkdir -p"
145 XAKE_FLAGS
+= GCC_HONOUR_COPTS
=s
146 CONFIGURE_ARGS
+= --datadir=/usr
/share
/squid \
147 --libexecdir
=/usr
/lib
/squid \
148 --sysconfdir
=/etc
/squid \
150 --enable-x-accelerator-vary \
153 --disable-debug-cbdata \
154 --enable-kill-parent-hack \
156 --enable-err-languages
=English \
157 --enable-default-err-language
=English \
158 --enable-linux-netfilter \
160 --enable-underscores \
161 --enable-cache-digests \
162 --enable-referer-log \
163 --enable-delay-pools \
171 --enable-useragent-log \
172 --without-krb5-config \
173 --enable-negotiate-auth-helpers
=no \
175 --enable-auth-basic
="${BASIC_AUTH_HELPERS}" \
176 --enable-auth-ntlm
="${NTLM_AUTH_HELPERS}" \
177 --enable-auth-digest
="${DIGEST_AUTH_HELPERS}" \
178 --enable-external-acl-helpers
="${EXTERNAL_ACL_HELPERS}"
180 squid-install
: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
181 ${INSTALL_DIR} ${IDIR_SQUID}/etc
/squid
182 ${INSTALL_DATA} ${WRKINST}/etc
/squid
/mime.conf \
183 ${IDIR_SQUID}/etc
/squid
/
184 ${INSTALL_DATA} .
/files
/squid.conf
${IDIR_SQUID}/etc
/squid
/
185 ${INSTALL_DIR} ${IDIR_SQUID}/usr
/share
/squid
/errors
186 ${CP} ${WRKINST}/usr
/share
/squid
/errors
/en \
187 ${IDIR_SQUID}/usr
/share
/squid
/errors
188 ${CP} ${WRKINST}/usr
/share
/squid
/errors
/templates \
189 ${IDIR_SQUID}/usr
/share
/squid
/errors
190 ${CP} ${WRKINST}/usr
/share
/squid
/icons
${IDIR_SQUID}/usr
/share
/squid
/
191 ${INSTALL_DIR} ${IDIR_SQUID}/usr
/sbin
${IDIR_SQUID}/usr
/lib
/squid
192 ${INSTALL_BIN} ${WRKINST}/usr
/sbin
/squid
${IDIR_SQUID}/usr
/sbin
/
193 ${INSTALL_BIN} ${WRKINST}/usr
/lib
/squid
/log_file_daemon \
194 ${IDIR_SQUID}/usr
/lib
/squid
195 ${INSTALL_BIN} ${WRKINST}/usr
/lib
/squid
/unlinkd \
196 ${IDIR_SQUID}/usr
/lib
/squid
198 include ${ADK_TOPDIR}/mk
/pkg-bottom.mk