Makefile 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= squid
  5. PKG_VERSION:= 3.4.5
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= a831efb36cfbaa419f8dc7a43cba72c9
  8. PKG_DESCR:= web and cache proxy
  9. PKG_SECTION:= net/proxy
  10. PKG_DEPENDS:= libopenssl libpthread libstdcxx libltdl
  11. PKG_BUILDDEP:= autotool openssl libtool
  12. PKG_URL:= http://www.squid-cache.org/
  13. PKG_SITES:= http://www.squid-cache.org/Versions/v3/3.4/
  14. PKG_SUBPKGS:= SQUID SQUID_MOD_BASIC_AUTH_GETPWNAM SQUID_MOD_BASIC_AUTH_NCSA
  15. PKG_SUBPKGS+= SQUID_MOD_BASIC_AUTH_SMB SQUID_MOD_DIGEST_AUTH_FILE
  16. PKG_SUBPKGS+= SQUID_MOD_EXTERNAL_ACL_FILE_USERIP SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
  17. PKG_SUBPKGS+= SQUID_MOD_NTLM_AUTH_FAKE SQUID_MOD_BASIC_AUTH_LDAP
  18. PKGSD_SQUID_MOD_BASIC_AUTH_GETPWNAM:= authentication via getpwnam
  19. PKGSN_SQUID_MOD_BASIC_AUTH_GETPWNAM:= squid
  20. PKGSD_SQUID_MOD_BASIC_AUTH_NCSA:= authentication via NCSA
  21. PKGSN_SQUID_MOD_BASIC_AUTH_NCSA:= squid
  22. PKGSD_SQUID_MOD_BASIC_AUTH_SMB:= authentication via SMB
  23. PKGSN_SQUID_MOD_BASIC_AUTH_SMB:= squid
  24. PKGSD_SQUID_MOD_DIGEST_AUTH_FILE:= digest authentication with file
  25. PKGSN_SQUID_MOD_DIGEST_AUTH_FILE:= squid
  26. PKGSD_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP:= external acl file userip
  27. PKGSN_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP:= squid
  28. PKGSD_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP:= external acl unix group
  29. PKGSN_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP:= squid
  30. PKGSD_SQUID_MOD_NTLM_AUTH_FAKE:= ntlm auth fake
  31. PKGSN_SQUID_MOD_NTLM_AUTH_FAKE:= squid
  32. PKGSD_SQUID_MOD_BASIC_AUTH_LDAP:= basic authentication via LDAP
  33. PKGSN_SQUID_MOD_BASIC_AUTH_LDAP:= squid
  34. PKGSS_SQUID_MOD_BASIC_AUTH_LDAP:= libopenldap
  35. PKGSB_SQUID_MOD_BASIC_AUTH_LDAP:= openldap
  36. PKG_HOST_DEPENDS:= !netbsd !cygwin
  37. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
  38. BASIC_AUTH_HELPERS+= getpwnam
  39. endif
  40. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA},)
  41. BASIC_AUTH_HELPERS+= NCSA
  42. endif
  43. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB},)
  44. BASIC_AUTH_HELPERS+= SMB
  45. endif
  46. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_LDAP},)
  47. BASIC_AUTH_HELPERS+= LDAP
  48. endif
  49. ifeq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB}${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA}${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
  50. BASIC_AUTH_HELPERS:= none
  51. endif
  52. ifneq (${ADK_PACKAGE_SQUID_MOD_DIGEST_AUTH_FILE},)
  53. DIGEST_AUTH_HELPERS:= file
  54. else
  55. DIGEST_AUTH_HELPERS:= none
  56. endif
  57. ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP},)
  58. EXTERNAL_ACL_HELPERS+= file_userip
  59. endif
  60. ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
  61. EXTERNAL_ACL_HELPERS+= unix_group
  62. endif
  63. ifeq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_IP_USER}${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
  64. EXTERNAL_ACL_HELPERS:= none
  65. endif
  66. ifneq (${ADK_PACKAGE_SQUID_MOD_NTLM_AUTH_FAKE},)
  67. NTLM_AUTH_HELPERS+= fake
  68. else
  69. NTLM_AUTH_HELPERS+= none
  70. endif
  71. include ${TOPDIR}/mk/package.mk
  72. define PKG_mod_template
  73. INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
  74. ${2}-install:
  75. ${INSTALL_DIR} $${IDIR_${1}}/usr/lib/squid
  76. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/${2} \
  77. $${IDIR_${1}}/usr/lib/squid/
  78. endef
  79. $(eval $(call PKG_template,SQUID,squid,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  80. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,squid-mod-basic-auth-getpwnam,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  81. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_NCSA,squid-mod-basic-auth-ncsa,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  82. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_SMB,squid-mod-basic-auth-smb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  83. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_LDAP,squid-mod-basic-auth-ldap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  84. $(eval $(call PKG_template,SQUID_MOD_DIGEST_AUTH_FILE,squid-mod-digest-auth-file,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  85. $(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}))
  86. $(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}))
  87. $(eval $(call PKG_template,SQUID_MOD_NTLM_AUTH_FAKE,squid-mod-ntlm-auth-fake,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  88. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,basic_getpwnam_auth))
  89. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_LDAP,basic_ldap_auth))
  90. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_NCSA,basic_ncsa_auth))
  91. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_SMB,basic_smb_auth))
  92. $(eval $(call PKG_mod_template,SQUID_MOD_DIGEST_AUTH_FILE,digest_file_auth))
  93. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_FILE_USERIP,ext_file_userip_acl))
  94. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP,ldap_auth))
  95. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,ext_unix_group_acl))
  96. $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_FAKE,ntlm_fake_auth))
  97. AUTOTOOL_STYLE:= autoreconf
  98. TARGET_LDFLAGS+= -lpthread
  99. CONFIGURE_ENV+= ac_cv_sizeof_void_p=4 \
  100. ac_cv_sizeof_short=2 \
  101. ac_cv_sizeof_int=4 \
  102. ac_cv_sizeof_long=4 \
  103. ac_cv_sizeof_long_long=8 \
  104. ac_cv_sizeof___int64=0 \
  105. ac_cv_sizeof_int16_t=2 \
  106. ac_cv_sizeof_uint16_t=2 \
  107. ac_cv_sizeof_u_int16_t=2 \
  108. ac_cv_sizeof_int32_t=4 \
  109. ac_cv_sizeof_uint32_t=4 \
  110. ac_cv_sizeof_u_int32_t=4 \
  111. ac_cv_sizeof_int64_t=8 \
  112. ac_cv_sizeof_uint64_t=8 \
  113. ac_cv_sizeof_u_int64_t=8 \
  114. ac_cv_func_setresuid=no \
  115. ac_cv_func_va_copy=no \
  116. ac_cv_func___va_copy=no \
  117. ac_cv_epoll_works=yes \
  118. ac_cv_lib_nsl_main=no \
  119. ac_cv_func_strnstr=no \
  120. squid_cv_pf_inet6=yes \
  121. ac_cv_have_squid=yes
  122. XAKE_FLAGS+= MKDIR_P="mkdir -p"
  123. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  124. CONFIGURE_ARGS+= --datadir=/usr/share/squid \
  125. --libexecdir=/usr/lib/squid \
  126. --sysconfdir=/etc/squid \
  127. --with-gnu-ld \
  128. --enable-x-accelerator-vary \
  129. --with-pthreads \
  130. --with-dl \
  131. --disable-debug-cbdata \
  132. --enable-kill-parent-hack \
  133. --enable-arp-acl \
  134. --enable-ssl \
  135. --enable-err-languages=English \
  136. --enable-default-err-language=English \
  137. --enable-linux-netfilter \
  138. --enable-icmp \
  139. --enable-underscores \
  140. --enable-cache-digests \
  141. --enable-referer-log \
  142. --enable-delay-pools \
  143. --without-libcap \
  144. --disable-snmp \
  145. --disable-esi \
  146. --disable-htcp \
  147. --disable-wccp \
  148. --disable-wccpv2 \
  149. --enable-useragent-log \
  150. --with-openssl=${STAGING_TARGET_DIR}/usr \
  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}"
  158. post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  159. ${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
  160. ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \
  161. ${IDIR_SQUID}/etc/squid/
  162. ${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/
  163. ${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid/errors
  164. ${CP} ${WRKINST}/usr/share/squid/errors/en \
  165. ${IDIR_SQUID}/usr/share/squid/errors
  166. ${CP} ${WRKINST}/usr/share/squid/errors/templates \
  167. ${IDIR_SQUID}/usr/share/squid/errors
  168. ${CP} ${WRKINST}/usr/share/squid/icons ${IDIR_SQUID}/usr/share/squid/
  169. ${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid
  170. ${INSTALL_BIN} ${WRKINST}/usr/sbin/squid ${IDIR_SQUID}/usr/sbin/
  171. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/log_file_daemon \
  172. ${IDIR_SQUID}/usr/lib/squid
  173. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/unlinkd \
  174. ${IDIR_SQUID}/usr/lib/squid
  175. include ${TOPDIR}/mk/pkg-bottom.mk