Fjernet gamle gentoo-greier
[radsecproxy.git] / packaging / portage / net-dialup / radsecproxy / radsecproxy-9999.ebuild
diff --git a/packaging/portage/net-dialup/radsecproxy/radsecproxy-9999.ebuild b/packaging/portage/net-dialup/radsecproxy/radsecproxy-9999.ebuild
new file mode 100644 (file)
index 0000000..82f1a2d
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils subversion
+
+DESCRIPTION="Radius/RadSec Proxy Server - developer trunk from SVN"
+HOMEPAGE="http://software.uninett.no/radsecproxy"
+ESVN_REPO_URI="https://svn.testnett.uninett.no/${PN}/trunk"
+SRC_URI=""
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="dev-libs/openssl"
+
+S=${WORKDIR}/trunk
+
+src_unpack() {
+       subversion_src_unpack
+       touch AUTHORS COPYING ChangeLog INSTALL NEWS README
+       autoreconf --force --install
+       mkdir -pv "${S}"/init.d "${S}"/conf.d
+       cat >"${S}"/init.d/"${PN}" << EOF
+#! /sbin/runscript
+
+depend() {
+       use logger dns
+       need net
+}
+
+CMD="/usr/sbin/radsecproxy"
+
+start() {
+       ebegin "Starting radsecproxy"
+       if test -n "\${OPTS}" ; then
+               start-stop-daemon --chuid \${CMDUSER:-nobody} --start --exec \${CMD} -- \${OPTS}
+       else
+               start-stop-daemon --chuid \${CMDUSER:-nobody} --start --exec \${CMD}
+       fi
+       eend \${?}
+}
+
+stop() {
+       ebegin "Stopping radsecproxy"
+       start-stop-daemon --stop --exec \${CMD}
+       eend \${?}
+}
+EOF
+       cat >"${S}"/conf.d/"${PN}" << EOF
+# Options for radsecproxy
+#
+# -d specifies the debug level.
+# 
+# It must be set to 1, 2, 3 or  4, where  1 logs
+# only  serious errors, and 4 logs everything.
+#
+# The default is 3 which logs errors, warnings and
+# some informational messages.
+
+# OPTS="-d 4"'
+# CMDUSER="nobody"
+EOF
+}
+
+src_install() {
+       einstall || die
+       doinitd "${S}"/init.d/"${PN}"
+       doconfd "${S}"/conf.d/"${PN}"
+       dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
+}
+
+pkg_postinst () {
+       einfo
+       elog "Example config exists as /etc/radsecproxy.conf-example"
+       elog "Copy this to /etc/radsecproxy.conf and edit to suit your needs"
+       einfo
+}