Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. COMMENT= jabber server written in Erlang
  2. V= 23.04
  3. CATEGORIES= net
  4. HOMEPAGE= https://www.ejabberd.im/
  5. # GPLv2+
  6. PERMIT_PACKAGE= Yes
  7. GH_ACCOUNT= processone
  8. GH_PROJECT= ejabberd
  9. GH_TAGNAME= ${V}
  10. WANTLIB+= c m ${COMPILER_LIBCXX} crypto expat ssl
  11. WANTLIB += yaml-0
  12. MASTER_SITES0 https://github.com/
  13. MODULES= lang/erlang
  14. MAKE_FLAGS+= EJABBERDDIR=${PREFIX}/lib/ejabberd \
  15. LOGDIR=${EJLOGDIR} \
  16. ETCDIR=${SYSCONFDIR}/ejabberd \
  17. SPOOLDIR=${EJDBDIR}
  18. FAKE_FLAGS+= ETCDIR=${PREFIX}/share/examples/ejabberd
  19. AUTOCONF_VERSION = 2.69
  20. AUTOMAKE_VERSION = 1.16
  21. CONFIGURE_STYLE= autoreconf
  22. CONFIGURE_ARGS+= --enable-pgsql \
  23. --enable-mysql \
  24. --disable-sqlite \
  25. --enable-odbc \
  26. --enable-iconv \
  27. --disable-pam \
  28. --disable-tools \
  29. --disable-roster-gateway-workaround \
  30. --enable-mssql
  31. CONFIGURE_ENV+= HOME=${WRKDIST} \
  32. ERL=${MODERL_ERL} \
  33. ERLC=${MODERL_ERLC} \
  34. CFLAGS="-I/usr/local/include" \
  35. LDFLAGS="-L/usr/local/lib" \
  36. ac_cv_header_openssl_md2_h=no
  37. COMPILER= base-clang ports-gcc
  38. BUILD_DEPENDS+= devel/git \
  39. devel/libyaml
  40. LIB_DEPENDS+= devel/libyaml
  41. RUN_DEPENDS= shells/bash
  42. JABBERDUSER= _ejabberd
  43. JABBERDGROUP= _ejabberd
  44. EJDBDIR= ${VARBASE}/db/ejabberd
  45. EJLOGDIR= ${VARBASE}/log/ejabberd
  46. DEPS_VERSIONS= \
  47. BASE64URL_VSN 1.0.1 \
  48. CACHE_TAB_VSN 1.0.30 \
  49. EIMP_VSN 1.0.22 \
  50. EZLIB_VSN 1.0.12 \
  51. FAST_TLS_VSN 1.1.16 \
  52. FAST_XML_VSN 1.1.49 \
  53. FAST_YAML_VSN 1.0.36 \
  54. IDNA_VSN 6.0.0 \
  55. JIFFY_VSN 1.1.1 \
  56. JOSE_VSN 1.11.5 \
  57. MQTREE_VSN 1.0.15 \
  58. P1_ACME_VSN 1.0.22 \
  59. P1_MYSQL_VSN 1.0.21 \
  60. P1_OAUTH2_VSN 0.6.11 \
  61. P1_PGSQL_VSN 1.1.22 \
  62. P1_UTILS_VSN 1.0.25 \
  63. PKIX_VSN 1.0.9 \
  64. STRINGPREP_VSN 1.0.29 \
  65. STUN_VSN 1.2.7 \
  66. UNICODE_UTIL_COMPAT_VSN 0.3.1 \
  67. XMPP_VSN 1.6.2 \
  68. YCONF_VSN 1.0.15
  69. .for _n _v in ${DEPS_VERSIONS}
  70. ${_n} = ${_v}
  71. EJABBERD_${_n:S/_VSN//} = ${_n:S/_VSN//:L}-${_v}
  72. SUBST_VARS += EJABBERD_${_n:S/_VSN//}
  73. .endfor
  74. MODERL_BASEDIR_NOSLASH = ${MODERL_BASEDIR:C/\/$//}
  75. SUBST_VARS += V EJDBDIR EJLOGDIR JABBERDUSER VARBASE MODERL_BASEDIR_NOSLASH
  76. NO_TEST= Yes
  77. post-configure:
  78. # XXX get dependencies via download from github in the fetch phase
  79. cd ${WRKSRC} && ${GMAKE} deps
  80. patch -d "${WRKSRC}" \
  81. <./files/patch_deps_jiffy_c_src_doube-conversion_strtod.cc
  82. patch -d "${WRKSRC}" \
  83. <./files/patch-deps_xmpp_c_src_jid_c
  84. cd ${WRKSRC}/deps/fast_yaml && ${SETENV} ${CONFIGURE_ENV} \
  85. CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
  86. CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
  87. LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
  88. ./configure
  89. post-install:
  90. cd ${WRKDIST}/examples && \
  91. find . -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ejabberd/{} \; && \
  92. find . ! -type d -exec ${SUBST_CMD} -c {} ${PREFIX}/share/examples/ejabberd/{} \;
  93. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ejabberd/sql
  94. cd ${WRKSRC}/sql && \
  95. find . -name '*.sql' -exec ${INSTALL_DATA} {} ${PREFIX}/share/examples/ejabberd/sql/{} \;
  96. chmod o+x ${PREFIX}/sbin/ejabberdctl
  97. .include <bsd.port.mk>