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

Contents of /net-misc/wicd/wicd-1.7.2.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Dec 10 18:06:41 2012 UTC (7 years ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +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.2.3.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 DESCRIPTION="A lightweight wired and wireless network manager for Linux"
16 HOMEPAGE="https://launchpad.net/wicd"
17 SRC_URI="http://launchpad.net/wicd/1.7/${PV}/+download/${P}.tar.gz
18 mac4lin? ( http://dev.gentoo.org/~anarchy/dist/wicd-mac4lin-icons.tar.xz )
19 ambiance? ( http://freetimesblog.altervista.org/blog/wp-content/uploads/downloads/2010/05/Icone-Wicd-Lucid.tar.gz )"
20
21 LICENSE="GPL-2"
22 SLOT="0"
23 KEYWORDS="~amd64 ~x86"
24 IUSE="X ambiance +gtk ioctl libnotify mac4lin ncurses nls +pm-utils"
25
26 DEPEND="nls? ( dev-python/Babel )"
27 # Maybe virtual/dhcp would work, but there are enough problems with
28 # net-misc/dhcp that I want net-misc/dhcpcd to be guarenteed to be considered
29 # first if none are installed.
30 RDEPEND="
31 dev-python/dbus-python
32 X? ( gtk? ( dev-python/pygtk
33 || (
34 x11-misc/ktsuss
35 x11-libs/gksu
36 kde-base/kdesu
37 )
38 )
39 )
40 || (
41 net-misc/dhcpcd
42 net-misc/dhcp
43 net-misc/pump
44 )
45 net-wireless/wireless-tools
46 net-wireless/wpa_supplicant
47 || (
48 sys-apps/net-tools
49 sys-apps/ethtool
50 )
51 !gtk? ( dev-python/pygobject:2 )
52 ioctl? ( dev-python/python-iwscan dev-python/python-wpactrl )
53 libnotify? ( dev-python/notify-python )
54 ncurses? (
55 dev-python/urwid
56 dev-python/pygobject:2
57 )
58 pm-utils? ( >=sys-power/pm-utils-1.1.1 )
59 "
60 DOCS="CHANGES NEWS AUTHORS README"
61
62 src_prepare() {
63 epatch "${FILESDIR}"/${PN}-1.7.1_beta2-init.patch
64 epatch "${FILESDIR}"/${PN}-init-sve-start.patch
65 # Add a template for hex psk's and wpa (Bug 306423)
66 epatch "${FILESDIR}"/${PN}-1.7.1_pre20111210-wpa-psk-hex-template.patch
67 # get rid of opts variable to fix bug 381885
68 sed -i "/opts/d" "in/init=gentoo=wicd.in" || die
69 # Make init script provide net per bug 405775
70 epatch "${FILESDIR}"/${PN}-1.7.1-provide-net.patch
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 if use nls; then
75 # Asturian is faulty with PyBabel
76 # (https://bugs.launchpad.net/wicd/+bug/928589)
77 rm po/ast.po
78 else
79 # nuke translations
80 rm po/*.po
81 fi
82 python_copy_sources
83 }
84
85 src_configure() {
86 local myconf
87 use gtk || myconf="${myconf} --no-install-gtk"
88 use libnotify || myconf="${myconf} --no-use-notifications"
89 use ncurses || myconf="${myconf} --no-install-ncurses"
90 use pm-utils || myconf="${myconf} --no-install-pmutils"
91 configuration() {
92 $(PYTHON) ./setup.py configure --no-install-docs --resume=/usr/share/wicd/scripts/ --suspend=/usr/share/wicd/scripts/ --verbose ${myconf}
93 }
94 python_execute_function -s configuration
95 }
96
97 src_install() {
98 distutils_src_install
99 keepdir /var/lib/wicd/configurations \
100 || die "keepdir failed, critical for this app"
101 keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect} \
102 || die "keepdir failed, critical for this app"
103 keepdir /var/log/wicd \
104 || die "keepdir failed, critical for this app"
105 use nls || rm -rf "${D}"/usr/share/locale
106 systemd_dounit "${S}/other/wicd.service"
107
108 if use mac4lin; then
109 rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
110 mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
111 fi
112 if use ambiance; then
113 # Overwrite tray icons with ambiance icon
114 rm "${WORKDIR}/Icone Wicd Lucid"/signal*
115 cp "${WORKDIR}/Icone Wicd Lucid"/*.png "${D}"/usr/share/pixmaps/wicd/
116 fi
117 }
118
119 pkg_postinst() {
120 distutils_pkg_postinst
121
122 elog "You may need to restart the dbus service after upgrading wicd."
123 echo
124 elog "To start wicd at boot, add /etc/init.d/wicd to a runlevel and:"
125 elog "- Remove all net.* initscripts (except for net.lo) from all runlevels"
126 elog "- Add these scripts to the RC_PLUG_SERVICES line in /etc/rc.conf"
127 elog "(For example, rc_hotplug=\"!net.eth* !net.wlan*\")"
128 # Maintainer's note: the consolekit use flag short circuits a dbus rule and
129 # allows the connection. Else, you need to be in the group.
130 if ! has_version sys-auth/pambase[consolekit]; then
131 ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
132 ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
133 fi
134 }

  ViewVC Help
Powered by ViewVC 1.1.20