Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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.1.4
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= c70ef1198e6a6c1ae80bc57cd3592e36
  8. PKG_DESCR:= squid web and cache proxy
  9. PKG_SECTION:= proxy
  10. PKG_DEPENDS:= libopenssl libpthread
  11. PKG_BUILDDEP:= openssl
  12. PKG_URL:= http://www.squid-cache.org/
  13. PKG_SITES:= http://www.squid-cache.org/Versions/v3/3.1/
  14. PKG_MULTI:= 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_PASSWORD
  17. PKG_SUBPKGS+= SQUID_MOD_EXTERNAL_ACL_IP_USER SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
  18. PKG_SUBPKGS+= SQUID_MOD_NTLM_AUTH_FAKEAUTH
  19. PKG_HOST_DEPENDS:= !netbsd !cygwin !darwin
  20. AUTH_MODULES:= basic digest ntlm
  21. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
  22. BASIC_AUTH_HELPERS+= getpwnam
  23. endif
  24. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA},)
  25. BASIC_AUTH_HELPERS+= NCSA
  26. endif
  27. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB},)
  28. BASIC_AUTH_HELPERS+= SMB
  29. endif
  30. ifneq (${ADK_PACKAGE_SQUID_MOD_DIGEST_AUTH_PASSWORD},)
  31. DIGEST_AUTH_HELPERS:= password
  32. endif
  33. ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_IP_USER},)
  34. EXTERNAL_ACL_HELPERS+= ip_user
  35. endif
  36. ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
  37. EXTERNAL_ACL_HELPERS+= unix_group
  38. endif
  39. ifneq (${ADK_PACKAGE_SQUID_MOD_NTLM_AUTH_FAKEAUTH},)
  40. NTLM_AUTH_HELPERS+= fakeauth
  41. endif
  42. include ${TOPDIR}/mk/package.mk
  43. define PKG_mod_template
  44. INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
  45. ${2}-install:
  46. ${INSTALL_DIR} $${IDIR_${1}}/usr/lib/squid
  47. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/${2} \
  48. $${IDIR_${1}}/usr/lib/squid/
  49. endef
  50. $(eval $(call PKG_template,SQUID,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  51. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,${PKG_NAME}-mod-basic-auth-getpwnam,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  52. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_NCSA,${PKG_NAME}-mod-basic-auth-ncsa,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  53. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_SMB,${PKG_NAME}-mod-basic-auth-smb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  54. $(eval $(call PKG_template,SQUID_MOD_DIGEST_AUTH_PASSWORD,${PKG_NAME}-mod-digest-auth-password,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  55. $(eval $(call PKG_template,SQUID_MOD_EXTERNAL_ACL_IP_USER,${PKG_NAME}-mod-external-acl-ip-user,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  56. $(eval $(call PKG_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,${PKG_NAME}-mod-external-acl-unix-group,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  57. $(eval $(call PKG_template,SQUID_MOD_NTLM_AUTH_FAKEAUTH,${PKG_NAME}-mod-ntlm-auth-fakeauth,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  58. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,getpwname_auth))
  59. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_LDAP,ldap))
  60. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_NCSA,ncsa_auth))
  61. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_SMB,smb_auth))
  62. $(eval $(call PKG_mod_template,SQUID_MOD_DIGEST_AUTH_PASSWORD,digest_pw_auth))
  63. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_IP_USER,ip_user_check))
  64. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP,ldap_auth))
  65. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,squid_unix_group))
  66. $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_FAKEAUTH,fakeauth_auth))
  67. CONFIGURE_ENV+= ac_cv_sizeof_void_p=4 \
  68. ac_cv_sizeof_short=2 \
  69. ac_cv_sizeof_int=4 \
  70. ac_cv_sizeof_long=4 \
  71. ac_cv_sizeof_long_long=8 \
  72. ac_cv_sizeof___int64=0 \
  73. ac_cv_sizeof_int16_t=2 \
  74. ac_cv_sizeof_uint16_t=2 \
  75. ac_cv_sizeof_u_int16_t=2 \
  76. ac_cv_sizeof_int32_t=4 \
  77. ac_cv_sizeof_uint32_t=4 \
  78. ac_cv_sizeof_u_int32_t=4 \
  79. ac_cv_sizeof_int64_t=8 \
  80. ac_cv_sizeof_uint64_t=8 \
  81. ac_cv_sizeof_u_int64_t=8 \
  82. ac_cv_func_setresuid=no \
  83. ac_cv_func_va_copy=no \
  84. ac_cv_func___va_copy=no \
  85. ac_cv_epoll_works=yes \
  86. ac_cv_lib_nsl_main=no \
  87. ac_cv_func_strnstr=no \
  88. squid_cv_pf_inet6=yes
  89. XAKE_FLAGS+= MKDIR_P="mkdir -p"
  90. CONFIGURE_ARGS+= --datadir=/usr/share/squid \
  91. --libexecdir=/usr/lib/squid \
  92. --sysconfdir=/etc/squid \
  93. --with-gnu-ld \
  94. --enable-x-accelerator-vary \
  95. --with-pthreads \
  96. --with-dl \
  97. --disable-debug-cbdata \
  98. --enable-kill-parent-hack \
  99. --enable-arp-acl \
  100. --enable-ssl \
  101. --enable-err-languages=English \
  102. --enable-default-err-language=English \
  103. --enable-linux-netfilter \
  104. --enable-icmp \
  105. --enable-underscores \
  106. --enable-cache-digests \
  107. --enable-referer-log \
  108. --enable-delay-pools \
  109. --without-libcap \
  110. --disable-snmp \
  111. --disable-esi \
  112. --disable-htcp \
  113. --disable-wccp \
  114. --disable-wccpv2 \
  115. --enable-useragent-log \
  116. --with-openssl=${STAGING_TARGET_DIR}/usr \
  117. --enable-negotiate-auth-helpers=no \
  118. --enable-auth="${AUTH_MODULES}" \
  119. --enable-basic-auth-helpers="${BASIC_AUTH_HELPERS}" \
  120. --enable-ntlm-auth-helpers="${NTLM_AUTH_HELPERS}" \
  121. --enable-digest-auth-helpers="${DIGEST_AUTH_HELPERS}" \
  122. --enable-external-acl-helpers="${EXTERNAL_ACL_HELPERS}"
  123. post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  124. ${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
  125. ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \
  126. ${IDIR_SQUID}/etc/squid/
  127. ${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/
  128. ${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid/errors
  129. ${CP} ${WRKINST}/usr/share/squid/errors/en \
  130. ${IDIR_SQUID}/usr/share/squid/errors
  131. ${CP} ${WRKINST}/usr/share/squid/icons ${IDIR_SQUID}/usr/share/squid/
  132. ${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid
  133. ${INSTALL_BIN} ${WRKINST}/usr/sbin/squid ${IDIR_SQUID}/usr/sbin/
  134. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/unlinkd \
  135. ${IDIR_SQUID}/usr/lib/squid
  136. include ${TOPDIR}/mk/pkg-bottom.mk