/[gentoo-x86]/sys-apps/netplug/netplug-1.2.9.2-r1.ebuild
Gentoo

Contents of /sys-apps/netplug/netplug-1.2.9.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Mar 17 22:49:47 2012 UTC (2 years, 4 months ago) by mattst88
Branch: MAIN
Changes since 1.1: +2 -2 lines
Added ~mips, bug 374731.

(Portage version: 2.1.10.44/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/netplug-1.2.9.2-r1.ebuild,v 1.1 2011/10/11 08:49:38 polynomial-c Exp $
4
5 EAPI=4
6
7 inherit eutils toolchain-funcs
8
9 DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
10 HOMEPAGE="http://www.red-bean.com/~bos/"
11 SRC_URI="http://www.red-bean.com/~bos/netplug/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86"
16 IUSE="debug doc"
17
18 DEPEND="doc? ( app-text/ghostscript-gpl
19 media-gfx/graphviz )"
20 RDEPEND=""
21
22 src_prepare() {
23 # Remove debug flags from CFLAGS
24 if ! use debug; then
25 sed -i -e "s/ -ggdb3//" Makefile || die "sed failed"
26 fi
27
28 # Remove -O3 and -Werror from CFLAGS
29 sed -i -e "s/ -O3//" -e "s/ -Werror//" Makefile || die "sed failed"
30
31 # Remove nested functions, #116140
32 epatch "${FILESDIR}/${PN}-1.2.9-remove-nest.patch"
33
34 # Ignore wireless events
35 epatch "${FILESDIR}/${PN}-1.2.9-ignore-wireless.patch"
36 }
37
38 src_compile() {
39 tc-export CC
40 emake CC="${CC}" || die "emake failed"
41
42 if use doc; then
43 emake -C docs/ || die "emake failed"
44 fi
45 }
46
47 src_install() {
48 into /
49 dosbin netplugd
50 doman man/man8/netplugd.8
51
52 dodir /etc/netplug.d
53 exeinto /etc/netplug.d
54 newexe "${FILESDIR}/netplug-2" netplug
55
56 dodir /etc/netplug
57 echo "eth*" > "${D}"/etc/netplug/netplugd.conf
58
59 dodoc ChangeLog NEWS README TODO || die "dodoc failed"
60
61 if use doc; then
62 dodoc docs/state-machine.ps || die "dodoc failed"
63 fi
64 }

  ViewVC Help
Powered by ViewVC 1.1.20