/[gentoo-x86]/net-misc/networkmanager/networkmanager-0.9.8.8.ebuild
Gentoo

Contents of /net-misc/networkmanager/networkmanager-0.9.8.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Mon Sep 22 19:19:19 2014 UTC (5 years, 2 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Version bump, default to dhclient instead of dhcpcd (#493732), set proper pppd plugindir (#519986 by Clemente Aguiar, Sergey Popov, Agostino Sarubbo and others), remove wimax support (#522822 by Dion Moult), drop old.

(Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

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/networkmanager/networkmanager-0.9.8.8.ebuild,v 1.13 2014/07/24 17:07:05 ssuominen Exp $
4
5 EAPI="5"
6 GNOME_ORG_MODULE="NetworkManager"
7 VALA_MIN_API_VERSION="0.18"
8 VALA_USE_DEPEND="vapigen"
9
10 inherit bash-completion-r1 gnome.org linux-info systemd user readme.gentoo toolchain-funcs vala virtualx udev eutils
11
12 DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
13 HOMEPAGE="http://projects.gnome.org/NetworkManager/"
14
15 LICENSE="GPL-2+"
16 SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
17 IUSE="avahi bluetooth connection-sharing consolekit dhclient +dhcpcd gnutls +introspection kernel_linux +nss +modemmanager +ppp resolvconf systemd test vala +wext +wifi" # wimax
18
19 KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
20
21 REQUIRED_USE="
22 modemmanager? ( ppp )
23 ^^ ( nss gnutls )
24 ^^ ( dhclient dhcpcd )
25 "
26
27 # gobject-introspection-0.10.3 is needed due to gnome bug 642300
28 # wpa_supplicant-0.7.3-r3 is needed due to bug 359271
29 # TODO: Qt support?
30 COMMON_DEPEND="
31 >=sys-apps/dbus-1.2
32 >=dev-libs/dbus-glib-0.94
33 >=dev-libs/glib-2.30
34 >=dev-libs/libnl-3.2.7:3=
35 >=sys-auth/polkit-0.106
36 >=net-libs/libsoup-2.26:2.4=
37 virtual/libgudev:=
38 bluetooth? ( >=net-wireless/bluez-4.82 )
39 avahi? ( net-dns/avahi:=[autoipd] )
40 connection-sharing? (
41 net-dns/dnsmasq[dhcp]
42 net-firewall/iptables )
43 gnutls? (
44 dev-libs/libgcrypt:0=
45 net-libs/gnutls:= )
46 modemmanager? ( >=net-misc/modemmanager-0.7.991 )
47 nss? ( >=dev-libs/nss-3.11:= )
48 dhclient? ( =net-misc/dhcp-4*[client] )
49 dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
50 introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
51 ppp? ( >=net-dialup/ppp-2.4.5[ipv6] )
52 resolvconf? ( net-dns/openresolv )
53 systemd? ( >=sys-apps/systemd-183:0= )
54 || ( sys-power/upower sys-power/upower-pm-utils >=sys-apps/systemd-183 )
55 "
56 RDEPEND="${COMMON_DEPEND}
57 virtual/udev
58 consolekit? ( sys-auth/consolekit )
59 wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
60 "
61 DEPEND="${COMMON_DEPEND}
62 dev-util/gtk-doc-am
63 >=dev-util/intltool-0.40
64 >=sys-devel/gettext-0.17
65 >=sys-kernel/linux-headers-2.6.29
66 virtual/pkgconfig
67 vala? ( $(vala_depend) )
68 test? (
69 dev-lang/python:2.7
70 dev-python/dbus-python[python_targets_python2_7]
71 dev-python/pygobject:2[python_targets_python2_7] )
72 "
73
74 sysfs_deprecated_check() {
75 ebegin "Checking for SYSFS_DEPRECATED support"
76
77 if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
78 eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
79 eerror "or NetworkManager will not work correctly."
80 eerror "See http://bugs.gentoo.org/333639 for more info."
81 die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
82 fi
83 eend $?
84 }
85
86 pkg_pretend() {
87 if use kernel_linux; then
88 get_version
89 if linux_config_exists; then
90 sysfs_deprecated_check
91 else
92 ewarn "Was unable to determine your kernel .config"
93 ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
94 ewarn "See http://bugs.gentoo.org/333639 for more info."
95 fi
96
97 fi
98 }
99
100 pkg_setup() {
101 enewgroup plugdev
102 }
103
104 src_prepare() {
105 DOC_CONTENTS="To modify system network connections without needing to enter the
106 root password, add your user account to the 'plugdev' group."
107
108 # Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832
109 epatch "${FILESDIR}/${PN}-0.9.8.4-pre-sleep.patch"
110
111 # Use python2.7 shebangs for test scripts
112 sed -e 's@\(^#!.*python\)@\12.7@' \
113 -i */tests/*.py || die
114
115 # Fix completiondir, avoid eautoreconf, bug #465100
116 sed -i "s|^completiondir =.*|completiondir = $(get_bashcompdir)|" \
117 cli/completion/Makefile.in || die "sed completiondir failed"
118
119 ## Force use of /run, avoid eautoreconf
120 sed -e 's:$localstatedir/run/:/run/:' -i configure || die
121
122 use vala && vala_src_prepare
123
124 epatch_user # don't remove, users often want custom patches for NM
125 }
126
127 src_configure() {
128 # TODO: enable wimax when we have a libnl:3 compatible revision of it
129 # We are not ready for bluez5 yet
130 econf \
131 --enable-bluez4 \
132 --disable-more-warnings \
133 --disable-static \
134 --localstatedir=/var \
135 $(usex systemd '--disable-ifnet' '--enable-ifnet') \
136 --without-netconfig \
137 --with-dbus-sys-dir=/etc/dbus-1/system.d \
138 --with-udev-dir="$(get_udevdir)" \
139 --with-iptables=/sbin/iptables \
140 --enable-concheck \
141 --with-crypto=$(usex nss nss gnutls) \
142 --with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
143 --with-suspend-resume=$(usex systemd systemd upower) \
144 $(use_enable introspection) \
145 $(use_enable ppp) \
146 --disable-wimax \
147 $(use_with dhclient) \
148 $(use_with dhcpcd) \
149 $(use_with modemmanager modem-manager-1) \
150 $(use_with resolvconf) \
151 $(use_enable test tests) \
152 $(use_enable vala) \
153 $(use_with wext) \
154 "$(systemd_with_unitdir)"
155 }
156
157 src_test() {
158 # bug #????
159 cp libnm-util/tests/certs/test_ca_cert.pem src/settings/plugins/ifnet/tests/ || die
160 Xemake check
161 }
162
163 src_install() {
164 default
165
166 readme.gentoo_create_doc
167
168 # Gentoo init script
169 newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
170
171 # /var/run/NetworkManager is used by some distros, but not by Gentoo
172 rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
173
174 # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
175 keepdir /etc/NetworkManager/dispatcher.d
176
177 # Provide openrc net dependency only when nm is connected
178 exeinto /etc/NetworkManager/dispatcher.d
179 newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
180 sed -e "s:@EPREFIX@:${EPREFIX}:g" \
181 -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
182
183 # Default conf.d file
184 newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
185
186 # Add keyfile plugin support
187 keepdir /etc/NetworkManager/system-connections
188 chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
189
190 if ! use systemd; then
191 insinto /etc/NetworkManager
192 newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
193 fi
194
195 # Allow users in plugdev group to modify system connections
196 insinto /usr/share/polkit-1/rules.d/
197 doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
198
199 prune_libtool_files --modules
200 }
201
202 pkg_postinst() {
203 readme.gentoo_print_elog
204
205 if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
206 ewarn "The ${PN} system configuration file has moved to a new location."
207 ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
208 ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
209 ewarn
210 ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
211 fi
212
213 # The polkit rules file moved to /usr/share
214 old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
215 if [[ -f "${old_rules}" ]]; then
216 case "$(md5sum ${old_rules})" in
217 574d0cfa7e911b1f7792077003060240* )
218 # Automatically delete the old rules.d file if the user did not change it
219 elog
220 elog "Removing old ${old_rules} ..."
221 rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
222 ;;
223 * )
224 elog "The ${old_rules}"
225 elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
226 elog "If you edited ${old_rules}"
227 elog "without changing its behavior, you may want to remove it."
228 ;;
229 esac
230 fi
231
232 if use systemd; then
233 if [[ ${REPLACING_VERSIONS} < 0.9.8.6 ]]; then
234 ewarn "Ifnet plugin won't be used with systemd support enabled"
235 ewarn "as it is meant to be used with openRC and can cause collisions"
236 ewarn "(like bug #485658)."
237 ewarn "Because of this, you will likely need to reconfigure some of"
238 ewarn "your networks."
239 fi
240
241 if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
242 if grep -q plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
243 ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
244 ewarn "Since it won't be used when running under Systemd, you will need to stop setting"
245 ewarn "ifnet plugin there to allow NetworkManager to work."
246 fi
247 fi
248 fi
249 }

  ViewVC Help
Powered by ViewVC 1.1.20