1 |
# Copyright 1999-2010 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/wicd/wicd-1.7.0_beta4.ebuild,v 1.1 2010/01/04 14:09:07 darkside Exp $ |
4 |
|
5 |
EAPI=2 |
6 |
|
7 |
MY_P=${P/_beta/b} |
8 |
inherit distutils |
9 |
|
10 |
DESCRIPTION="A lightweight wired and wireless network manager for Linux" |
11 |
HOMEPAGE="http://wicd.sourceforge.net/" |
12 |
SRC_URI="http://downloads.wicd.net/src/testing/1.7.x/${MY_P}.tar.bz2" |
13 |
|
14 |
LICENSE="GPL-2" |
15 |
SLOT="0" |
16 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
17 |
IUSE="X +gtk ioctl libnotify ncurses nls +pm-utils" |
18 |
|
19 |
DEPEND="" |
20 |
# Maybe virtual/dhcp would work, but there are enough problems with |
21 |
# net-misc/dhcp that I want net-misc/dhcpcd to be guarenteed to be considered |
22 |
# first if none are installed. |
23 |
RDEPEND=" |
24 |
dev-python/dbus-python |
25 |
X? ( gtk? ( dev-python/pygtk |
26 |
|| ( |
27 |
x11-misc/ktsuss |
28 |
x11-libs/gksu |
29 |
kde-base/kdesu |
30 |
) |
31 |
) |
32 |
) |
33 |
|| ( |
34 |
net-misc/dhcpcd |
35 |
net-misc/dhcp |
36 |
net-misc/pump |
37 |
) |
38 |
net-wireless/wireless-tools |
39 |
net-wireless/wpa_supplicant |
40 |
|| ( |
41 |
sys-apps/net-tools |
42 |
sys-apps/ethtool |
43 |
) |
44 |
ioctl? ( dev-python/python-iwscan dev-python/python-wpactrl ) |
45 |
libnotify? ( dev-python/notify-python ) |
46 |
ncurses? ( dev-python/urwid ) |
47 |
pm-utils? ( >=sys-power/pm-utils-1.1.1 ) |
48 |
" |
49 |
|
50 |
S="${WORKDIR}/${MY_P}" |
51 |
|
52 |
src_compile() { |
53 |
local myconf |
54 |
use gtk || myconf="${myconf} --no-install-gtk" |
55 |
use libnotify || myconf="${myconf} --no-use-notifications" |
56 |
use ncurses || myconf="${myconf} --no-install-ncurses" |
57 |
use pm-utils || myconf="${myconf} --no-install-pmutils" |
58 |
${python} ./setup.py configure --no-install-docs --resume=/usr/share/wicd/scripts/ --suspend=/usr/share/wicd/scripts/ --verbose ${myconf} |
59 |
distutils_src_compile |
60 |
} |
61 |
|
62 |
src_install() { |
63 |
DOCS="CHANGES NEWS AUTHORS README" |
64 |
distutils_src_install |
65 |
keepdir /var/lib/wicd/configurations \ |
66 |
|| die "keepdir failed, critical for this app" |
67 |
keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect} \ |
68 |
|| die "keepdir failed, critical for this app" |
69 |
keepdir /var/log/wicd \ |
70 |
|| die "keepdir failed, critical for this app" |
71 |
use nls || rm -rf ${D}/usr/share/locale |
72 |
} |
73 |
|
74 |
pkg_postinst() { |
75 |
distutils_pkg_postinst |
76 |
|
77 |
elog "You may need to restart the dbus service after upgrading wicd." |
78 |
echo |
79 |
elog "To start wicd at boot, add /etc/init.d/wicd to a runlevel and:" |
80 |
elog "- Remove all net.* initscripts (except for net.lo) from all runlevels" |
81 |
elog "- Add these scripts to the RC_PLUG_SERVICES line in /etc/conf.d/rc" |
82 |
elog "(For example, RC_PLUG_SERVICES=\"!net.eth0 !net.wlan0\")" |
83 |
# Maintainer's note: the consolekit use flag short circuits a dbus rule and |
84 |
# allows the connection. Else, you need to be in the group. |
85 |
if has_version sys-auth/pambase; then |
86 |
if ! built_with_use sys-auth/pambase consolekit; then |
87 |
ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If" |
88 |
ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf" |
89 |
fi |
90 |
fi |
91 |
} |