libgpg-error: fix riscv64
[openadk.git] / package / squid / Makefile
blobe4e83cdc49e59bde918a9191412d0fb099604f9e
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
6 PKG_NAME:= squid
7 PKG_VERSION:= 6.10
8 PKG_RELEASE:= 1
9 PKG_HASH:= 0b07b187e723f04770dd25beb89aec12030a158696aa8892d87c8b26853408a7
10 PKG_DESCR:= web and cache proxy
11 PKG_SECTION:= net/proxy
12 PKG_DEPENDS:= libltdl
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/v6/
18 PKG_SUBPKGS:= SQUID SQUID_MOD_BASIC_AUTH_GETPWNAM SQUID_MOD_BASIC_AUTH_NCSA
19 PKG_SUBPKGS+= SQUID_MOD_BASIC_AUTH_SMB SQUID_MOD_DIGEST_AUTH_FILE
20 PKG_SUBPKGS+= SQUID_MOD_EXTERNAL_ACL_FILE_USERIP SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
21 PKG_SUBPKGS+= SQUID_MOD_NTLM_AUTH_FAKE SQUID_MOD_BASIC_AUTH_LDAP
23 PKGSD_SQUID_MOD_BASIC_AUTH_GETPWNAM:= authentication via getpwnam
24 PKGSN_SQUID_MOD_BASIC_AUTH_GETPWNAM:= squid
25 PKGSD_SQUID_MOD_BASIC_AUTH_NCSA:= authentication via NCSA
26 PKGSN_SQUID_MOD_BASIC_AUTH_NCSA:= squid
27 PKGSD_SQUID_MOD_BASIC_AUTH_SMB:= authentication via SMB
28 PKGSN_SQUID_MOD_BASIC_AUTH_SMB:= squid
29 PKGSD_SQUID_MOD_DIGEST_AUTH_FILE:= digest authentication with file
30 PKGSN_SQUID_MOD_DIGEST_AUTH_FILE:= squid
31 PKGSD_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP:= external acl file userip
32 PKGSN_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP:= squid
33 PKGSD_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP:= external acl unix group
34 PKGSN_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP:= squid
35 PKGSD_SQUID_MOD_NTLM_AUTH_FAKE:= ntlm auth fake
36 PKGSN_SQUID_MOD_NTLM_AUTH_FAKE:= squid
37 PKGSD_SQUID_MOD_BASIC_AUTH_LDAP:= basic authentication via LDAP
38 PKGSN_SQUID_MOD_BASIC_AUTH_LDAP:= squid
40 PKGSS_SQUID_MOD_BASIC_AUTH_LDAP:= libopenldap
41 PKGSB_SQUID_MOD_BASIC_AUTH_LDAP:= openldap
43 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
44 BASIC_AUTH_HELPERS+= getpwnam
45 endif
46 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA},)
47 BASIC_AUTH_HELPERS+= NCSA
48 endif
49 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB},)
50 BASIC_AUTH_HELPERS+= SMB
51 endif
52 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_LDAP},)
53 BASIC_AUTH_HELPERS+= LDAP
54 endif
55 ifeq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB}${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA}${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
56 BASIC_AUTH_HELPERS:= none
57 endif
59 ifneq (${ADK_PACKAGE_SQUID_MOD_DIGEST_AUTH_FILE},)
60 DIGEST_AUTH_HELPERS:= file
61 else
62 DIGEST_AUTH_HELPERS:= none
63 endif
64 ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP},)
65 EXTERNAL_ACL_HELPERS+= file_userip
66 endif
67 ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
68 EXTERNAL_ACL_HELPERS+= unix_group
69 endif
70 ifeq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP}${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
71 EXTERNAL_ACL_HELPERS:= none
72 endif
74 ifneq (${ADK_PACKAGE_SQUID_MOD_NTLM_AUTH_FAKE},)
75 NTLM_AUTH_HELPERS+= fake
76 else
77 NTLM_AUTH_HELPERS+= none
78 endif
80 include ${ADK_TOPDIR}/mk/package.mk
82 define PKG_mod_template
84 INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
86 ${2}-install:
87 ${INSTALL_DIR} $${IDIR_${1}}/usr/lib/squid
88 ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/${2} \
89 $${IDIR_${1}}/usr/lib/squid/
90 endef
92 $(eval $(call PKG_template,SQUID,squid,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
93 $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,squid-mod-basic-auth-getpwnam,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
94 $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_NCSA,squid-mod-basic-auth-ncsa,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
95 $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_SMB,squid-mod-basic-auth-smb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
96 $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_LDAP,squid-mod-basic-auth-ldap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
97 $(eval $(call PKG_template,SQUID_MOD_DIGEST_AUTH_FILE,squid-mod-digest-auth-file,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
98 $(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}))
99 $(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}))
100 $(eval $(call PKG_template,SQUID_MOD_NTLM_AUTH_FAKE,squid-mod-ntlm-auth-fake,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
102 $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,basic_getpwnam_auth))
103 $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_LDAP,basic_ldap_auth))
104 $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_NCSA,basic_ncsa_auth))
105 $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_SMB,basic_smb_auth))
106 $(eval $(call PKG_mod_template,SQUID_MOD_DIGEST_AUTH_FILE,digest_file_auth))
107 $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_FILE_USERIP,ext_file_userip_acl))
108 $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP,ldap_auth))
109 $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,ext_unix_group_acl))
110 $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_FAKE,ntlm_fake_auth))
112 TARGET_LDFLAGS+= -lpthread
113 HOST_CXXFLAGS+= -static-libstdc++
115 CONFIGURE_ENV+= ac_cv_func_setresuid=yes \
116 ac_cv_func_va_copy=yes \
117 ac_cv_func___va_copy=yes \
118 ac_cv_epoll_works=yes \
119 ac_cv_func_strnstr=no \
120 ac_cv_have_squid=yes
121 XAKE_FLAGS+= MKDIR_P="mkdir -p"
122 CONFIGURE_ARGS+= --datadir=/usr/share/squid \
123 --libexecdir=/usr/lib/squid \
124 --sysconfdir=/etc/squid \
125 --disable-arch-native \
126 --with-gnu-ld \
127 --enable-x-accelerator-vary \
128 --with-pthreads \
129 --with-dl \
130 --disable-debug-cbdata \
131 --disable-strict-error-checking \
132 --enable-dependency-tracking \
133 --enable-kill-parent-hack \
134 --enable-arp-acl \
135 --enable-err-languages=English \
136 --enable-default-err-language=English \
137 --enable-linux-netfilter \
138 --enable-underscores \
139 --enable-cache-digests \
140 --enable-referer-log \
141 --enable-delay-pools \
142 --without-libcap \
143 --enable-icmp \
144 --disable-snmp \
145 --disable-esi \
146 --disable-ssl \
147 --disable-htcp \
148 --disable-wccp \
149 --disable-wccpv2 \
150 --enable-useragent-log \
151 --without-krb5-config \
152 --enable-negotiate-auth-helpers=no \
153 --enable-auth \
154 --enable-auth-basic="${BASIC_AUTH_HELPERS}" \
155 --enable-auth-ntlm="${NTLM_AUTH_HELPERS}" \
156 --enable-auth-digest="${DIGEST_AUTH_HELPERS}" \
157 --enable-external-acl-helpers="${EXTERNAL_ACL_HELPERS}"
159 squid-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
160 ${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
161 ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \
162 ${IDIR_SQUID}/etc/squid/
163 ${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/
164 ${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid/errors
165 ${CP} ${WRKINST}/usr/share/squid/errors/templates \
166 ${IDIR_SQUID}/usr/share/squid/errors
167 ${CP} ${WRKINST}/usr/share/squid/icons ${IDIR_SQUID}/usr/share/squid/
168 ${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid
169 ${INSTALL_BIN} ${WRKINST}/usr/sbin/squid ${IDIR_SQUID}/usr/sbin/
170 ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/log_file_daemon \
171 ${IDIR_SQUID}/usr/lib/squid
172 ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/unlinkd \
173 ${IDIR_SQUID}/usr/lib/squid
175 include ${ADK_TOPDIR}/mk/pkg-bottom.mk