mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-11 00:07:51 +03:00
net-im/ejabberd: add 25.10
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
parent
cfb2131263
commit
00b372964d
@ -6,3 +6,4 @@ DIST ejabberd-24.07-set-ejabberd-opts.patch 1508 BLAKE2B 1692fb54b3aeb9838f057d3
|
|||||||
DIST ejabberd-24.07.tar.gz 2522211 BLAKE2B 32ac7abbbb2acebfc409e93bde097104354664227cac7e1d673f224681900b1dae74aa770141e520c5d4b35a6bc7748f889ab9647cac812f407f7a0ec8da50f9 SHA512 e53c5082c92297ff956b4d811d69ba5b745a1989590e73dc890663cfcdea102e27bafa79452062883a7de8fdf5b5c481d81c68c61a3e888f5e5b668e9ac9bf3c
|
DIST ejabberd-24.07.tar.gz 2522211 BLAKE2B 32ac7abbbb2acebfc409e93bde097104354664227cac7e1d673f224681900b1dae74aa770141e520c5d4b35a6bc7748f889ab9647cac812f407f7a0ec8da50f9 SHA512 e53c5082c92297ff956b4d811d69ba5b745a1989590e73dc890663cfcdea102e27bafa79452062883a7de8fdf5b5c481d81c68c61a3e888f5e5b668e9ac9bf3c
|
||||||
DIST ejabberd-24.10.tar.gz 2532726 BLAKE2B bc59958150f0a3f4bf495ac42d8362c87d9979a57c9ac372826582203b6b3b00bee63897da1f436ab1833bbaa5c49f7da973d07009fb1f27ca5e2f314e955c9c SHA512 dc32e341d5a5cf0c02574b14059ed95feaa8d840080a7c9367186b9a076ab0124df5b54b522732cd9541ed53140cff4024abe8353e91af18abd3c76d69fe9e19
|
DIST ejabberd-24.10.tar.gz 2532726 BLAKE2B bc59958150f0a3f4bf495ac42d8362c87d9979a57c9ac372826582203b6b3b00bee63897da1f436ab1833bbaa5c49f7da973d07009fb1f27ca5e2f314e955c9c SHA512 dc32e341d5a5cf0c02574b14059ed95feaa8d840080a7c9367186b9a076ab0124df5b54b522732cd9541ed53140cff4024abe8353e91af18abd3c76d69fe9e19
|
||||||
DIST ejabberd-25.04.tar.gz 2595583 BLAKE2B 10a5fe57f63a04e454b6eac4c6faa5d24c6b7c3d2afb29ac7667fa8e0ab4af50b35374e33f6428ad06b269815f9ec19f9372596abfd033674b1becb5d230cc74 SHA512 c85b6bed160918b1ad0bc9475b819363c72845301ba2f396a0caed556ebff9d7b1bb378a4141c1b3edf1c2dc2618a28f51456659a4b19162947bdd0b5a0db0e5
|
DIST ejabberd-25.04.tar.gz 2595583 BLAKE2B 10a5fe57f63a04e454b6eac4c6faa5d24c6b7c3d2afb29ac7667fa8e0ab4af50b35374e33f6428ad06b269815f9ec19f9372596abfd033674b1becb5d230cc74 SHA512 c85b6bed160918b1ad0bc9475b819363c72845301ba2f396a0caed556ebff9d7b1bb378a4141c1b3edf1c2dc2618a28f51456659a4b19162947bdd0b5a0db0e5
|
||||||
|
DIST ejabberd-25.10.tar.gz 2701783 BLAKE2B dccedf7fb7c4795c5f522f45eb28d3f3fb6ea46fa25d419299185d6e58c944bad6756d36df28bdf8f57af5900c30818149c7e7fb408c3506e42d1e7a4fca04d1 SHA512 8020c8a5d55bf6b897eeca4aab1bab615ff1b3fca40ee8bd2e5bda0ff10cd0ec09ddd612b65af70639a531c4d77cc4609cf3678697eb47e2cc7e384458a379e5
|
||||||
|
|||||||
207
net-im/ejabberd/ejabberd-25.10.ebuild
Normal file
207
net-im/ejabberd/ejabberd-25.10.ebuild
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit autotools eapi9-ver pam rebar systemd
|
||||||
|
|
||||||
|
DESCRIPTION="Robust, scalable and extensible XMPP server"
|
||||||
|
HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
|
||||||
|
SRC_URI="
|
||||||
|
https://github.com/processone/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~sparc ~x86"
|
||||||
|
REQUIRED_USE="mssql? ( odbc )"
|
||||||
|
# TODO: Add 'tools' flag.
|
||||||
|
IUSE="captcha debug full-xml ldap mssql mysql odbc pam postgres redis
|
||||||
|
roster-gw selinux sip sqlite +stun zlib"
|
||||||
|
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
# TODO: Add dependencies for 'tools' flag enabled.
|
||||||
|
# TODO: tools? (
|
||||||
|
# TODO: >=dev-erlang/luerl-0.3
|
||||||
|
# TODO: )
|
||||||
|
DEPEND="
|
||||||
|
>=dev-lang/erlang-20[odbc?,ssl]
|
||||||
|
>=dev-erlang/cache_tab-1.0.33
|
||||||
|
>=dev-erlang/eimp-1.0.26
|
||||||
|
>=dev-erlang/fast_tls-1.1.25
|
||||||
|
>=dev-erlang/fast_xml-1.1.57
|
||||||
|
>=dev-erlang/fast_yaml-1.0.39
|
||||||
|
>=dev-erlang/yconf-1.0.22
|
||||||
|
>=dev-erlang/jiffy-1.1.1
|
||||||
|
>=dev-erlang/jose-1.11.10
|
||||||
|
>=dev-erlang/lager-3.9.1
|
||||||
|
>=dev-erlang/p1_oauth2-0.6.14
|
||||||
|
>=dev-erlang/p1_utils-1.0.27
|
||||||
|
>=dev-erlang/stringprep-1.0.33
|
||||||
|
>=dev-erlang/xmpp-1.11.2
|
||||||
|
>=dev-erlang/pkix-1.0.10
|
||||||
|
>=dev-erlang/mqtree-1.0.19
|
||||||
|
>=dev-erlang/idna-6.0.0-r1
|
||||||
|
>=dev-erlang/p1_acme-1.0.29
|
||||||
|
>=dev-erlang/base64url-1.0.1
|
||||||
|
ldap? ( =net-nds/openldap-2* )
|
||||||
|
mysql? ( >=dev-erlang/p1_mysql-1.0.25 )
|
||||||
|
odbc? ( dev-db/unixODBC )
|
||||||
|
pam? ( >=dev-erlang/epam-1.0.14 )
|
||||||
|
postgres? ( >=dev-erlang/p1_pgsql-1.1.32 )
|
||||||
|
redis? ( >=dev-erlang/eredis-1.2.0 )
|
||||||
|
sip? ( >=dev-erlang/esip-1.0.59 )
|
||||||
|
sqlite? ( >=dev-erlang/sqlite3-1.1.15 )
|
||||||
|
stun? ( >=dev-erlang/stun-1.2.21 )
|
||||||
|
zlib? ( >=dev-erlang/ezlib-1.0.15 )
|
||||||
|
"
|
||||||
|
RDEPEND="
|
||||||
|
${DEPEND}
|
||||||
|
>=acct-user/ejabberd-2[pam?]
|
||||||
|
captcha? ( media-gfx/imagemagick[truetype,png] )
|
||||||
|
selinux? ( sec-policy/selinux-jabber )
|
||||||
|
"
|
||||||
|
|
||||||
|
DOCS=( CHANGELOG.md README.md )
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/ejabberd-22.10-adjust-ejabberd.service.template-to-Gentoo.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Get path to ejabberd lib directory.
|
||||||
|
#
|
||||||
|
# This is the path ./configure script Base for this path is path set in
|
||||||
|
# ./configure script which is /usr/lib by default. If libdir is explicitely set
|
||||||
|
# to something else than this should be adjusted here as well.
|
||||||
|
get_ejabberd_path() {
|
||||||
|
echo "/usr/$(get_libdir)/${P}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
eautoreconf
|
||||||
|
|
||||||
|
rebar_remove_deps
|
||||||
|
|
||||||
|
# Set paths to ejabberd lib directory consistently to point always to directory
|
||||||
|
# suffixed with version.
|
||||||
|
sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
|
||||||
|
-i "${S}/Makefile.in" \
|
||||||
|
|| die 'failed to set ejabberd path in Makefile.in'
|
||||||
|
|
||||||
|
# Get epam-wrapper from 'files' directory and correct path to lib directory in
|
||||||
|
# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
|
||||||
|
# file exists there already.
|
||||||
|
local epam_wrapper_src="${FILESDIR}/epam-wrapper"
|
||||||
|
local epam_wrapper_dst="${S}/epam-wrapper"
|
||||||
|
[[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
|
||||||
|
sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
|
||||||
|
"${epam_wrapper_src}" >"${epam_wrapper_dst}" \
|
||||||
|
|| die 'failed to install epam-wrapper'
|
||||||
|
|
||||||
|
rebar_fix_include_path fast_xml
|
||||||
|
rebar_fix_include_path p1_utils
|
||||||
|
rebar_fix_include_path xmpp
|
||||||
|
|
||||||
|
# Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
|
||||||
|
# rather than its parent which is default. That way ejabberd directory
|
||||||
|
# takes precedence is module lookup.
|
||||||
|
local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
|
||||||
|
sed -e "s|\(ERL_LIBS=\)'{{libdir}}'\.*|\1${ejabberd_erl_libs}|" \
|
||||||
|
-i "${S}/ejabberdctl.template" \
|
||||||
|
|| die 'failed to set ERL_LIBS in ejabberdctl.template'
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
econf \
|
||||||
|
--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
|
||||||
|
--localstatedir="${EPREFIX}/var" \
|
||||||
|
--enable-user=${PN} \
|
||||||
|
--with-rebar=rebar \
|
||||||
|
$(use_enable debug) \
|
||||||
|
$(use_enable full-xml) \
|
||||||
|
$(use_enable mssql) \
|
||||||
|
$(use_enable mysql) \
|
||||||
|
$(use_enable odbc) \
|
||||||
|
$(use_enable pam) \
|
||||||
|
$(use_enable postgres pgsql) \
|
||||||
|
$(use_enable redis) \
|
||||||
|
$(use_enable roster-gw roster-gateway-workaround) \
|
||||||
|
$(use_enable sqlite) \
|
||||||
|
$(use_enable sip) \
|
||||||
|
$(use_enable stun) \
|
||||||
|
$(use_enable zlib)
|
||||||
|
|
||||||
|
# more options to support
|
||||||
|
# --enable-elixir requires https://github.com/elixir-lang/elixir
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Note that we also add ejabberdctl.example, which will be used by
|
||||||
|
# ejabberd's build system to create /usr/sbin/ejabberdctl, as
|
||||||
|
# target. Otherwise, ejabberdctl.example is due to be created by the
|
||||||
|
# 'install' target (as per upstream's Makefile.in). However when
|
||||||
|
# invoke the 'install' target (in src_install below), DESTDIR is
|
||||||
|
# set, which causes DESTDIR to scope into the ejabberdctl.example
|
||||||
|
# generation.
|
||||||
|
emake REBAR='rebar -v' src ejabberdctl.example ejabberd.service
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
default
|
||||||
|
|
||||||
|
if use pam; then
|
||||||
|
local epam_path="$(get_ejabberd_path)/priv/bin/epam"
|
||||||
|
|
||||||
|
pamd_mimic_system xmpp auth account
|
||||||
|
into "$(get_ejabberd_path)/priv"
|
||||||
|
newbin epam-wrapper epam
|
||||||
|
fi
|
||||||
|
|
||||||
|
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
|
||||||
|
newinitd "${FILESDIR}/${PN}-22.05.initd" "${PN}"
|
||||||
|
systemd_dounit "${PN}.service"
|
||||||
|
|
||||||
|
insinto /etc/logrotate.d
|
||||||
|
newins "${FILESDIR}/${PN}-22.05.logrotate" "${PN}"
|
||||||
|
|
||||||
|
keepdir /var/{lib,log}/ejabberd
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
# Starting with >=21.04-r1, the ejabberd configuration is now in
|
||||||
|
# /etc/ejabberd and no longer in /etc/jabber. See if we need to
|
||||||
|
# migrate the configuration. Furthermore, ejabberd no longer runs
|
||||||
|
# under the, shared via net-im/jabber-base, 'jabber' use, but under
|
||||||
|
# its own user. This increase isolation and hence robustness and
|
||||||
|
# security.
|
||||||
|
if ver_replacing -lt 21.04-r1; then
|
||||||
|
ewarn "Newer versions of the ejabberd Gentoo package use /etc/ejabberd"
|
||||||
|
ewarn "(just as upstream) and *not* /etc/jabber."
|
||||||
|
ewarn "The files from /etc/jabber will now be copied to /etc/ejabberd."
|
||||||
|
ewarn "Also ejabberd's spool directory became /var/lib/ejabberd (was /var/spool/jabber)."
|
||||||
|
ewarn "Please check your configuration, and finish the migration by stopping ejabberd"
|
||||||
|
ewarn "followed by rsync'ing /var/spool/jabber to /var/lib/ejabberd."
|
||||||
|
|
||||||
|
local -A dirs_to_migrate=(
|
||||||
|
[/etc/jabber]=/etc/ejabberd
|
||||||
|
[/var/spool/jabber]=/var/lib/ejabberd
|
||||||
|
)
|
||||||
|
|
||||||
|
for src_dir in "${!dirs_to_migrate[@]}"; do
|
||||||
|
local eroot_src_dir="${EROOT}${src_dir}"
|
||||||
|
local eroot_dst_dir="${EROOT}${dirs_to_migrate[${src_dir}]}"
|
||||||
|
|
||||||
|
cp -r "${eroot_src_dir}"/. "${eroot_dst_dir}" || die "Could not copy ${eroot_src_dir} to ${eroot_dst_dir}"
|
||||||
|
|
||||||
|
if [[ -f "${eroot_dst_dir}"/.keep_net-im_jabber-base-0 ]]; then
|
||||||
|
rm "${eroot_dst_dir}"/.keep_net-im_jabber-base-0 || die
|
||||||
|
fi
|
||||||
|
if ! use prefix; then
|
||||||
|
chown --recursive ejabberd:ejabberd "${eroot_dst_dir}" || die
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user