summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Horelick <jdhore@gentoo.org>2012-03-03 06:48:53 +0000
committerJeff Horelick <jdhore@gentoo.org>2012-03-03 06:48:53 +0000
commitf888aaa37c8fc868a4d2b81fb3016d79e1f892a5 (patch)
treeed4df5b54bea7eafb12922f47a88402568f0fa04
parentAdd missing patch, reported by floppym. (diff)
downloadgentoo-2-f888aaa37c8fc868a4d2b81fb3016d79e1f892a5.tar.gz
gentoo-2-f888aaa37c8fc868a4d2b81fb3016d79e1f892a5.tar.bz2
gentoo-2-f888aaa37c8fc868a4d2b81fb3016d79e1f892a5.zip
Add net-irc/shadowircd-6.3.2.1, an IRCd based on charybdis, but adds several useful features.
(Portage version: 2.2.0_alpha89/cvs/Linux i686)
-rw-r--r--net-irc/shadowircd/ChangeLog11
-rw-r--r--net-irc/shadowircd/files/shadowircd.confd6
-rw-r--r--net-irc/shadowircd/files/shadowircd.initd38
-rw-r--r--net-irc/shadowircd/metadata.xml16
-rw-r--r--net-irc/shadowircd/shadowircd-6.3.2.1.ebuild89
5 files changed, 160 insertions, 0 deletions
diff --git a/net-irc/shadowircd/ChangeLog b/net-irc/shadowircd/ChangeLog
new file mode 100644
index 000000000000..6331113dd80f
--- /dev/null
+++ b/net-irc/shadowircd/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for net-irc/shadowircd
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/shadowircd/ChangeLog,v 1.1 2012/03/03 06:48:53 jdhore Exp $
+
+*shadowircd-6.3.2.1 (03 Mar 2012)
+
+ 03 Mar 2012; Jeff Horelick <jdhore@gentoo.org> +files/shadowircd.confd,
+ +files/shadowircd.initd, +metadata.xml, +shadowircd-6.3.2.1.ebuild:
+ Add net-irc/shadowircd-6.3.2.1, an IRCd based on charybdis, but adds several
+ useful features.
+
diff --git a/net-irc/shadowircd/files/shadowircd.confd b/net-irc/shadowircd/files/shadowircd.confd
new file mode 100644
index 000000000000..021816bde288
--- /dev/null
+++ b/net-irc/shadowircd/files/shadowircd.confd
@@ -0,0 +1,6 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 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..6c5b0cd89f69
--- /dev/null
+++ b/net-irc/shadowircd/files/shadowircd.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 \
+ ${CHARYBDIS_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..5de3966e73e4
--- /dev/null
+++ b/net-irc/shadowircd/metadata.xml
@@ -0,0 +1,16 @@
+<?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>
+</pkgmetadata>
diff --git a/net-irc/shadowircd/shadowircd-6.3.2.1.ebuild b/net-irc/shadowircd/shadowircd-6.3.2.1.ebuild
new file mode 100644
index 000000000000..5df5918df3ce
--- /dev/null
+++ b/net-irc/shadowircd/shadowircd-6.3.2.1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib user
+
+DESCRIPTION="An IRCd based on charybdis that adds several useful features"
+HOMEPAGE="http://shadowircd.net"
+SRC_URI="http://shadowircd.net/downloads/${P}.tar.bz2"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +ipv6 largenet ssl zlib profile"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+
+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 \
+ $(use_enable debug assert soft) \
+ $(use_enable debug iodebug) \
+ $(use_enable ipv6) \
+ $(use_enable !largenet small-net) \
+ $(use_enable profile) \
+ $(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."
+}