--- /dev/null
+# ChangeLog for net-news/nntpswitch
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/nntpswitch/ChangeLog,v 1.1 2005/01/17 19:40:02 swegener Exp $
+
+*nntpswitch-0.11 (17 Jan 2005)
+
+ 17 Jan 2005; Sven Wegener <swegener@gentoo.org> +metadata.xml,
+ +files/nntpswitch.init.d, +nntpswitch-0.11.ebuild:
+ Moved from net-news/nntpswitch to net-nntp/nntpswitch.
+
+*nntpswitch-0.11 (01 Dec 2004)
+
+ 01 Dec 2004; Sven Wegener <swegener@gentoo.org> +metadata.xml,
+ +files/nntpswitch.init.d, +nntpswitch-0.11.ebuild:
+ Initial import, ebuild written by me.
+
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 97c82a17da9f8033de96e75011380e1c nntpswitch-0.11.ebuild 2070
+MD5 48b1336cd730a53b886cb09231412687 ChangeLog 404
+MD5 d4764f5c17f5e0b416f7ddf271c77d71 metadata.xml 161
+MD5 43a13b7a5681200f7038c535e4f18243 files/digest-nntpswitch-0.11 66
+MD5 712cf4e650fe165063e51192847bc374 files/nntpswitch.init.d 519
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.9.10 (GNU/Linux)
+
+iD8DBQFBrjb9I1lqEGTUzyQRAopCAKC6CezK+Q/5JdvBT52+YuCdn2QVlQCfUPHo
+UfOr7Q3na58jHFkHBfx96Cc=
+=cpJa
+-----END PGP SIGNATURE-----
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/nntpswitch/files/nntpswitch.init.d,v 1.1 2005/01/17 19:40:02 swegener Exp $
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting NNTP Switch"
+ /usr/sbin/nntpswitchd &>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NNTP Switch"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nntpswitchd.pid
+ eend $?
+ rm -f /var/run/nntpswitchd.pid
+}
--- /dev/null
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nntp/nntpswitch/nntpswitch-0.11.ebuild,v 1.1 2005/01/17 19:40:02 swegener Exp $
+
+DESCRIPTION="Load Balancing NNTP Router"
+HOMEPAGE="http://www.nntpswitch.org/"
+SRC_URI="http://www.nntpswitch.org/download/${P}.tar.gz"
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="ldap mysql postgres"
+
+RDEPEND="mysql? ( dev-db/mysql )
+ postgres? ( dev-db/postgresql )
+ ldap? ( net-nds/openldap )"
+
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+
+ sed -i \
+ -e "s/-O3/${CFLAGS}/" \
+ -e "s:lib/nntpswitch:$(get_libdir)/nntpswitch:" \
+ ${S}/Makefile
+ sed -i \
+ -e "s:/usr/local/lib:/usr/$(get_libdir)/nntpswitch:" \
+ ${S}/nntpswitch.conf.in
+ sed -i \
+ -e "s:/usr/local/etc/nntpswitch/passwd:/etc/nntpswitch/passwd:" \
+ ${S}/etc/access.conf
+}
+
+src_compile() {
+ emake -j1 || die "emake failed"
+
+ if use mysql
+ then
+ emake -j1 mysql || die "emake mysql failed"
+ fi
+ if use postgres
+ then
+ emake -j1 postgres || die "emake postgres failed"
+ fi
+ if use ldap
+ then
+ emake -j1 ldap || die "emake ldap failed"
+ fi
+}
+
+src_install() {
+ dodir /usr/sbin /usr/$(get_libdir)/nntpswitch
+ make PREFIX="${D}/usr" install || die "make install failed"
+
+ insinto /etc/nntpswitch
+ newins nntpswitch.conf-dist nntpswitch.conf || die "newins failed"
+ doins etc/{{access,servers}.conf,passwd,overview.fmt} || die "doins failed"
+
+ keepdir /var/lib/nntpswitch || die "keepdir failed"
+ dosym /var/lib/nntpswitch/active /etc/nntpswitch/active || die "dosym failed"
+ dosym /var/lib/nntpswitch/newsgroups /etc/nntpswitch/newsgroups || die "dosym failed"
+
+ newinitd ${FILESDIR}/nntpswitch.init.d nntpswitch || die "newinitd failed"
+}
+
+pkg_postinst() {
+ einfo "Please configure nntpswitch using the files in /etc/nntpswitch!"
+ einfo
+ einfo "After this, you need to generate a nntpswitch-compatible active file,"
+ einfo "before you can start nntpswitch for the first time. Use 'updategroups'"
+ einfo "to perform this step."
+}