1 |
tetromino 12/02/01 07:46:37 |
2 |
|
3 |
Added: networkmanager-0.9.2.0-r3.ebuild |
4 |
Removed: networkmanager-0.9.1.95.ebuild |
5 |
Log: |
6 |
Install nm-interfaces service to provide net dependency for openrc only when nm is connected (inspired by Xake's solution in bug #252137). Correctly deal with single quotes in /etc/conf.d/hostname. Do not create /var/run/NetworkManager, it's not needed in Gentoo (bug #401019, thanks to Maxim Kammerer). Drop old. |
7 |
|
8 |
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 net-misc/networkmanager/networkmanager-0.9.2.0-r3.ebuild |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.2.0-r3.ebuild?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.2.0-r3.ebuild?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: networkmanager-0.9.2.0-r3.ebuild |
17 |
=================================================================== |
18 |
# Copyright 1999-2012 Gentoo Foundation |
19 |
# Distributed under the terms of the GNU General Public License v2 |
20 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.2.0-r3.ebuild,v 1.1 2012/02/01 07:46:37 tetromino Exp $ |
21 |
|
22 |
EAPI="4" |
23 |
GNOME_ORG_MODULE="NetworkManager" |
24 |
|
25 |
inherit autotools eutils gnome.org linux-info systemd |
26 |
|
27 |
DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent." |
28 |
HOMEPAGE="http://www.gnome.org/projects/NetworkManager/" |
29 |
|
30 |
LICENSE="GPL-2" |
31 |
SLOT="0" |
32 |
IUSE="avahi bluetooth doc +nss gnutls dhclient +dhcpcd +introspection |
33 |
kernel_linux +ppp resolvconf connection-sharing wimax" |
34 |
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" |
35 |
|
36 |
REQUIRED_USE=" |
37 |
^^ ( nss gnutls ) |
38 |
^^ ( dhclient dhcpcd )" |
39 |
|
40 |
# gobject-introspection-0.10.3 is needed due to gnome bug 642300 |
41 |
# wpa_supplicant-0.7.3-r3 is needed due to bug 359271 |
42 |
# libnl:1.1 is needed for linking to net-wireless/wimax libraries |
43 |
# XXX: on bump, check that net-wireless/wimax is still using libnl:1.1 ! |
44 |
# TODO: Qt support? |
45 |
COMMON_DEPEND=">=sys-apps/dbus-1.2 |
46 |
>=dev-libs/dbus-glib-0.75 |
47 |
>=net-wireless/wireless-tools-28_pre9 |
48 |
|| ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-147[extras] ) |
49 |
>=dev-libs/glib-2.26 |
50 |
>=sys-auth/polkit-0.97 |
51 |
dev-libs/libnl:1.1 |
52 |
>=net-wireless/wpa_supplicant-0.7.3-r3[dbus] |
53 |
bluetooth? ( >=net-wireless/bluez-4.82 ) |
54 |
avahi? ( net-dns/avahi[autoipd] ) |
55 |
gnutls? ( |
56 |
dev-libs/libgcrypt |
57 |
net-libs/gnutls ) |
58 |
nss? ( >=dev-libs/nss-3.11 ) |
59 |
dhclient? ( net-misc/dhcp ) |
60 |
dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 ) |
61 |
introspection? ( >=dev-libs/gobject-introspection-0.10.3 ) |
62 |
ppp? ( |
63 |
>=net-misc/modemmanager-0.4 |
64 |
>=net-dialup/ppp-2.4.5 ) |
65 |
resolvconf? ( net-dns/openresolv ) |
66 |
connection-sharing? ( |
67 |
net-dns/dnsmasq |
68 |
net-firewall/iptables ) |
69 |
wimax? ( >=net-wireless/wimax-1.5.1 )" |
70 |
|
71 |
RDEPEND="${COMMON_DEPEND} |
72 |
sys-auth/consolekit" |
73 |
|
74 |
DEPEND="${COMMON_DEPEND} |
75 |
dev-util/pkgconfig |
76 |
>=dev-util/intltool-0.40 |
77 |
>=sys-devel/gettext-0.17 |
78 |
doc? ( >=dev-util/gtk-doc-1.8 )" |
79 |
|
80 |
sysfs_deprecated_check() { |
81 |
ebegin "Checking for SYSFS_DEPRECATED support" |
82 |
|
83 |
if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then |
84 |
eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel" |
85 |
eerror "or NetworkManager will not work correctly." |
86 |
eerror "See http://bugs.gentoo.org/333639 for more info." |
87 |
die "CONFIG_SYSFS_DEPRECATED_V2 support detected!" |
88 |
fi |
89 |
eend $? |
90 |
} |
91 |
|
92 |
pkg_pretend() { |
93 |
if use kernel_linux; then |
94 |
get_version |
95 |
if linux_config_exists; then |
96 |
sysfs_deprecated_check |
97 |
else |
98 |
ewarn "Was unable to determine your kernel .config" |
99 |
ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly." |
100 |
ewarn "See http://bugs.gentoo.org/333639 for more info." |
101 |
fi |
102 |
|
103 |
fi |
104 |
} |
105 |
|
106 |
pkg_setup() { |
107 |
enewgroup plugdev |
108 |
} |
109 |
|
110 |
src_prepare() { |
111 |
# Don't build tests |
112 |
epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch" |
113 |
# Build against libnl:1.1 for net-wireless/wimax-1.5.2 compatibility |
114 |
epatch "${FILESDIR}/${PN}-0.9.1.95-force-libnl1.1.patch" |
115 |
# Migrate to openrc style |
116 |
epatch "${FILESDIR}/${P}-ifnet-openrc-style.patch" |
117 |
# Ignore per-user connections |
118 |
epatch "${FILESDIR}/${P}-ifnet-ignore-user-connections.patch" |
119 |
# Remove system prefix |
120 |
epatch "${FILESDIR}/${P}-ifnet-remove-system-prefix.patch" |
121 |
# Correctly deal with single quotes in /etc/conf.d/hostname |
122 |
epatch "${FILESDIR}/${P}-ifnet-unquote-hostname.patch" |
123 |
|
124 |
eautoreconf |
125 |
default |
126 |
} |
127 |
|
128 |
src_configure() { |
129 |
ECONF="--disable-more-warnings |
130 |
--disable-static |
131 |
--localstatedir=/var |
132 |
--with-distro=gentoo |
133 |
--with-dbus-sys-dir=/etc/dbus-1/system.d |
134 |
--with-udev-dir=/lib/udev |
135 |
--with-iptables=/sbin/iptables |
136 |
$(use_enable doc gtk-doc) |
137 |
$(use_enable introspection) |
138 |
$(use_enable ppp) |
139 |
$(use_enable wimax) |
140 |
$(use_with dhclient) |
141 |
$(use_with dhcpcd) |
142 |
$(use_with doc docs) |
143 |
$(use_with resolvconf) |
144 |
$(systemd_with_unitdir)" |
145 |
|
146 |
if use nss ; then |
147 |
ECONF="${ECONF} $(use_with nss crypto=nss)" |
148 |
else |
149 |
ECONF="${ECONF} $(use_with gnutls crypto=gnutls)" |
150 |
fi |
151 |
|
152 |
econf ${ECONF} |
153 |
} |
154 |
|
155 |
src_install() { |
156 |
default |
157 |
|
158 |
# Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts |
159 |
keepdir /etc/NetworkManager/dispatcher.d |
160 |
|
161 |
# Service that provides openrc net dependency only when nm is connected |
162 |
doinitd "${FILESDIR}/nm-interfaces" |
163 |
insinto /etc/NetworkManager/dispatcher.d |
164 |
doins "${FILESDIR}/10-openrc-nm-interfaces" |
165 |
|
166 |
# Add keyfile plugin support |
167 |
keepdir /etc/NetworkManager/system-connections |
168 |
chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765 |
169 |
insinto /etc/NetworkManager |
170 |
newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf |
171 |
|
172 |
# Allow users in plugdev group to modify system connections |
173 |
insinto /etc/polkit-1/localauthority/10-vendor.d |
174 |
doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.pkla" |
175 |
|
176 |
# Remove useless .la files |
177 |
find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" |
178 |
} |
179 |
|
180 |
pkg_postinst() { |
181 |
elog "To modify system network connections without needing to enter the" |
182 |
elog "root password, add your user account to the 'plugdev' group." |
183 |
} |