trying to refresh only ca and crl stuff when tls cache expires
[radsecproxy.git] / packaging / portage / net-dialup / radsecproxy / radsecproxy-9999.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils subversion
6
7 DESCRIPTION="Radius/RadSec Proxy Server - developer trunk from SVN"
8 HOMEPAGE="http://software.uninett.no/radsecproxy"
9 ESVN_REPO_URI="https://svn.testnett.uninett.no/${PN}/trunk"
10 SRC_URI=""
11
12 LICENSE="public-domain"
13 SLOT="0"
14 KEYWORDS=""
15 IUSE=""
16
17 DEPEND="dev-libs/openssl"
18 RDEPEND="dev-libs/openssl"
19
20 S=${WORKDIR}/trunk
21
22 src_unpack() {
23         subversion_src_unpack
24         touch AUTHORS COPYING ChangeLog INSTALL NEWS README
25         autoreconf --force --install
26         mkdir -pv "${S}"/init.d "${S}"/conf.d
27         cat >"${S}"/init.d/"${PN}" << EOF
28 #! /sbin/runscript
29
30 depend() {
31         use logger dns
32         need net
33 }
34
35 CMD="/usr/sbin/radsecproxy"
36
37 start() {
38         ebegin "Starting radsecproxy"
39         if test -n "\${OPTS}" ; then
40                 start-stop-daemon --chuid \${CMDUSER:-nobody} --start --exec \${CMD} -- \${OPTS}
41         else
42                 start-stop-daemon --chuid \${CMDUSER:-nobody} --start --exec \${CMD}
43         fi
44         eend \${?}
45 }
46
47 stop() {
48         ebegin "Stopping radsecproxy"
49         start-stop-daemon --stop --exec \${CMD}
50         eend \${?}
51 }
52 EOF
53         cat >"${S}"/conf.d/"${PN}" << EOF
54 # Options for radsecproxy
55 #
56 # -d specifies the debug level.
57
58 # It must be set to 1, 2, 3 or  4, where  1 logs
59 # only  serious errors, and 4 logs everything.
60 #
61 # The default is 3 which logs errors, warnings and
62 # some informational messages.
63
64 # OPTS="-d 4"'
65 # CMDUSER="nobody"
66 EOF
67 }
68
69 src_install() {
70         einstall || die
71         doinitd "${S}"/init.d/"${PN}"
72         doconfd "${S}"/conf.d/"${PN}"
73         dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
74 }
75
76 pkg_postinst () {
77         einfo
78         elog "Example config exists as /etc/radsecproxy.conf-example"
79         elog "Copy this to /etc/radsecproxy.conf and edit to suit your needs"
80         einfo
81 }