]> Pileus Git - ~andy/sunrise/blob - net-misc/xorp/xorp-1.4.ebuild
net-misc/flexget: Add live ebuild
[~andy/sunrise] / net-misc / xorp / xorp-1.4.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils
6
7 DESCRIPTION="The eXtensible Open Router Platform"
8 HOMEPAGE="http://www.xorp.org/"
9 SRC_URI="http://www.xorp.org/releases/${PV}/${P}.tar.gz"
10
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="~x86"
14 IUSE="static debug ipv6 snmp"
15
16 DEPEND=">=dev-lang/python-2.0
17         dev-libs/openssl
18         sys-libs/ncurses
19         snmp? ( net-analyzer/net-snmp )"
20 RDEPEND="${DEPEND}
21         net-analyzer/traceroute"
22
23 pkg_setup() {
24         enewgroup xorp
25 }
26
27 src_compile() {
28         econf \
29                 $(use_enable static) \
30                 $(use_enable debug) \
31                 $(use_enable ipv6) \
32                 $(use_with snmp) \
33                 --prefix="/usr/xorp" \
34                 || die "econf failed"
35
36         # -Werror prevents building snmp agent...
37         find "${S}" -name Makefile -exec sed -i -e '/^C.*FLAGS/s/-Werror//g' '{}' \;
38
39         emake -j1 || die "emake failed"
40 }
41
42 src_test() {
43         emake check || die "emake check failed"
44 }
45
46 src_install() {
47         emake DESTDIR="${D}" install || die "emake install failed"
48
49         insinto /etc/xorp
50         newins rtrmgr/config.boot.sample config.boot.dist
51
52         newconfd "${FILESDIR}/xorp-confd" xorp
53         newinitd "${FILESDIR}/xorp-initd" xorp
54
55         dodoc BUGS ERRATA README RELEASE_NOTES TODO VERSION
56 }
57
58 pkg_postinst() {
59         elog "Only users who belong to the xorp group"
60         elog "can run xorpsh in configurational mode."
61         elog "You must create /etc/xorp/config.boot,"
62         elog "you can use the sample /etc/xorp/config.boot.dist"
63 }