You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
2.2 KiB
104 lines
2.2 KiB
4 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
|
||
3 years ago
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/alexbarton.asc
|
||
|
inherit verify-sig
|
||
4 years ago
|
|
||
|
DESCRIPTION="An IRC server written from scratch"
|
||
|
HOMEPAGE="https://ngircd.barton.de/"
|
||
|
SRC_URI="https://arthur.barton.de/pub/${PN}/${P}.tar.gz"
|
||
3 years ago
|
SRC_URI+=" verify-sig? ( https://arthur.barton.de/pub/${PN}/${P}.tar.gz.sig )"
|
||
4 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
4 years ago
|
KEYWORDS="amd64 ~arm arm64 x86 ~x64-macos"
|
||
3 years ago
|
IUSE="debug gnutls ident irc-plus +ipv6 pam +ssl strict-rfc tcpd test zlib"
|
||
4 years ago
|
|
||
|
# Flaky test needs investigation (bug 719256)
|
||
|
RESTRICT="test"
|
||
|
|
||
|
RDEPEND="
|
||
|
acct-user/ngircd
|
||
|
acct-group/ngircd
|
||
|
irc-plus? ( virtual/libiconv )
|
||
|
ident? ( net-libs/libident )
|
||
|
pam? ( sys-libs/pam )
|
||
|
ssl? (
|
||
|
gnutls? ( net-libs/gnutls:= )
|
||
|
!gnutls? (
|
||
3 years ago
|
dev-libs/openssl:0=
|
||
4 years ago
|
)
|
||
|
)
|
||
|
tcpd? ( sys-apps/tcp-wrappers )
|
||
|
zlib? ( sys-libs/zlib )
|
||
|
"
|
||
4 years ago
|
DEPEND="${RDEPEND}"
|
||
|
BDEPEND="
|
||
|
sys-devel/automake:1.11
|
||
4 years ago
|
test? (
|
||
|
dev-tcltk/expect
|
||
|
net-misc/netkit-telnetd
|
||
|
)
|
||
3 years ago
|
verify-sig? ( app-crypt/openpgp-keys-alexbarton )
|
||
4 years ago
|
"
|
||
|
|
||
|
src_prepare() {
|
||
|
default
|
||
|
|
||
4 years ago
|
if ! use prefix ; then
|
||
4 years ago
|
sed -i \
|
||
|
-e "s:;ServerUID = 65534:ServerUID = ngircd:" \
|
||
|
-e "s:;ServerGID = 65534:ServerGID = ngircd:" \
|
||
|
doc/sample-ngircd.conf.tmpl || die
|
||
|
fi
|
||
|
|
||
3 years ago
|
# Note that if we need to use automake, we need a certain version (for now):
|
||
|
# https://github.com/ngircd/ngircd/issues/261
|
||
|
# eautomake
|
||
4 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
4 years ago
|
local myeconf=(
|
||
|
--sysconfdir="${EPREFIX}"/etc/${PN}
|
||
4 years ago
|
$(use_enable debug sniffer)
|
||
|
$(use_enable debug)
|
||
|
$(use_enable irc-plus ircplus)
|
||
|
$(use_enable ipv6)
|
||
|
$(use_enable strict-rfc)
|
||
|
$(use_with irc-plus iconv)
|
||
|
$(use_with ident)
|
||
|
$(use_with pam)
|
||
|
$(use_with tcpd tcp-wrappers)
|
||
|
$(use_with zlib)
|
||
|
)
|
||
|
|
||
4 years ago
|
if use ssl ; then
|
||
|
if use gnutls ; then
|
||
3 years ago
|
myeconf+=(
|
||
4 years ago
|
$( use_with gnutls )
|
||
|
)
|
||
|
else
|
||
3 years ago
|
myeconf+=(
|
||
4 years ago
|
$( use_with !gnutls openssl )
|
||
|
)
|
||
|
fi
|
||
|
fi
|
||
|
|
||
4 years ago
|
econf "${myeconf[@]}"
|
||
4 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
default
|
||
4 years ago
|
|
||
4 years ago
|
newinitd "${FILESDIR}"/ngircd.init-r1.d ngircd
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
4 years ago
|
if [[ -z ${REPLACING_VERSIONS} ]] && use pam ; then
|
||
4 years ago
|
elog "ngircd will use PAMIsOptionalPAM by default, please change this option."
|
||
|
elog "You may not be able to login until you change this."
|
||
|
fi
|
||
|
}
|