/[gentoo-x86]/sys-apps/netplug/netplug-1.2.9-r5.ebuild
Gentoo

Contents of /sys-apps/netplug/netplug-1.2.9-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


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

(Portage version: 2.1.10.44/cvs/Linux x86_64)

1 # Copyright 1999-2012 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-r5.ebuild,v 1.4 2009/07/13 18:24:16 josejx Exp $
4
5 inherit eutils toolchain-funcs
6 DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
7 HOMEPAGE="http://www.red-bean.com/~bos/"
8 SRC_URI="http://www.red-bean.com/~bos/netplug/${P}.tar.bz2"
9 LICENSE="GPL-2"
10 SLOT="0"
11 KEYWORDS="amd64 arm ppc sparc x86"
12 IUSE=""
13
14 hax_bitkeeper() {
15 # the makefiles have support for bk ...
16 # basically we have to do this or bk will try to write
17 # to files in /opt/bitkeeper causing sandbox violations ;(
18 mkdir "${T}/fakebin"
19 echo "#!/bin/sh"$'\n'"exit 1" > "${T}/fakebin/bk"
20 chmod a+x "${T}/fakebin/bk"
21 export PATH="${T}/fakebin:${PATH}"
22 }
23
24 src_unpack() {
25 unpack ${A}
26 cd "${S}"
27
28 # Remove debugging from Makefile
29 # Remove -O3 if we have -O[0-9,s] in our CFLAGS
30 local remove=" -ggdb3 "
31 [[ " ${CFLAGS} " == *" -O"[0-9,s]" "* ]] && remove="${remove}-O3 "
32 sed -i -e "s/${remove}/ /" Makefile
33
34 # Use correct structure for getsockname arg 3
35 epatch "${FILESDIR}/${P}-gcc4.patch"
36
37 # Remove nested functions, #116140
38 epatch "${FILESDIR}/${P}-remove-nest.patch"
39
40 # Ignore wireless events
41 epatch "${FILESDIR}/${P}-ignore-wireless.patch"
42
43 # warn_unused_result of write POSIX function (which can fails)
44 epatch "${FILESDIR}/${P}-warn_unused_result_write_call.patch"
45
46 # remove -Werror from makefile
47 epatch "${FILESDIR}/${P}-remove-werror.patch"
48 }
49
50 src_compile() {
51 tc-export CC
52 hax_bitkeeper
53 make CC="${CC}" || die "emake failed"
54 }
55
56 src_install() {
57 into /
58 dosbin netplugd
59 doman man/man8/netplugd.8
60
61 dodir /etc/netplug.d
62 exeinto /etc/netplug.d
63 doexe "${FILESDIR}/netplug"
64
65 dodir /etc/netplug
66 echo "eth*" > "${D}"/etc/netplug/netplugd.conf
67 }

  ViewVC Help
Powered by ViewVC 1.1.20