Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # $OpenBSD$
  2. COMMENT= jabber server written in Erlang
  3. V= 20.04
  4. CATEGORIES= net
  5. HOMEPAGE= https://www.ejabberd.im/
  6. # GPLv2+
  7. PERMIT_PACKAGE= Yes
  8. GH_ACCOUNT= processone
  9. GH_PROJECT= ejabberd
  10. GH_TAGNAME= ${V}
  11. WANTLIB+= c m ${COMPILER_LIBCXX} crypto expat ssl z
  12. MASTER_SITES0 https://github.com/
  13. MODULES= lang/erlang
  14. MODERL_VERSION= 21
  15. BUILD_DEPENDS= devel/libyaml
  16. MAKE_FLAGS+= EJABBERDDIR=${PREFIX}/lib/ejabberd \
  17. LOGDIR=${EJLOGDIR} \
  18. ETCDIR=${SYSCONFDIR}/ejabberd \
  19. SPOOLDIR=${EJDBDIR}
  20. FAKE_FLAGS+= EJABBERDDIR=${WRKINST}/${PREFIX}/lib/ejabberd \
  21. LOGDIR=${WRKINST}${EJLOGDIR} \
  22. ETCDIR=${WRKINST}/${PREFIX}/share/examples/ejabberd \
  23. SPOOLDIR=${WRKINST}/${EJDBDIR}
  24. AUTOCONF_VERSION = 2.69
  25. AUTOMAKE_VERSION = 1.16
  26. CONFIGURE_STYLE= autoreconf
  27. CONFIGURE_ARGS+= --enable-pgsql \
  28. --enable-mysql \
  29. --disable-sqlite \
  30. --enable-odbc \
  31. --enable-iconv \
  32. --disable-pam \
  33. --disable-tools \
  34. --disable-roster-gateway-workaround \
  35. --enable-mssql
  36. CONFIGURE_ENV+= HOME=${WRKDIST} \
  37. ERL=${MODERL_ERL} \
  38. ERLC=${MODERL_ERLC} \
  39. ac_cv_header_openssl_md2_h=no
  40. BUILD_DEPENDS= devel/git
  41. RUN_DEPENDS= shells/bash
  42. JABBERDUSER= _ejabberd
  43. JABBERDGROUP= _ejabberd
  44. EJDBDIR= /var/db/ejabberd
  45. EJLOGDIR= /var/log/ejabberd
  46. SUBST_VARS= EJDBDIR EJLOGDIR JABBERDUSER
  47. NO_TEST= Yes
  48. post-configure:
  49. cd ${WRKSRC} && ${GMAKE} deps
  50. patch -d "${WRKSRC}" \
  51. <./files/patch_deps_jiffy_c_src_doube-conversion_strtod.cc.patch
  52. cd ${WRKSRC}/deps/fast_yaml && ${SETENV} ${CONFIGURE_ENV} \
  53. CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
  54. CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
  55. LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
  56. ./configure
  57. post-install:
  58. cd ${WRKDIST}/examples && \
  59. find . -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ejabberd/{} \; && \
  60. find . ! -type d -exec ${SUBST_CMD} -c {} ${PREFIX}/share/examples/ejabberd/{} \;
  61. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ejabberd/sql
  62. cd ${WRKSRC}/sql && \
  63. find . -name '*.sql' -exec ${INSTALL_DATA} {} ${PREFIX}/share/examples/ejabberd/sql/{} \;
  64. @chmod 755 ${PREFIX}/sbin/ejabberdctl
  65. @chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/doc/ejabberd
  66. @chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/examples/ejabberd
  67. @chmod ${SHAREMODE} ${PREFIX}/share/examples/ejabberd/*.cfg
  68. @find ${WRKINST} -type f -name '*.beforesubst' -exec rm -f {} \;
  69. .include <bsd.port.mk>