summaryrefslogtreecommitdiff
path: root/net-irc/unrealircd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-irc/unrealircd
reinit the tree, so we can have metadata
Diffstat (limited to 'net-irc/unrealircd')
-rw-r--r--net-irc/unrealircd/Manifest12
-rw-r--r--net-irc/unrealircd/files/unrealircd-4.0.12-without-privatelibdir.patch70
-rw-r--r--net-irc/unrealircd/files/unrealircd.confd-r131
-rw-r--r--net-irc/unrealircd/files/unrealircd.confd-r235
-rw-r--r--net-irc/unrealircd/files/unrealircd.initd43
-rw-r--r--net-irc/unrealircd/files/unrealircd.initd-r143
-rw-r--r--net-irc/unrealircd/metadata.xml19
-rw-r--r--net-irc/unrealircd/unrealircd-3.2.10.7.ebuild212
-rw-r--r--net-irc/unrealircd/unrealircd-4.0.12.ebuild249
9 files changed, 714 insertions, 0 deletions
diff --git a/net-irc/unrealircd/Manifest b/net-irc/unrealircd/Manifest
new file mode 100644
index 000000000000..52b20ddf97e0
--- /dev/null
+++ b/net-irc/unrealircd/Manifest
@@ -0,0 +1,12 @@
+AUX unrealircd-4.0.12-without-privatelibdir.patch 3050 SHA256 b0443d36ed2766338ada74d019c8ed7d31dd3c6ecfe642d3732423d522a1a3a5 SHA512 f9bba46daa399bbcebc4b89ed129b270c1eaad3a7e2c573d20567b055fffd8185a987a6f394b35cb0f9e95288aacb73c201e9162b940fccf170c51e04bc72be7 WHIRLPOOL 15f5bb6d5e89366511252491d9b7b73fe5ec6137699f19fbc8f8765e6eefeeb0cb655f62e787fceb8215679406beb337075f23a0161bd53706f61c3646ac9e2b
+AUX unrealircd.confd-r1 1221 SHA256 564f7de762b2a2bc0d1e145378b8cc5aa9f3c35ad89438dcba5b8d333d477fbf SHA512 add347151035f8bef7fa77d8b675563c5308e39a7e1f6ce9c044fa1e38c5d2e662327d90b91fe9bb7e23fed3337db9c497c7275688048cbd12116f98e43ba94d WHIRLPOOL 2d704a6b050db7981c7a6bbb8fcde9686a4befab9d7bae41792e02b2bbd7c767e9a175a78f3274f9bb73cec02407d1b5b1c47d388153eb0bb06cfc870a5fe418
+AUX unrealircd.confd-r2 1366 SHA256 7e79ca209a70fae1cf795bfa92f23f18d24aa1af8b33e0c8b56332a5399d2cb1 SHA512 7282da5b2d07e139bd579ce0012dd4a02b02b88e8f12bdf83e6742f8d221ee78568c5652933a065642561fca5902b256b10c61d5add3e4c587d4b4ac089751a4 WHIRLPOOL db1a4d44cb71248b69761712e0916e909bcdb288632a3a86e9f13a09410508b68582d0c70dd251f958547bbfe926d765d139661c94f43f0d6fbefe3ce78e1cd9
+AUX unrealircd.initd 1139 SHA256 0bc94a8558f6cbdf946e7004367033820305db23d23d85caa2c823f6ccb1e7f1 SHA512 694230ad52450642d212aa88ad0d2c999a166b23bbbe44c07fd2574b29bc541cc727a75b8aeec41ca67bdb3125f04271bef9161ebaff409d161a2f47f15839da WHIRLPOOL 1fdf40f2402d630d7ef87b750840c0f9a18e8d2d7da25e8f95eed818d69aa94cf9f9d186fa0ae93dfa54f8cfe3760cc2880f59960801c9a126e3cdb0e2cef6d6
+AUX unrealircd.initd-r1 1180 SHA256 7726b05b21ffa533b5cad450b90acedaa7a5b363cc0b8b89a956ee3a9545a1d4 SHA512 108bfe0a79e7d25ee9d24980c9082d3ddf75d095d122576974319b68f5bebdcb088961276038ddfdb30aadbdfd5f7e247f61444675964604430c4092e517004f WHIRLPOOL 759514b98da183e26dee21359c4c9e25f8a62a4e1f0d08c218207d2eeb3424631c5faf0653d7c385b08ee78eb46236a9bdc6904e28344ecdbbafe891c00aa977
+DIST Unreal3.2.10.7.tar.gz 3539026 SHA256 472e12cd42d2e725a1795e2bead4786062775782bd015a07697c2edf400d4047 SHA512 7d5fd4729fdde56c6b3e38a93bc365857b5b4faf58cb39e844b43e87872623abc7527025247eeda8c8535576e2b1b8ef14d482c964ce940cafb5de77cc9e1667 WHIRLPOOL 48c578ba12a36ab8078b5569d5de05134699218a6265591aa9ce80614015d96c76624eda17c42b7301379ebbd48e1ea1a62360b624e1d482cbdae562905a95a2
+DIST unrealircd-4.0.12.tar.gz 5521686 SHA256 db82848fef9ccc2e97ee4decf0167118554d7d5ce396c8e2c902229e6b19ffe8 SHA512 3df18e07226673d76977771f91f0f6c2129955523f1330519e5cada7989c8987382d78770c95837d520737796cf4fa84f1de3eb0f08ef017c5c56f775cf45420 WHIRLPOOL 75a8a6a93dd82fdf3da5ff35b6c8554f1ec47b445714197b96ba49d3a3b09f2f995acb2c380e51434d84c681f92699d8227ebacfe6f6cdf72dc667c2ae612324
+EBUILD unrealircd-3.2.10.7.ebuild 6581 SHA256 7f902580144def026a04acd50261e8da317210bed95a21fcdc9be79f951938a0 SHA512 8bfbea36317e3984c4768e03f236d5a3bfbe5cc73d8d74798e80633cb9b4946489a8197bc7bacb1649f2d8cbea702c5cd6acb96645e97e89197d697f78eced89 WHIRLPOOL dd69a20c991c0dd2d2a955dfd29e7f5a41161debfc4e2f0d92928fa538cef3ae7ee713c07bf3423fdd7996d29c9e2c4e966fcea4e477e24ac9cbc89f164ddec9
+EBUILD unrealircd-4.0.12.ebuild 7879 SHA256 345a516e43c02b8b1e6c9ea7a855783b4c6a0df10c3477eb9970e1861b6f774c SHA512 c3b1cbb3276ae0e8a5601989b3c65d49f7628926616cb0806fc8b0cc9588a942ffd3b0740bd7380f784960ed36f9ee3e0a5674d60099ef4fc8aa0963428be2fc WHIRLPOOL 9a018f718eaf243f23e6e19c481b7fb31aef90752d3acd3708cae464e74b1ded37c8ce673796d77f86bc89ac75046c552b7514800b510832acb9f48d32f77fe2
+MISC ChangeLog 5872 SHA256 2f2f46c53043821f7cf6e0b0a26162712c76e496fd873e08f8f1e897e162d22b SHA512 8266a5a255addb0676f14058b58aa3d29bda68bbf6af327fa3d8b05d2eeae604e65dd48aa7cb265aea3595c9014fb3da91930a4cf806b0f79be23b838d263378 WHIRLPOOL 321916b64d5a946350f3e822366e94d0c0f86b50cbd5b1f2847809039ecbdf0441c7811e34cef130b03c5dc718f68fc4fd68d8d3dd7cfec17e322e3d61b11c44
+MISC ChangeLog-2015 18619 SHA256 63aae9569daf4d6cea99e1d764527df2c421e6ba0ea56f671fb14f5bd6606943 SHA512 4eaa21245bcc76a6ec5c5768f4601a34a0c8116caf7c03795b81fa93359495efab8ab47f982cca3553274eb2a15301f28da94ad84a26193c424a2d79d60318e6 WHIRLPOOL f20360ede3f0ed9505ba7401e87c0011061bd118658122f15dc435d15259a31ae79016d03bc12d22d65d953aa05f6f9de2cc972b142b80f60b9e3b959a74d4eb
+MISC metadata.xml 1164 SHA256 b0a17fb071c8859fc490e2e8f380ad24360c52927cce76ebb9c87f795baf94db SHA512 159dd553222a3ef8a9d50b11fe5e3489e9778ddc6ceec1b1381b833f6f0af32eefbf3314fd983b0bbd06bc949cbbdeeae94fa2dce97df556c0f20541df30dc4e WHIRLPOOL 2b42edb49e7822b58f82ebb2ae03f947c214c0bf4604d8f07de88b1d2a7cfca4c7f432bd39473c345c6bbe78b9a81ea6ccb2b9c79a5fa16e1aa4ed9263baefc6
diff --git a/net-irc/unrealircd/files/unrealircd-4.0.12-without-privatelibdir.patch b/net-irc/unrealircd/files/unrealircd-4.0.12-without-privatelibdir.patch
new file mode 100644
index 000000000000..03b7a7a0eb2c
--- /dev/null
+++ b/net-irc/unrealircd/files/unrealircd-4.0.12-without-privatelibdir.patch
@@ -0,0 +1,70 @@
+From 2b94733cbe0161b58084a2e7a26985e6d321e1c8 Mon Sep 17 00:00:00 2001
+From: Nathan Phillip Brink <binki@gentoo.org>
+Date: Thu, 6 Jul 2017 06:04:18 +0000
+Subject: [PATCH] Support --without-privatelibdir for packagers.
+
+---
+ configure.ac | 22 +++++++++++++---------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 78360df..aa49df5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -586,15 +586,19 @@ AC_ARG_WITH(pidfile, [AS_HELP_STRING([--with-pidfile=path],[Specify the path of
+ [AC_DEFINE_UNQUOTED([PIDFILE], ["$HOME/unrealircd/data/unrealircd.pid"], [Define the path of the pid file])
+ PIDFILE="$HOME/unrealircd/data/unrealircd.pid"])
+
+-LDFLAGS_PRIVATELIBS=""
+-AC_ARG_WITH(privatelibdir, [AS_HELP_STRING([--with-privatelibdir=path],[Specify the directory where private libraries are stored])],
+- [AC_DEFINE_UNQUOTED([PRIVATELIBDIR], ["$withval"], [Define the location of private libraries])
+- PRIVATELIBDIR="$withval"
+- LDFLAGS_PRIVATELIBS="-Wl,-rpath=$PRIVATELIBDIR"
+- LDFLAGS="$LDFLAGS $LDFLAGS_PRIVATELIBS"
+- export LDFLAGS],
+- [AC_DEFINE_UNQUOTED([PRIVATELIBDIR], ["$HOME/unrealircd/lib"], [Define the location of private libraries])
+- PRIVATELIBDIR="$HOME/unrealircd/lib"
++dnl Ensure that this “feature” can be disabled as it makes it harder to package unrealircd.
++dnl Users have always been able to specify “./configure LDFLAGS=-Wl,-rpath,/path/to/blah”—binki
++AC_ARG_WITH(privatelibdir, [AS_HELP_STRING([--with-privatelibdir=path],[Specify the directory where private libraries are stored. Disable when building a package for a distro])],
++ [],
++ [with_privatelibdir="yes"])
++AS_IF([test "x$with_privatelibdir" = "xno"],
++ [PRIVATELIBDIR=],
++ [test "x$with_privatelibdir" = "xyes"],
++ [PRIVATELIBDIR="$HOME/unrealircd/lib"],
++ [PRIVATELIBDIR="$with_privatelibdir"])
++AS_IF([test "x$PRIVATELIBDIR" = "x"],
++ [LDFLAGS_PRIVATELIBS=""],
++ [AC_DEFINE_UNQUOTED([PRIVATELIBDIR], ["$PRIVATELIBDIR"], [Define the location of private libraries])
+ LDFLAGS_PRIVATELIBS="-Wl,-rpath=$PRIVATELIBDIR"
+ LDFLAGS="$LDFLAGS $LDFLAGS_PRIVATELIBS"
+ export LDFLAGS])
+--
+2.4.6
+
+From 6591e6bcee0858b7cddf6fcfee7dbe04ae511169 Mon Sep 17 00:00:00 2001
+From: Nathan Phillip Brink <binki@gentoo.org>
+Date: Thu, 6 Jul 2017 06:43:20 +0000
+Subject: [PATCH] Do not try to delete libcares when not using PRIVATELIBDIR.
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index aa49df5..874d58f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -786,7 +786,7 @@ dnl Use system c-ares when available, unless --without-system-cares.
+ has_system_cares="no"
+ AS_IF([test "x$with_system_cares" = "xyes"],[
+ PKG_CHECK_MODULES([CARES], libcares >= 1.6.0,[has_system_cares=yes
+-rm -f "$PRIVATELIBDIR/"libcares*],[has_system_cares=no])])
++AS_IF([test "x$PRIVATELIBDIR" != "x"], [rm -f "$PRIVATELIBDIR/"libcares*])],[has_system_cares=no])])
+
+ AS_IF([test "$has_system_cares" = "no"], [
+ dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
+--
+2.4.6
+
diff --git a/net-irc/unrealircd/files/unrealircd.confd-r1 b/net-irc/unrealircd/files/unrealircd.confd-r1
new file mode 100644
index 000000000000..9b4f7b632c27
--- /dev/null
+++ b/net-irc/unrealircd/files/unrealircd.confd-r1
@@ -0,0 +1,31 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# user to run unrealircd as
+UNREALIRCD_USER="unrealircd"
+
+# Which configuration file to load instead of unrealircd.conf. If you
+# want to run multiple instances of unrealircd, you must edit
+# files::pidfile to match UNREALIRCD_PIDFILE. You should also ensure
+# that files::tunefile is different for each unrealircd instance. See
+# http://unrealircd.org/docs.php#filesblock.
+#
+# To support multiple instances of unrealircd, you may create symlinks
+# in /etc/init.d pointing to /etc/init.d/unrealircd. It is recommended
+# that the scheme unrealircd.${instance_name} be used. For each
+# instance, you may make a copy of this file with the appropriate name
+# to override default options specific to that instance.
+UNREALIRCD_CONF="/etc/unrealircd/${SVCNAME}.conf"
+
+# The path where unrealircd is configured to create its pidfile.
+UNREALIRCD_PIDFILE="/var/run/unrealircd/${SVCNAME#unreal}.pid"
+
+# extra options to pass to unrealircd ...
+# You should not specify the -f option here; use
+# UNREALIRCD_CONF instead.
+#
+# [-h servername]
+# [-p portnumber]
+# [-x loglevel]
+# [-t] (to enable debug output)
+UNREALIRCD_OPTS=""
diff --git a/net-irc/unrealircd/files/unrealircd.confd-r2 b/net-irc/unrealircd/files/unrealircd.confd-r2
new file mode 100644
index 000000000000..ac7db3dbf000
--- /dev/null
+++ b/net-irc/unrealircd/files/unrealircd.confd-r2
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# user to run unrealircd as
+UNREALIRCD_USER="unrealircd"
+
+# Which configuration file to load instead of unrealircd.conf. If you
+# want to run multiple instances of unrealircd, you must edit
+# files::pidfile to match UNREALIRCD_PIDFILE. You should also ensure
+# that files::tunefile is different for each unrealircd instance. See
+# https://www.unrealircd.org/docs/Configuration#Files_block
+#
+# To support multiple instances of unrealircd, you may create symlinks
+# in /etc/init.d pointing to /etc/init.d/unrealircd. It is recommended
+# that the scheme unrealircd.${instance_name} be used. For each
+# instance, you may make a copy of this file with the appropriate name
+# to override default options specific to that instance.
+UNREALIRCD_CONF="/etc/unrealircd/${SVCNAME}.conf"
+
+# The path where unrealircd is configured to create its pidfile.
+UNREALIRCD_PIDFILE="/var/run/unrealircd/${SVCNAME#unreal}.pid"
+
+# extra options to pass to unrealircd ...
+# You should not specify the -f option here; use
+# UNREALIRCD_CONF instead.
+#
+# [-h servername]
+# [-p portnumber]
+# [-x loglevel]
+# [-t] (to enable debug output)
+UNREALIRCD_OPTS=""
+
+# Extra flags to pass to start-stop-daemon. When initially
+# debugging, removing --quiet may help.
+UNREALIRCD_SSD_OPTS="--quiet"
diff --git a/net-irc/unrealircd/files/unrealircd.initd b/net-irc/unrealircd/files/unrealircd.initd
new file mode 100644
index 000000000000..cc4cd50e49db
--- /dev/null
+++ b/net-irc/unrealircd/files/unrealircd.initd
@@ -0,0 +1,43 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+# Defaults
+: ${UNREALIRCD_USER:=unrealircd}
+: ${UNREALIRCD_CONF:=/etc/unrealircd/${SVCNAME}.conf}
+: ${UNREALIRCD_PIDFILE:=/var/run/unrealircd/${SVCNAME#unreal}.pid}
+
+depend() {
+ use dns net
+ provide ircd
+}
+
+start() {
+ UNREALIRCD_PIDFILEDIR=${UNREALIRCD_PIDFILE%/*}
+ if ! [ -d "${UNREALIRCD_PIDFILEDIR}" ]; then
+ ebegin "Creating ${UNREALIRCD_PIDFILEDIR} for ${SVCNAME}"
+ mkdir "${UNREALIRCD_PIDFILEDIR}" \
+ && chown :unrealircd "${UNREALIRCD_PIDFILEDIR}" \
+ && chmod 770 "${UNREALIRCD_PIDFILEDIR}"
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/bin/unrealircd \
+ --user ${UNREALIRCD_USER} --pidfile "${UNREALIRCD_PIDFILE}" -- -f "${UNREALIRCD_CONF}" ${UNREALIRCD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile "${UNREALIRCD_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --quiet --pidfile "${UNREALIRCD_PIDFILE}"
+ eend $?
+}
diff --git a/net-irc/unrealircd/files/unrealircd.initd-r1 b/net-irc/unrealircd/files/unrealircd.initd-r1
new file mode 100644
index 000000000000..0c54752779fe
--- /dev/null
+++ b/net-irc/unrealircd/files/unrealircd.initd-r1
@@ -0,0 +1,43 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+# Defaults
+: ${UNREALIRCD_USER:=unrealircd}
+: ${UNREALIRCD_CONF:=/etc/unrealircd/${SVCNAME}.conf}
+: ${UNREALIRCD_PIDFILE:=/run/unrealircd/${SVCNAME#unreal}.pid}
+
+depend() {
+ use dns net
+ provide ircd
+}
+
+start() {
+ UNREALIRCD_PIDFILEDIR=${UNREALIRCD_PIDFILE%/*}
+ if ! [ -d "${UNREALIRCD_PIDFILEDIR}" ]; then
+ ebegin "Creating ${UNREALIRCD_PIDFILEDIR} for ${SVCNAME}"
+ mkdir "${UNREALIRCD_PIDFILEDIR}" \
+ && chown :unrealircd "${UNREALIRCD_PIDFILEDIR}" \
+ && chmod 770 "${UNREALIRCD_PIDFILEDIR}"
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start ${UNREALIRCD_SSD_OPTS} --exec /usr/bin/unrealircd \
+ --user ${UNREALIRCD_USER} --pidfile "${UNREALIRCD_PIDFILE}" -- -f "${UNREALIRCD_CONF}" ${UNREALIRCD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop ${UNREALIRCD_SSD_OPTS} --pidfile "${UNREALIRCD_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP ${UNREALIRCD_SSD_OPTS} --pidfile "${UNREALIRCD_PIDFILE}"
+ eend $?
+}
diff --git a/net-irc/unrealircd/metadata.xml b/net-irc/unrealircd/metadata.xml
new file mode 100644
index 000000000000..da5a1bf0ee91
--- /dev/null
+++ b/net-irc/unrealircd/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>binki@gentoo.org</email>
+ <name>Nathan Phillip Brink</name>
+ </maintainer>
+ <use>
+ <flag name="class-nofakelag">Enable an unsupported class::options flag called “nofakelag” allowing you to grant fakelag exemption to normal user (instead of just opers).</flag>
+ <flag name="extban-stacking">Enable extended channel bans (such as +b ~c: and +b ~n:) to contain other extended bans instead of just hostmasks.</flag>
+ <flag name="prefixaq">Enable chanadmin and chanowner prefixes</flag>
+ <flag name="showlistmodes">Display channel modes in /LIST (only configured at compiletime)</flag>
+ <flag name="operoverride-verify">Enable requiring opers to invite themselves to +s/+p channels</flag>
+ <flag name="operoverride">Enable OperOverride extension</flag>
+ <flag name="usermod">Enable /set* and /chg* commands</flag>
+ <flag name="shunnotices">Enable notifying a user when un-shunned</flag>
+ <flag name="topicisnuhost">Enable displaying nick!user@host as topic setter</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-irc/unrealircd/unrealircd-3.2.10.7.ebuild b/net-irc/unrealircd/unrealircd-3.2.10.7.ebuild
new file mode 100644
index 000000000000..e63246f588c2
--- /dev/null
+++ b/net-irc/unrealircd/unrealircd-3.2.10.7.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils ssl-cert versionator multilib user
+
+MY_P=Unreal${PV/_/-}
+
+DESCRIPTION="An advanced Internet Relay Chat daemon"
+HOMEPAGE="http://www.unrealircd.com/"
+SRC_URI="http://www.unrealircd.com/downloads/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd ~amd64-linux"
+IUSE="class-nofakelag curl ipv6 +extban-stacking +operoverride operoverride-verify +prefixaq
+ showlistmodes shunnotices ssl topicisnuhost +usermod zlib"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ zlib? ( sys-libs/zlib )
+ curl? ( net-misc/curl[adns] )
+ dev-libs/tre
+ >=net-dns/c-ares-1.7"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4
+ virtual/pkgconfig"
+
+S=${WORKDIR}/Unreal${PV}
+
+pkg_setup() {
+ enewuser unrealircd
+}
+
+src_prepare() {
+ # QA check against bundled pkgs
+ rm extras/*.gz || die
+
+ sed -i \
+ -e "s:ircd\.pid:${EPREFIX}/var/run/unrealircd/ircd.pid:" \
+ -e "s:ircd\.log:${EPREFIX}/var/log/unrealircd/ircd.log:" \
+ -e "s:debug\.log:${EPREFIX}/var/log/unrealircd/debug.log:" \
+ -e "s:ircd\.tune:${EPREFIX}/var/lib/unrealircd/ircd.tune:" \
+ include/config.h \
+ || die "sed failed"
+
+ if use class-nofakelag; then
+ sed -i -e 's:#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die
+ fi
+}
+
+src_configure() {
+ econf \
+ --with-listen=5 \
+ --with-dpath="${EPREFIX}"/etc/unrealircd \
+ --with-spath="${EPREFIX}"/usr/bin/unrealircd \
+ --with-nick-history=2000 \
+ --with-sendq=3000000 \
+ --with-bufferpool=18 \
+ --with-permissions=0600 \
+ --with-fd-setsize=1024 \
+ --with-system-cares \
+ --with-system-tre \
+ --enable-dynamic-linking \
+ $(use_enable curl libcurl "${EPREFIX}"/usr) \
+ $(use_enable ipv6 inet6) \
+ $(use_enable prefixaq) \
+ $(use_enable ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable zlib ziplinks "${EPREFIX}"/usr) \
+ $(use_with showlistmodes) \
+ $(use_with topicisnuhost) \
+ $(use_with shunnotices) \
+ $(use_with !operoverride no-operoverride) \
+ $(use_with operoverride-verify) \
+ $(use_with !usermod disableusermod) \
+ $(use_with !extban-stacking disable-extendedban-stacking)
+}
+
+src_install() {
+ keepdir /var/{lib,log}/unrealircd
+
+ newbin src/ircd unrealircd
+
+ exeinto /usr/$(get_libdir)/unrealircd/modules
+ doexe src/modules/*.so
+
+ dodir /etc/unrealircd
+ dosym /var/lib/unrealircd /etc/unrealircd/tmp
+
+ insinto /etc/unrealircd
+ doins {badwords.*,help,spamfilter,dccallow}.conf
+ newins doc/example.conf unrealircd.conf
+
+ insinto /etc/unrealircd/aliases
+ doins aliases/*.conf
+
+ local so_suffix=so
+ [[ ${CHOST} == -*mingw* ]] && so_suffix=dll
+ sed -i \
+ -e s:src/modules:"${EPREFIX}"/usr/$(get_libdir)/unrealircd/modules: \
+ -e '/loadmodule.*\.'${so_suffix}'/s;^//;;' \
+ -e s:ircd\\.log:"${EPREFIX}"/var/log/unrealircd/ircd.log: \
+ "${ED}"/etc/unrealircd/unrealircd.conf \
+ || die
+
+ dodoc \
+ Changes Donation Unreal.nfo \
+ ircdcron/{ircd.cron,ircdchk} \
+ || die "dodoc failed"
+ dohtml doc/*.html
+
+ newinitd "${FILESDIR}"/unrealircd.initd unrealircd
+ newconfd "${FILESDIR}"/unrealircd.confd-r1 unrealircd
+
+ # config should be read-only
+ fperms -R 0640 /etc/unrealircd{,/aliases}
+ fperms 0750 /etc/unrealircd{,/aliases}
+ # state is editable but not owned by unrealircd directly
+ fperms 0770 /var/{lib,log}/unrealircd
+ fowners -R root:unrealircd /{etc,var/{lib,log}}/unrealircd
+}
+
+pkg_preinst() {
+ # Must pre-create directories; otherwise their permissions are lost
+ # on installation.
+
+ # Usage: _unrealircd_dir_permissions <user> <group> <mode> <dir>[, <dir>…]
+ #
+ # Ensure that directories are created with the correct permissions
+ # before portage tries to merge them to the filesystem because,
+ # otherwise, those directories are installed world-readable.
+ #
+ # If this is a first-time install, create those directories with
+ # correct permissions before installing. Otherwise, update
+ # permissions—but only if we are replacing an unrealircd ebuild at
+ # least as old as net-irc/unrealircd-3.2.10. Portage handles normal
+ # file permissions correctly, so no need for recursive
+ # chmoding/chowning.
+ _unrealircd_dir_permissions() {
+ local user=${1} group=${2} mode=${3} dir v
+ shift 3
+ while dir=${1} && shift; do
+ if [[ ! -d "${EROOT}${dir}" ]]; then
+ ebegin "Creating ${EROOT}${dir} with correct permissions"
+ install -d -m "${mode}" -o "${user}" -g "${group}" "${EROOT}${dir}" || die
+ eend ${?}
+ elif ! [[ ${REPLACING_VERSIONS} ]] || for v in ${REPLACING_VERSIONS}; do
+ # If 3.2.10 ≤ ${REPLACING_VERSIONS}, then we update
+ # existing permissions.
+ version_is_at_least "${v}" 3.2.10 && break
+ done; then
+ ebegin "Correcting permissions of ${EROOT}${dir} left by ${CATEGORY}/${PN}-${v}"
+ chmod "${mode}" "${EROOT}${dir}" \
+ && chown ${user}:${group} "${EROOT}${dir}" \
+ || die "Unable to correct permissions of ${EROOT}${dir}"
+ eend ${?}
+ fi
+ done
+ }
+
+ # unrealircd only needs to be able to read files in /etc/unrealircd.
+ _unrealircd_dir_permissions root unrealircd 0750 etc/unrealircd{,/aliases}
+
+ # unrealircd needs to be able to create files in /var/lib/unrealircd
+ # and /var/log/unrealircd.
+ _unrealircd_dir_permissions root unrealircd 0770 var/{lib,log}/unrealircd
+}
+
+pkg_postinst() {
+ # Move docert call from scr_install() to install_cert in pkg_postinst for
+ # bug #201682
+ if use ssl ; then
+ if [[ ! -f "${EROOT}"/etc/unrealircd/server.cert.key ]]; then
+ install_cert /etc/unrealircd/server.cert
+ chown unrealircd "${EROOT}"/etc/unrealircd/server.cert.*
+ chmod 0640 "${EROOT}"/etc/unrealircd/server.cert.*
+ ln -snf server.cert.key "${EROOT}"/etc/unrealircd/server.key.pem
+ fi
+ fi
+
+ local unrealircd_conf="${EROOT}"/etc/unrealircd/unrealircd.conf
+ # Fix up the default cloak keys.
+ if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then
+ ebegin "Generating cloak-keys"
+ local keys=(
+ $(unrealircd -k 2>&1 | tail -n 3)
+ )
+ [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]]
+ eend $?
+
+ ebegin "Substituting cloak-keys into ${unrealircd_conf}"
+ sed -i \
+ -e '/cloak-keys/ {
+n
+s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/
+n
+s/"and another one";/"'"${keys[1]}"'";/
+n
+s/"and another one";/"'"${keys[2]}"'";/
+}' \
+ "${unrealircd_conf}"
+ eend $?
+ fi
+
+ elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf"
+ elog
+ elog "You can find example cron scripts here:"
+ elog " /usr/share/doc/${PF}/ircd.cron.gz"
+ elog " /usr/share/doc/${PF}/ircdchk.gz"
+ elog
+ elog "You can also use /etc/init.d/unrealircd to start at boot"
+}
diff --git a/net-irc/unrealircd/unrealircd-4.0.12.ebuild b/net-irc/unrealircd/unrealircd-4.0.12.ebuild
new file mode 100644
index 000000000000..d5cab32b8f78
--- /dev/null
+++ b/net-irc/unrealircd/unrealircd-4.0.12.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+SSL_CERT_MANDATORY=1
+inherit autotools eutils ssl-cert versionator multilib user
+
+DESCRIPTION="An advanced Internet Relay Chat daemon"
+HOMEPAGE="https://www.unrealircd.org/"
+SRC_URI="https://www.unrealircd.org/${PN}$(get_version_component_range 1)/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd ~amd64-linux"
+IUSE="class-nofakelag curl +extban-stacking +operoverride operoverride-verify +prefixaq
+ showlistmodes shunnotices topicisnuhost +usermod"
+
+RDEPEND="dev-libs/openssl:=
+ curl? ( net-misc/curl[adns] )
+ dev-libs/libpcre2
+ dev-libs/tre
+ >=net-dns/c-ares-1.7"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ version_is_at_least 4 "${v}" && continue
+ ewarn "The configuration file format has changed since ${v}."
+ ewarn "Please be prepared to manually update them and visit:"
+ ewarn "https://www.unrealircd.org/docs/Upgrading_from_3.2.x"
+ break
+ done
+}
+
+pkg_setup() {
+ enewuser unrealircd
+}
+
+src_prepare() {
+ # QA check against bundled pkgs
+ rm -r extras || die
+
+ if use class-nofakelag; then
+ sed -i -e 's:#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die
+ fi
+
+ # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix
+ # that to look for ca-certificates-provided file instead. %s is
+ # CONFDIR. #618066
+ sed -i -e 's:%s/ssl/curl-ca-bundle.crt:%s/../ssl/certs/ca-certificates.crt:' src/s_conf.c || die
+
+ epatch "${FILESDIR}"/${P}-without-privatelibdir.patch
+ eautoreconf -I autoconf/m4
+
+ eapply_user
+}
+
+src_configure() {
+ # Default value for privatelibdir adds a build path to -Wl,-rpath.
+ econf \
+ --with-bindir="${EPREFIX}"/usr/bin \
+ --with-cachedir="${EPREFIX}"/var/lib/${PN} \
+ --with-confdir="${EPREFIX}"/etc/${PN} \
+ --with-datadir="${EPREFIX}"/var/lib/${PN} \
+ --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --with-logdir="${EPREFIX}"/var/log/${PN} \
+ --with-modulesdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \
+ --without-privatelibdir \
+ --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \
+ --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \
+ --with-nick-history=2000 \
+ --with-sendq=3000000 \
+ --with-permissions=0640 \
+ --with-fd-setsize=1024 \
+ --with-system-cares \
+ --with-system-pcre2 \
+ --with-system-tre \
+ --enable-dynamic-linking \
+ --enable-ssl="${EPREFIX}"/usr \
+ $(use_enable curl libcurl "${EPREFIX}"/usr) \
+ $(use_enable prefixaq) \
+ $(use_with showlistmodes) \
+ $(use_with topicisnuhost) \
+ $(use_with shunnotices) \
+ $(use_with !operoverride no-operoverride) \
+ $(use_with operoverride-verify) \
+ $(use_with !usermod disableusermod) \
+ $(use_with !extban-stacking disable-extendedban-stacking)
+}
+
+src_install() {
+ keepdir /var/log/${PN}
+ keepdir /var/lib/${PN}/tmp
+
+ newbin src/ircd ${PN}
+
+ (
+ cd src/modules || die
+ for subdir in $(find . -type d -print); do
+ if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then
+ exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}"
+ doexe "${subdir}"/*.so
+ fi
+ done
+ )
+
+ insinto /etc/${PN}
+ # Purposefully omitting the examples/ and ssl/ subdirectories. ssl
+ # is redundant with app-misc/ca-certificates and examples will all
+ # be in docs anyway.
+ doins -r doc/conf/{aliases,help}
+ doins doc/conf/*.conf
+ newins doc/conf/examples/example.conf ${PN}.conf
+ keepdir /etc/${PN}/ssl
+
+ dodoc \
+ doc/{Changes.old,Changes.older,RELEASE-NOTES} \
+ doc/{Donation,translations.txt}
+
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd-r2 ${PN}
+
+ # config should be read-only
+ fperms -R 0640 /etc/${PN}
+ fperms 0750 /etc/${PN}{,/aliases,/help}
+ fperms 0750 /etc/${PN}/ssl
+ # state is editable but not owned by unrealircd directly
+ fperms 0770 /var/log/${PN}
+ fperms 0770 /var/lib/${PN}{,/tmp}
+ fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN}
+}
+
+pkg_preinst() {
+ # Must pre-create directories; otherwise their permissions are lost
+ # on installation.
+
+ # Usage: _unrealircd_dir_permissions <user> <group> <mode> <dir>[, <dir>…]
+ #
+ # Ensure that directories are created with the correct permissions
+ # before portage tries to merge them to the filesystem because,
+ # otherwise, those directories are installed world-readable.
+ #
+ # If this is a first-time install, create those directories with
+ # correct permissions before installing. Otherwise, update
+ # permissions—but only if we are replacing an unrealircd ebuild at
+ # least as old as net-irc/unrealircd-3.2.10. Portage handles normal
+ # file permissions correctly, so no need for recursive
+ # chmoding/chowning.
+ _unrealircd_dir_permissions() {
+ local user=${1} group=${2} mode=${3} dir v
+ shift 3
+ while dir=${1} && shift; do
+ if [[ ! -d "${EROOT}${dir}" ]]; then
+ ebegin "Creating ""${EROOT}${dir}"" with correct permissions"
+ install -d -m "${mode}" -o "${user}" -g "${group}" "${EROOT}${dir}" || die
+ eend ${?}
+ elif ! [[ ${REPLACING_VERSIONS} ]] || for v in ${REPLACING_VERSIONS}; do
+ # If 3.2.10 ≤ ${REPLACING_VERSIONS}, then we update
+ # existing permissions.
+ version_is_at_least "${v}" 3.2.10 && break
+ done; then
+ ebegin "Correcting permissions of ""${EROOT}${dir}"" left by ${CATEGORY}/${PN}-${v}"
+ chmod "${mode}" "${EROOT}${dir}" \
+ && chown ${user}:${group} "${EROOT}${dir}" \
+ || die "Unable to correct permissions of ${EROOT}${dir}"
+ eend ${?}
+ fi
+ done
+ }
+
+ # unrealircd only needs to be able to read files in /etc/unrealircd.
+ _unrealircd_dir_permissions root unrealircd 0750 etc/${PN}{,/aliases}
+
+ # unrealircd needs to be able to create files in /var/lib/unrealircd
+ # and /var/log/unrealircd.
+ _unrealircd_dir_permissions root unrealircd 0770 var/{lib,log}/${PN}
+}
+
+pkg_postinst() {
+ # Move docert call from src_install() to install_cert in pkg_postinst for
+ # bug #201682
+ if [[ ! -f "${EROOT}"etc/${PN}/ssl/server.cert.key ]]; then
+ if [[ -f "${EROOT}"etc/${PN}/server.cert.key ]]; then
+ ewarn "The location ${PN} looks for SSL certificates has changed"
+ ewarn "from ${EROOT}etc/${PN} to ${EROOT}etc/${PN}/ssl."
+ ewarn "Please move your existing certificates."
+ else
+ (
+ umask 0037
+ install_cert /etc/${PN}/ssl/server.cert
+ chown unrealircd "${EROOT}"etc/${PN}/ssl/server.cert.*
+ ln -snf server.cert.key "${EROOT}"etc/${PN}/ssl/server.key.pem
+ )
+ fi
+ fi
+
+ local unrealircd_conf="${EROOT}"etc/${PN}/${PN}.conf
+ # Fix up the default cloak keys.
+ if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then
+ ebegin "Generating cloak-keys"
+ local keys=(
+ $(${PN} -k 2>&1 | tail -n 3)
+ )
+ [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]]
+ eend $?
+
+ ebegin "Substituting cloak-keys into ${unrealircd_conf}"
+ sed -i \
+ -e '/cloak-keys/ {
+n
+s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/
+n
+s/"and another one";/"'"${keys[1]}"'";/
+n
+s/"and another one";/"'"${keys[2]}"'";/
+}' \
+ "${unrealircd_conf}"
+ eend $?
+ fi
+
+ # Precreate ircd.tune and ircd.log with the correct ownership to
+ # protect people from themselves when they run unrealircd as root
+ # before trying the initscripts. #560790
+ local f
+ for f in "${EROOT}"var/{lib/${PN}/ircd.tune,log/${PN}/ircd.log}; do
+ [[ -e ${f} ]] && continue
+ ebegin "Precreating ${f} to set ownership"
+ (
+ umask 0037
+ # ircd.tune must be seeded with content instead of being empty.
+ if [[ ${f} == *ircd.tune ]]; then
+ echo 0 > "${f}"
+ echo 0 >> "${f}"
+ fi
+ touch "${f}"
+ )
+ chown unrealircd "${f}"
+ eend $?
+ done
+
+ elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf"
+ elog
+ elog "You can also configure ${PN} start at boot with rc-update(1)."
+ elog "It is recommended to run unrealircd as an unprivileged user."
+ elog "The provided init.d script does this for you."
+}