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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Mon Dec 10 18:06:41 2012 UTC (7 years ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)

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.ebuild,v 1.6 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 ppc ~ppc64 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-libs/gksu
37 kde-base/kdesu
38 )
39 )
40 )
41 || (
42 net-misc/dhcpcd
43 net-misc/dhcp
44 net-misc/pump
45 )
46 net-wireless/wireless-tools
47 net-wireless/wpa_supplicant
48 || (
49 sys-apps/net-tools
50 sys-apps/ethtool
51 )
52 !gtk? ( dev-python/pygobject:2 )
53 ioctl? ( dev-python/python-iwscan dev-python/python-wpactrl )
54 libnotify? ( dev-python/notify-python )
55 ncurses? (
56 dev-python/urwid
57 dev-python/pygobject:2
58 )
59 pm-utils? ( >=sys-power/pm-utils-1.1.1 )
60 "
61 DOCS="CHANGES NEWS AUTHORS README"
62
63 src_prepare() {
64 epatch "${FILESDIR}"/${PN}-1.7.1_beta2-init.patch
65 epatch "${FILESDIR}"/${PN}-init-sve-start.patch
66 # Add a template for hex psk's and wpa (Bug 306423)
67 epatch "${FILESDIR}"/${PN}-1.7.1_pre20111210-wpa-psk-hex-template.patch
68 # get rid of opts variable to fix bug 381885
69 sed -i "/opts/d" "in/init=gentoo=wicd.in" || die
70 # Need to ensure that generated scripts use Python 2 at run time.
71 sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \
72 -i setup.py || die "sed failed"
73 python_copy_sources
74 }
75
76 src_configure() {
77 local myconf
78 use gtk || myconf="${myconf} --no-install-gtk"
79 use libnotify || myconf="${myconf} --no-use-notifications"
80 use ncurses || myconf="${myconf} --no-install-ncurses"
81 use pm-utils || myconf="${myconf} --no-install-pmutils"
82 configuration() {
83 $(PYTHON) ./setup.py configure --no-install-docs --resume=/usr/share/wicd/scripts/ --suspend=/usr/share/wicd/scripts/ --verbose ${myconf}
84 }
85 python_execute_function -s configuration
86 }
87
88 src_install() {
89 distutils_src_install
90 keepdir /var/lib/wicd/configurations \
91 || die "keepdir failed, critical for this app"
92 keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect} \
93 || die "keepdir failed, critical for this app"
94 keepdir /var/log/wicd \
95 || die "keepdir failed, critical for this app"
96 use nls || rm -rf "${D}"/usr/share/locale
97 systemd_dounit "${S}/other/wicd.service"
98
99 if use mac4lin; then
100 rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
101 mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
102 fi
103 }
104
105 pkg_postinst() {
106 distutils_pkg_postinst
107
108 elog "You may need to restart the dbus service after upgrading wicd."
109 echo
110 elog "To start wicd at boot, add /etc/init.d/wicd to a runlevel and:"
111 elog "- Remove all net.* initscripts (except for net.lo) from all runlevels"
112 elog "- Add these scripts to the RC_PLUG_SERVICES line in /etc/rc.conf"
113 elog "(For example, rc_hotplug=\"!net.eth* !net.wlan*\")"
114 # Maintainer's note: the consolekit use flag short circuits a dbus rule and
115 # allows the connection. Else, you need to be in the group.
116 if ! has_version sys-auth/pambase[consolekit]; then
117 ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
118 ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
119 fi
120 }

  ViewVC Help
Powered by ViewVC 1.1.20