Makefile 6.8 KB

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