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

Contents of /net-misc/wicd/wicd-1.7.2.4-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Mon Jan 19 12:32:36 2015 UTC (4 years, 10 months ago) by tomka
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
bump to 1.7.3, remove old

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 565C32BC)

1 # Copyright 1999-2014 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.4-r2.ebuild,v 1.9 2014/05/07 05:31:09 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 ~arm ~mips ppc ppc64 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? (
33 gtk? ( dev-python/pygtk )
34 || (
35 x11-misc/ktsuss
36 x11-libs/gksu
37 kde-base/kdesu
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 # Fix bug 441966 (urwid-1.1.0 compatibility)
64 epatch "${FILESDIR}"/${P}-urwid.patch
65 epatch "${FILESDIR}"/${P}-second-urwid.patch
66 epatch "${FILESDIR}"/${PN}-1.7.1_beta2-init.patch
67 epatch "${FILESDIR}"/${PN}-init-sve-start.patch
68 # Add a template for hex psk's and wpa (Bug 306423)
69 epatch "${FILESDIR}"/${PN}-1.7.1_pre20111210-wpa-psk-hex-template.patch
70 # Fix bug 416579 (should be included in next release)
71 epatch "${FILESDIR}"/${P}-fix-dbus-error.patch
72 # get rid of opts variable to fix bug 381885
73 sed -i "/opts/d" "in/init=gentoo=wicd.in" || die
74 # Make init script provide net per bug 405775
75 epatch "${FILESDIR}"/${PN}-1.7.1-provide-net.patch
76 # Need to ensure that generated scripts use Python 2 at run time.
77 sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \
78 -i setup.py || die "sed failed"
79 if use nls; then
80 # Asturian is faulty with PyBabel
81 # (https://bugs.launchpad.net/wicd/+bug/928589)
82 rm po/ast.po
83 else
84 # nuke translations
85 rm po/*.po
86 fi
87 python_copy_sources
88 }
89
90 src_configure() {
91 local myconf
92 use gtk || myconf="${myconf} --no-install-gtk"
93 use libnotify || myconf="${myconf} --no-use-notifications"
94 use ncurses || myconf="${myconf} --no-install-ncurses"
95 use pm-utils || myconf="${myconf} --no-install-pmutils"
96 configuration() {
97 $(PYTHON) ./setup.py configure --no-install-docs --resume=/usr/share/wicd/scripts/ --suspend=/usr/share/wicd/scripts/ --verbose ${myconf}
98 }
99 python_execute_function -s configuration
100 }
101
102 src_install() {
103 distutils_src_install
104 keepdir /var/lib/wicd/configurations \
105 || die "keepdir failed, critical for this app"
106 keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect} \
107 || die "keepdir failed, critical for this app"
108 keepdir /var/log/wicd \
109 || die "keepdir failed, critical for this app"
110 use nls || rm -rf "${D}"/usr/share/locale
111 systemd_dounit "${S}/other/wicd.service"
112
113 if use mac4lin; then
114 rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
115 mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
116 fi
117 if use ambiance; then
118 # Overwrite tray icons with ambiance icon
119 rm "${WORKDIR}/Icone Wicd Lucid"/signal*
120 cp "${WORKDIR}/Icone Wicd Lucid"/*.png "${D}"/usr/share/pixmaps/wicd/
121 fi
122 }
123
124 pkg_postinst() {
125 distutils_pkg_postinst
126
127 elog "You may need to restart the dbus service after upgrading wicd."
128 echo
129 elog "To start wicd at boot, add /etc/init.d/wicd to a runlevel and:"
130 elog "- Remove all net.* initscripts (except for net.lo) from all runlevels"
131 elog "- Add these scripts to the RC_PLUG_SERVICES line in /etc/rc.conf"
132 elog "(For example, rc_hotplug=\"!net.eth* !net.wlan*\")"
133 # Maintainer's note: the consolekit use flag short circuits a dbus rule and
134 # allows the connection. Else, you need to be in the group.
135 if ! has_version sys-auth/consolekit; then
136 ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
137 ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
138 fi
139 }

  ViewVC Help
Powered by ViewVC 1.1.20