summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-irc/shadowircd')
-rw-r--r--net-irc/shadowircd/Manifest1
-rw-r--r--net-irc/shadowircd/files/shadowircd.confd7
-rw-r--r--net-irc/shadowircd/files/shadowircd.initd39
-rw-r--r--net-irc/shadowircd/metadata.xml19
-rw-r--r--net-irc/shadowircd/shadowircd-6.3.3.ebuild92
5 files changed, 158 insertions, 0 deletions
diff --git a/net-irc/shadowircd/Manifest b/net-irc/shadowircd/Manifest
new file mode 100644
index 000000000000..f316c2844a95
--- /dev/null
+++ b/net-irc/shadowircd/Manifest
@@ -0,0 +1 @@
+DIST shadowircd-6.3.3.tar.gz 1980432 SHA256 a3b6189a473e837d4248b8f18b1e8454ab111c8eafeb46eda477095771636f24 SHA512 f3638bee6d49c56738cf05dd7c67d93344ed5787eb8777589390dbc38a1481e9a28895bdd4534124dcc8dbe247f3e28e299fe0bc0bb89e4d974b4aff734701d4 WHIRLPOOL 59e76beab8814f5fcfe8cc60cf2363e4ec0a8306a6503f28b234d805ae71b2c15bdefe9695ebf1d280932328f14669a295954b86c239c09b498f8b1b2bc95369
diff --git a/net-irc/shadowircd/files/shadowircd.confd b/net-irc/shadowircd/files/shadowircd.confd
new file mode 100644
index 000000000000..391bc347801b
--- /dev/null
+++ b/net-irc/shadowircd/files/shadowircd.confd
@@ -0,0 +1,7 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Specify any extra options to pass to shadowircd
+SHADOWIRCD_OPTS=""
diff --git a/net-irc/shadowircd/files/shadowircd.initd b/net-irc/shadowircd/files/shadowircd.initd
new file mode 100644
index 000000000000..9b6fc15802e8
--- /dev/null
+++ b/net-irc/shadowircd/files/shadowircd.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ use dns net
+ provide ircd
+}
+
+start() {
+ if ! [ -d /var/run/shadowircd ]; then
+ ebegin "Creating /var/run/shadowircd for ${SVCNAME}"
+ mkdir /var/run/shadowircd \
+ && chown :shadowircd /var/run/shadowircd \
+ && chmod 770 /var/run/shadowircd
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/bin/shadowircd-ircd \
+ --user shadowircd --pidfile /var/run/shadowircd/ircd.pid \
+ ${SHADOWIRCD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile /var/run/shadowircd/ircd.pid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile /var/run/shadowircd/ircd.pid
+ eend $?
+}
diff --git a/net-irc/shadowircd/metadata.xml b/net-irc/shadowircd/metadata.xml
new file mode 100644
index 000000000000..764b9b8e6bb5
--- /dev/null
+++ b/net-irc/shadowircd/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-irc</herd>
+ <maintainer>
+ <email>jdhore@gentoo.org</email>
+ <name>Jeff Horelick</name>
+ </maintainer>
+ <maintainer>
+ <email>binki@gentoo.org</email>
+ <name>Nathan Phillip Brink</name>
+ </maintainer>
+ <use>
+ <flag name="largenet">Enable support/tweaks for large networks</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">shadowircd/shadowircd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-irc/shadowircd/shadowircd-6.3.3.ebuild b/net-irc/shadowircd/shadowircd-6.3.3.ebuild
new file mode 100644
index 000000000000..bcc4d803dfdd
--- /dev/null
+++ b/net-irc/shadowircd/shadowircd-6.3.3.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib user
+
+DESCRIPTION="An IRCd based on charybdis that adds several useful features"
+HOMEPAGE="http://shadowircd.net"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug +ipv6 largenet ssl zlib"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+
+S="${WORKDIR}/${PN}-${P}"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 "${EPREFIX}"/usr ${PN}
+}
+
+src_prepare() {
+ # Fill the example configuration file with proper paths.
+ sed -i \
+ -e "s:path =.*modules:path = \"$(get_libdir)/${PN}/modules:g" \
+ -e "s:etc/:../etc/${PN}/:g" \
+ -e "s:logs/:../var/log/shadowircd/:g" \
+ -e "s:test\.\(cert\|key\):ssl.\1:g" \
+ doc/example.conf \
+ doc/reference.conf \
+ || die
+}
+
+src_configure() {
+ econf \
+ ac_cv_prog_cc_g=no \
+ --disable-gnutls \
+ $(use_enable debug assert soft) \
+ $(use_enable debug iodebug) \
+ $(use_enable ipv6) \
+ $(use_enable !largenet small-net) \
+ $(use_enable ssl openssl) \
+ $(use_enable zlib) \
+ --with-program-prefix=shadowircd- \
+ \
+ --enable-fhs-paths \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --libdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN} \
+ --with-logdir="${EPREFIX}"/var/log/${PN} \
+ --with-moduledir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \
+ --with-rundir="${EPREFIX}"/var/run
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ insinto etc/${PN}
+ newins doc/reference.conf ircd.conf
+
+ keepdir var/{lib,log}/${PN}
+
+ # Ensure that if `make install' created /var/run/${PN}, we still
+ # force the initscript to create that directory.
+ rm -rf "${D}"/var/run || die
+
+ # shadowircd needs writing to its state (bandb) and log directories
+ fowners :shadowircd /var/{lib,log}/${PN}
+ fperms 770 /var/{lib,log}/${PN}
+
+ # ensure that shadowircd can access but not modify its configuration
+ # while protecting it from others
+ fowners :shadowircd /etc/${PN}{,/ircd.conf}
+ fperms 750 /etc/${PN}
+ fperms 640 /etc/${PN}/ircd.conf
+}
+
+pkg_postinst() {
+ elog "All of the shadowircd binaries in PATH have been prefixed with"
+ elog "'shadowircd-' to prevent file collisions."
+}