Makefile 7.7 KB

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