Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. COMMENT= jabber server written in Erlang
  2. V= 21.12
  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. MODERL_VERSION= 21
  15. MAKE_FLAGS+= EJABBERDDIR=${PREFIX}/lib/ejabberd \
  16. LOGDIR=${EJLOGDIR} \
  17. ETCDIR=${SYSCONFDIR}/ejabberd \
  18. SPOOLDIR=${EJDBDIR}
  19. FAKE_FLAGS+= EJABBERDDIR=${WRKINST}/${PREFIX}/lib/ejabberd \
  20. LOGDIR=${WRKINST}${EJLOGDIR} \
  21. ETCDIR=${WRKINST}/${PREFIX}/share/examples/ejabberd \
  22. SPOOLDIR=${WRKINST}/${EJDBDIR}
  23. AUTOCONF_VERSION = 2.69
  24. AUTOMAKE_VERSION = 1.16
  25. CONFIGURE_STYLE= autoreconf
  26. CONFIGURE_ARGS+= --enable-pgsql \
  27. --enable-mysql \
  28. --disable-sqlite \
  29. --enable-odbc \
  30. --enable-iconv \
  31. --disable-pam \
  32. --disable-tools \
  33. --disable-roster-gateway-workaround \
  34. --enable-mssql
  35. CONFIGURE_ENV+= HOME=${WRKDIST} \
  36. ERL=${MODERL_ERL} \
  37. ERLC=${MODERL_ERLC} \
  38. ac_cv_header_openssl_md2_h=no
  39. BUILD_DEPENDS+= devel/git \
  40. devel/libyaml
  41. LIB_DEPENDS+= devel/libyaml
  42. RUN_DEPENDS= shells/bash
  43. JABBERDUSER= _ejabberd
  44. JABBERDGROUP= _ejabberd
  45. EJDBDIR= /var/db/ejabberd
  46. EJLOGDIR= /var/log/ejabberd
  47. SUBST_VARS= EJDBDIR EJLOGDIR JABBERDUSER
  48. NO_TEST= Yes
  49. post-configure:
  50. cd ${WRKSRC} && ${GMAKE} deps
  51. patch -d "${WRKSRC}" \
  52. <./files/patch_deps_jiffy_c_src_doube-conversion_strtod.cc.patch
  53. patch -d "${WRKSRC}" \
  54. <./files/patch_deps_fast_tls_c_src_fast_tls_c.patch
  55. cd ${WRKSRC}/deps/fast_yaml && ${SETENV} ${CONFIGURE_ENV} \
  56. CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
  57. CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
  58. LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
  59. ./configure
  60. post-install:
  61. cd ${WRKDIST}/examples && \
  62. find . -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ejabberd/{} \; && \
  63. find . ! -type d -exec ${SUBST_CMD} -c {} ${PREFIX}/share/examples/ejabberd/{} \;
  64. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ejabberd/sql
  65. cd ${WRKSRC}/sql && \
  66. find . -name '*.sql' -exec ${INSTALL_DATA} {} ${PREFIX}/share/examples/ejabberd/sql/{} \;
  67. @chmod 755 ${PREFIX}/sbin/ejabberdctl
  68. @chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/doc/ejabberd
  69. @chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/examples/ejabberd
  70. @chmod ${SHAREMODE} ${PREFIX}/share/examples/ejabberd/*.cfg
  71. @find ${WRKINST} -type f -name '*.beforesubst' -exec rm -f {} \;
  72. .include <bsd.port.mk>