Makefile 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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.0.STABLE20
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= b69577cfc5cfb6808ec426e3a933220d
  8. PKG_DESCR:= squid web and cache proxy
  9. PKG_SECTION:= net
  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.0/
  14. PKG_MULTI:= 1
  15. #PKG_CXX:= SQUID
  16. PKG_HOST_DEPENDS:= !netbsd
  17. AUTH_MODULES:= basic digest ntlm
  18. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
  19. BASIC_AUTH_HELPERS+= getpwnam
  20. endif
  21. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA},)
  22. BASIC_AUTH_HELPERS+= NCSA
  23. endif
  24. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB},)
  25. BASIC_AUTH_HELPERS+= SMB
  26. endif
  27. ifneq (${ADK_PACKAGE_SQUID_MOD_DIGEST_AUTH_PASSWORD},)
  28. DIGEST_AUTH_HELPERS:= password
  29. endif
  30. ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_IP_USER},)
  31. EXTERNAL_ACL_HELPERS+= ip_user
  32. endif
  33. ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
  34. EXTERNAL_ACL_HELPERS+= unix_group
  35. endif
  36. ifneq (${ADK_PACKAGE_SQUID_MOD_NTLM_AUTH_FAKEAUTH},)
  37. NTLM_AUTH_HELPERS+= fakeauth
  38. endif
  39. ifneq (${ADK_PACKAGE_SQUID_MOD_NTLM_AUTH_SMB_AUTH},)
  40. NTLM_AUTH_HELPERS+= SMB
  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_template,SQUID_MOD_NTLM_AUTH_SMB_AUTH,${PKG_NAME}-mod-ntlm-auth-smb-auth,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  59. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,getpwname_auth))
  60. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_LDAP,ldap))
  61. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_NCSA,ncsa_auth))
  62. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_SMB,smb_auth))
  63. $(eval $(call PKG_mod_template,SQUID_MOD_DIGEST_AUTH_PASSWORD,digest_pw_auth))
  64. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_IP_USER,ip_user_check))
  65. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP,ldap_auth))
  66. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,squid_unix_group))
  67. $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_FAKEAUTH,fakeauth_auth))
  68. $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_SMB_AUTH,ntlm_auth))
  69. #ifeq ($(ADK_COMPILE_SQUID_WITH_UCLIBCXX),y)
  70. #CONFIGURE_ENV+= CXXFLAGS="-fno-threadsafe-statics -fno-builtin -nostdinc++ \
  71. # -I${STAGING_DIR}/usr/include/uClibc++" \
  72. # LIBS="-nodefaultlibs -luClibc++ -ldl -lm"
  73. #endif
  74. AUTOTOOL_STYLE:= autotool
  75. CONFIGURE_ENV+= ac_cv_sizeof_void_p=4 \
  76. ac_cv_sizeof_short=2 \
  77. ac_cv_sizeof_int=4 \
  78. ac_cv_sizeof_long=4 \
  79. ac_cv_sizeof_long_long=8 \
  80. ac_cv_sizeof___int64=0 \
  81. ac_cv_sizeof_int16_t=2 \
  82. ac_cv_sizeof_uint16_t=2 \
  83. ac_cv_sizeof_u_int16_t=2 \
  84. ac_cv_sizeof_int32_t=4 \
  85. ac_cv_sizeof_uint32_t=4 \
  86. ac_cv_sizeof_u_int32_t=4 \
  87. ac_cv_sizeof_int64_t=8 \
  88. ac_cv_sizeof_uint64_t=8 \
  89. ac_cv_sizeof_u_int64_t=8 \
  90. ac_cv_func_setresuid=no \
  91. ac_cv_func_va_copy=no \
  92. ac_cv_func___va_copy=no \
  93. ac_cv_epoll_works=yes \
  94. ac_cv_lib_nsl_main=no \
  95. ac_cv_func_strnstr=no
  96. CONFIGURE_ARGS+= --datadir=/usr/share/squid \
  97. --libexecdir=/usr/lib/squid \
  98. --sysconfdir=/etc/squid \
  99. --with-gnu-ld \
  100. --enable-x-accelerator-vary \
  101. --with-pthreads \
  102. --with-dl \
  103. --enable-kill-parent-hack \
  104. --enable-arp-acl \
  105. --enable-ssl \
  106. --enable-err-languages=English \
  107. --enable-default-err-language=English \
  108. --enable-linux-netfilter \
  109. --enable-icmp \
  110. --enable-external-acl-helpers="" \
  111. --enable-underscores \
  112. --enable-cache-digests \
  113. --enable-referer-log \
  114. --enable-delay-pools \
  115. --disable-snmp \
  116. --disable-esi \
  117. --disable-htcp \
  118. --disable-wccp \
  119. --disable-wccpv2 \
  120. --enable-useragent-log \
  121. --with-openssl=${STAGING_DIR}/usr \
  122. --enable-auth="${AUTH_MODULES}" \
  123. --enable-basic-auth-helpers="${BASIC_AUTH_HELPERS}" \
  124. --enable-ntlm-auth-helpers="${NTLM_AUTH_HELPERS}" \
  125. --enable-digest-auth-helpers="${DIGEST_AUTH_HELPERS}" \
  126. --enable-external-acl-helpers="${EXTERNAL_ACL_HELPERS}"
  127. #ifeq (${ADK_COMPILE_SQUID_WITH_UCLIBCXX},y)
  128. # add workaround because libtool tries to link libstdc++
  129. #post-configure:
  130. # ${SED} 's#postdeps="-lstdc.*#postdeps="-lm"#' \
  131. # ${WRKBUILD}/libtool
  132. #endif
  133. post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  134. ${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
  135. ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \
  136. ${IDIR_SQUID}/etc/squid/
  137. ${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/
  138. ${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid
  139. ${CP} ${WRKINST}/usr/share/squid/* ${IDIR_SQUID}/usr/share/squid/
  140. ${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid
  141. ${INSTALL_BIN} ${WRKINST}/usr/sbin/squid ${IDIR_SQUID}/usr/sbin/
  142. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/unlinkd \
  143. ${IDIR_SQUID}/usr/lib/squid
  144. include ${TOPDIR}/mk/pkg-bottom.mk