/[gentoo-x86]/net-misc/wicd/wicd-1.7.1_pre20120127-r1.ebuild
Gentoo

Contents of /net-misc/wicd/wicd-1.7.1_pre20120127-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Oct 15 09:25:21 2012 UTC (7 years, 1 month ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.1.11.9/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/net-misc/wicd/wicd-1.7.1_pre20120127-r1.ebuild,v 1.2 2012/07/17 11:58:23 tomka Exp $
4
5 EAPI=3
6
7 PYTHON_DEPEND="2"
8 PYTHON_USE_WITH="ncurses? xml"
9 SUPPORT_PYTHON_ABIS="1"
10 RESTRICT_PYTHON_ABIS="3.* *-jython"
11 DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
12
13 inherit eutils distutils systemd
14
15 MY_PV="${PN}-1.7.1"
16 S="${WORKDIR}/${MY_PV}"
17
18 DESCRIPTION="A lightweight wired and wireless network manager for Linux"
19 HOMEPAGE="https://launchpad.net/wicd"
20 SRC_URI="http://dev.gentoo.org/~tomka/files/${P}.tar.gz
21 mac4lin? ( http://dev.gentoo.org/~anarchy/dist/wicd-mac4lin-icons.tar.xz )"
22
23 LICENSE="GPL-2"
24 SLOT="0"
25 KEYWORDS="~amd64 ~x86"
26 IUSE="X +gtk ioctl libnotify mac4lin ncurses nls +pm-utils"
27
28 DEPEND=""
29 # Maybe virtual/dhcp would work, but there are enough problems with
30 # net-misc/dhcp that I want net-misc/dhcpcd to be guarenteed to be considered
31 # first if none are installed.
32 RDEPEND="
33 dev-python/dbus-python
34 X? ( gtk? ( dev-python/pygtk
35 || (
36 x11-misc/ktsuss
37 x11-libs/gksu
38 kde-base/kdesu
39 )
40 )
41 )
42 || (
43 net-misc/dhcpcd
44 net-misc/dhcp
45 net-misc/pump
46 )
47 net-wireless/wireless-tools
48 net-wireless/wpa_supplicant
49 || (
50 sys-apps/net-tools
51 sys-apps/ethtool
52 )
53 !gtk? ( dev-python/pygobject:2 )
54 ioctl? ( dev-python/python-iwscan dev-python/python-wpactrl )
55 libnotify? ( dev-python/notify-python )
56 ncurses? (
57 dev-python/urwid
58 dev-python/pygobject:2
59 )
60 pm-utils? ( >=sys-power/pm-utils-1.1.1 )
61 "
62 DOCS="CHANGES NEWS AUTHORS README"
63
64 src_prepare() {
65 epatch "${FILESDIR}"/${PN}-1.7.1_beta2-init.patch
66 epatch "${FILESDIR}"/${PN}-init-sve-start.patch
67 # Add a template for hex psk's and wpa (Bug 306423)
68 epatch "${FILESDIR}"/${PN}-1.7.1_pre20111210-wpa-psk-hex-template.patch
69 # get rid of opts variable to fix bug 381885
70 sed -i "/opts/d" "in/init=gentoo=wicd.in" || die
71 # Need to ensure that generated scripts use Python 2 at run time.
72 sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \
73 -i setup.py || die "sed failed"
74 python_copy_sources
75 }
76
77 src_configure() {
78 local myconf
79 use gtk || myconf="${myconf} --no-install-gtk"
80 use libnotify || myconf="${myconf} --no-use-notifications"
81 use ncurses || myconf="${myconf} --no-install-ncurses"
82 use pm-utils || myconf="${myconf} --no-install-pmutils"
83 configuration() {
84 $(PYTHON) ./setup.py configure --no-install-docs --resume=/usr/share/wicd/scripts/ --suspend=/usr/share/wicd/scripts/ --verbose ${myconf}
85 }
86 python_execute_function -s configuration
87 }
88
89 src_install() {
90 distutils_src_install
91 keepdir /var/lib/wicd/configurations \
92 || die "keepdir failed, critical for this app"
93 keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect} \
94 || die "keepdir failed, critical for this app"
95 keepdir /var/log/wicd \
96 || die "keepdir failed, critical for this app"
97 use nls || rm -rf "${D}"/usr/share/locale
98 systemd_dounit "${S}/other/wicd.service"
99
100 if use mac4lin; then
101 rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
102 mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
103 fi
104 }
105
106 pkg_postinst() {
107 distutils_pkg_postinst
108
109 elog "You may need to restart the dbus service after upgrading wicd."
110 echo
111 elog "To start wicd at boot, add /etc/init.d/wicd to a runlevel and:"
112 elog "- Remove all net.* initscripts (except for net.lo) from all runlevels"
113 elog "- Add these scripts to the RC_PLUG_SERVICES line in /etc/rc.conf"
114 elog "(For example, rc_hotplug=\"!net.eth* !net.wlan*\")"
115 # Maintainer's note: the consolekit use flag short circuits a dbus rule and
116 # allows the connection. Else, you need to be in the group.
117 if ! has_version sys-auth/pambase[consolekit]; then
118 ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
119 ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
120 fi
121 }

  ViewVC Help
Powered by ViewVC 1.1.20