blob: 3915457b0cb3ca3b5f7e97e109a9e033a100eb32 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ifplugd-0.25.ebuild,v 1.3 2004/08/09 19:28:17 seemant Exp $
IUSE="doc"
DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
HOMEPAGE="http://0pointer.de/lennart/projects/ifplugd/"
SRC_URI="http://0pointer.de/lennart/projects/ifplugd/${P}.tar.gz"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~amd64 ~ppc"
DEPEND=">=dev-libs/libdaemon-0.5
dev-util/pkgconfig
doc? ( app-doc/doxygen net-www/lynx )"
# Gentoo-provided scripts. Version is for the scripts, not ifplugd.
INITSCRIPT=${FILESDIR}/gentoo-ifplugd-init-v3
ACTIONSCRIPT=${FILESDIR}/gentoo-ifplugd.action-v2
CONFFILE=${FILESDIR}/gentoo-ifplugd-conf-v3
src_unpack() {
unpack ${A}
cp ${INITSCRIPT} ${T}/ifplugd
cp ${ACTIONSCRIPT} ${T}/ifplugd.action
# This moves the default location for the script that handles
# calling the distro network scripts to /usr/sbin. The reason
# is that the user very probably shouldn't mess with it.
cd ${S}
sed -i~ 's:SYSCONFDIR"/ifplugd/:"/usr/sbin/:' src/ifplugd.c
}
src_compile() {
local myconf
# These are not needed for building
myconf="--disable-xmltoman --disable-subversion"
myconf="${myconf} --with-initdir=${D}/etc/init.d"
use doc \
&& myconf="${myconf} --enable-doxygen --enable-lynx" \
|| myconf="${myconf} --disable-doxygen --disable-lynx"
econf ${myconf} || die
emake || die
}
src_install() {
einstall || die
# Fix init.d configuration
cd ${D}/etc
rm -rf ifplugd/
rm -f init.d/ifplugd
use doc && dohtml doc/*.html doc/*.css
dodir /etc/conf.d
cp ${CONFFILE} conf.d/ifplugd
dosbin ${T}/ifplugd.action
exeinto /etc/init.d
doexe ${T}/ifplugd
}
|