1
0

Makefile 6.9 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.4
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= dc2bcb967fc6b15bbbc6b961010c0c00
  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_MULTI:= 1
  15. PKG_NEED_CXX:= 1
  16. PKG_SUBPKGS:= SQUID SQUID_MOD_BASIC_AUTH_GETPWNAM SQUID_MOD_BASIC_AUTH_NCSA
  17. PKG_SUBPKGS+= SQUID_MOD_BASIC_AUTH_SMB SQUID_MOD_DIGEST_AUTH_FILE
  18. PKG_SUBPKGS+= SQUID_MOD_EXTERNAL_ACL_FILE_USERIP SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP
  19. PKG_SUBPKGS+= SQUID_MOD_NTLM_AUTH_FAKE SQUID_MOD_BASIC_AUTH_LDAP
  20. PKGSS_SQUID_MOD_BASIC_AUTH_LDAP:= libopenldap
  21. PKGSB_SQUID_MOD_BASIC_AUTH_LDAP:= openldap
  22. PKG_HOST_DEPENDS:= !netbsd !cygwin
  23. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
  24. BASIC_AUTH_HELPERS+= getpwnam
  25. endif
  26. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA},)
  27. BASIC_AUTH_HELPERS+= NCSA
  28. endif
  29. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB},)
  30. BASIC_AUTH_HELPERS+= SMB
  31. endif
  32. ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_LDAP},)
  33. BASIC_AUTH_HELPERS+= LDAP
  34. endif
  35. ifeq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_SMB}${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_NCSA}${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)
  36. BASIC_AUTH_HELPERS:= none
  37. endif
  38. ifneq (${ADK_PACKAGE_SQUID_MOD_DIGEST_AUTH_FILE},)
  39. DIGEST_AUTH_HELPERS:= file
  40. else
  41. DIGEST_AUTH_HELPERS:= none
  42. endif
  43. ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_FILE_USERIP},)
  44. EXTERNAL_ACL_HELPERS+= file_userip
  45. endif
  46. ifneq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
  47. EXTERNAL_ACL_HELPERS+= unix_group
  48. endif
  49. ifeq (${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_IP_USER}${ADK_PACKAGE_SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP},)
  50. EXTERNAL_ACL_HELPERS:= none
  51. endif
  52. ifneq (${ADK_PACKAGE_SQUID_MOD_NTLM_AUTH_FAKE},)
  53. NTLM_AUTH_HELPERS+= fake
  54. else
  55. NTLM_AUTH_HELPERS+= none
  56. endif
  57. include ${TOPDIR}/mk/package.mk
  58. define PKG_mod_template
  59. INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
  60. ${2}-install:
  61. ${INSTALL_DIR} $${IDIR_${1}}/usr/lib/squid
  62. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/${2} \
  63. $${IDIR_${1}}/usr/lib/squid/
  64. endef
  65. $(eval $(call PKG_template,SQUID,squid,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  66. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,squid-mod-basic-auth-getpwnam,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  67. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_NCSA,squid-mod-basic-auth-ncsa,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  68. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_SMB,squid-mod-basic-auth-smb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  69. $(eval $(call PKG_template,SQUID_MOD_BASIC_AUTH_LDAP,squid-mod-basic-auth-ldap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  70. $(eval $(call PKG_template,SQUID_MOD_DIGEST_AUTH_FILE,squid-mod-digest-auth-file,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  71. $(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}))
  72. $(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}))
  73. $(eval $(call PKG_template,SQUID_MOD_NTLM_AUTH_FAKE,squid-mod-ntlm-auth-fake,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  74. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_GETPWNAM,basic_getpwnam_auth))
  75. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_LDAP,basic_ldap_auth))
  76. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_NCSA,basic_ncsa_auth))
  77. $(eval $(call PKG_mod_template,SQUID_MOD_BASIC_AUTH_SMB,basic_smb_auth))
  78. $(eval $(call PKG_mod_template,SQUID_MOD_DIGEST_AUTH_FILE,digest_file_auth))
  79. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_FILE_USERIP,ext_file_userip_acl))
  80. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_LDAP_GROUP,ldap_auth))
  81. $(eval $(call PKG_mod_template,SQUID_MOD_EXTERNAL_ACL_UNIX_GROUP,ext_unix_group_acl))
  82. $(eval $(call PKG_mod_template,SQUID_MOD_NTLM_AUTH_FAKE,ntlm_fake_auth))
  83. AUTOTOOL_STYLE:= autoreconf
  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. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  110. CONFIGURE_ARGS+= --datadir=/usr/share/squid \
  111. --libexecdir=/usr/lib/squid \
  112. --sysconfdir=/etc/squid \
  113. --with-gnu-ld \
  114. --enable-x-accelerator-vary \
  115. --with-pthreads \
  116. --with-dl \
  117. --disable-debug-cbdata \
  118. --enable-kill-parent-hack \
  119. --enable-arp-acl \
  120. --enable-ssl \
  121. --enable-err-languages=English \
  122. --enable-default-err-language=English \
  123. --enable-linux-netfilter \
  124. --enable-icmp \
  125. --enable-underscores \
  126. --enable-cache-digests \
  127. --enable-referer-log \
  128. --enable-delay-pools \
  129. --without-libcap \
  130. --disable-snmp \
  131. --disable-esi \
  132. --disable-htcp \
  133. --disable-wccp \
  134. --disable-wccpv2 \
  135. --enable-useragent-log \
  136. --with-openssl=${STAGING_TARGET_DIR}/usr \
  137. --without-krb5-config \
  138. --enable-negotiate-auth-helpers=no \
  139. --enable-auth \
  140. --enable-auth-basic="${BASIC_AUTH_HELPERS}" \
  141. --enable-auth-ntlm="${NTLM_AUTH_HELPERS}" \
  142. --enable-auth-digest="${DIGEST_AUTH_HELPERS}" \
  143. --enable-external-acl-helpers="${EXTERNAL_ACL_HELPERS}"
  144. post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  145. ${INSTALL_DIR} ${IDIR_SQUID}/etc/squid
  146. ${INSTALL_DATA} ${WRKINST}/etc/squid/mime.conf \
  147. ${IDIR_SQUID}/etc/squid/
  148. ${INSTALL_DATA} ./files/squid.conf ${IDIR_SQUID}/etc/squid/
  149. ${INSTALL_DIR} ${IDIR_SQUID}/usr/share/squid/errors
  150. ${CP} ${WRKINST}/usr/share/squid/errors/en \
  151. ${IDIR_SQUID}/usr/share/squid/errors
  152. ${CP} ${WRKINST}/usr/share/squid/errors/templates \
  153. ${IDIR_SQUID}/usr/share/squid/errors
  154. ${CP} ${WRKINST}/usr/share/squid/icons ${IDIR_SQUID}/usr/share/squid/
  155. ${INSTALL_DIR} ${IDIR_SQUID}/usr/sbin ${IDIR_SQUID}/usr/lib/squid
  156. ${INSTALL_BIN} ${WRKINST}/usr/sbin/squid ${IDIR_SQUID}/usr/sbin/
  157. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/log_file_daemon \
  158. ${IDIR_SQUID}/usr/lib/squid
  159. ${INSTALL_BIN} ${WRKINST}/usr/lib/squid/unlinkd \
  160. ${IDIR_SQUID}/usr/lib/squid
  161. include ${TOPDIR}/mk/pkg-bottom.mk