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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Nov 15 19:40:09 2013 UTC (6 years ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Fix grep invocation (#491284 by Rodolphe Rocca), drop old.

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

1 # Copyright 1999-2013 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.4.ebuild,v 1.2 2013/10/01 22:19:42 tetromino 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" # 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 >=net-wireless/wpa_supplicant-0.7.3-r3[dbus]
38 >=virtual/udev-165[gudev]
39 bluetooth? ( >=net-wireless/bluez-4.82 )
40 avahi? ( net-dns/avahi:=[autoipd] )
41 connection-sharing? (
42 net-dns/dnsmasq[dhcp]
43 net-firewall/iptables )
44 gnutls? (
45 dev-libs/libgcrypt:=
46 net-libs/gnutls:= )
47 modemmanager? ( >=net-misc/modemmanager-0.7.991 )
48 nss? ( >=dev-libs/nss-3.11:= )
49 dhclient? ( =net-misc/dhcp-4*[client] )
50 dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
51 introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
52 ppp? ( >=net-dialup/ppp-2.4.5[ipv6] )
53 resolvconf? ( net-dns/openresolv )
54 systemd? ( >=sys-apps/systemd-183 )
55 || ( sys-power/upower >=sys-apps/systemd-183 )
56 "
57 RDEPEND="${COMMON_DEPEND}
58 consolekit? ( sys-auth/consolekit )
59 "
60 DEPEND="${COMMON_DEPEND}
61 dev-util/gtk-doc-am
62 >=dev-util/intltool-0.40
63 >=sys-devel/gettext-0.17
64 >=sys-kernel/linux-headers-2.6.29
65 virtual/pkgconfig
66 vala? ( $(vala_depend) )
67 test? (
68 dev-lang/python:2.7
69 dev-python/dbus-python[python_targets_python2_7]
70 dev-python/pygobject:2[python_targets_python2_7] )
71 "
72
73 sysfs_deprecated_check() {
74 ebegin "Checking for SYSFS_DEPRECATED support"
75
76 if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
77 eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
78 eerror "or NetworkManager will not work correctly."
79 eerror "See http://bugs.gentoo.org/333639 for more info."
80 die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
81 fi
82 eend $?
83 }
84
85 pkg_pretend() {
86 if use kernel_linux; then
87 get_version
88 if linux_config_exists; then
89 sysfs_deprecated_check
90 else
91 ewarn "Was unable to determine your kernel .config"
92 ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
93 ewarn "See http://bugs.gentoo.org/333639 for more info."
94 fi
95
96 fi
97 }
98
99 pkg_setup() {
100 enewgroup plugdev
101 }
102
103 src_prepare() {
104 DOC_CONTENTS="To modify system network connections without needing to enter the
105 root password, add your user account to the 'plugdev' group."
106
107 if use systemd; then
108 DOC_CONTENTS="${DOC_CONTENTS}\n\n
109 Starting with version 0.9.8.4, running\n
110 # systemctl enable NetworkManager\n
111 will both enable NetworkManager and allow nm-dispatcher to be activated via dbus."
112 fi
113
114 # Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832
115 epatch "${FILESDIR}/${PN}-0.9.8.4-pre-sleep.patch"
116
117 # Use python2.7 shebangs for test scripts
118 sed -e 's@\(^#!.*python\)@\12.7@' \
119 -i */tests/*.py || die
120
121 # Fix completiondir, avoid eautoreconf, bug #465100
122 sed -i "s|^completiondir =.*|completiondir = $(get_bashcompdir)|" \
123 cli/completion/Makefile.in || die "sed completiondir failed"
124
125 ## Force use of /run, avoid eautoreconf
126 sed -e 's:$localstatedir/run/:/run/:' -i configure || die
127
128 use vala && vala_src_prepare
129
130 epatch_user # don't remove, users often want custom patches for NM
131 }
132
133 src_configure() {
134 # TODO: enable wimax when we have a libnl:3 compatible revision of it
135 econf \
136 --disable-more-warnings \
137 --disable-static \
138 --localstatedir=/var \
139 --enable-ifnet \
140 --without-netconfig \
141 --with-dbus-sys-dir=/etc/dbus-1/system.d \
142 --with-udev-dir="$(udev_get_udevdir)" \
143 --with-iptables=/sbin/iptables \
144 --enable-concheck \
145 --with-crypto=$(usex nss nss gnutls) \
146 --with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
147 --with-suspend-resume=$(usex systemd systemd upower) \
148 $(use_enable introspection) \
149 $(use_enable ppp) \
150 --disable-wimax \
151 $(use_with dhclient) \
152 $(use_with dhcpcd) \
153 $(use_with modemmanager modem-manager-1) \
154 $(use_with resolvconf) \
155 $(use_enable test tests) \
156 $(use_enable vala) \
157 $(use_with wext) \
158 "$(systemd_with_unitdir)"
159 }
160
161 src_test() {
162 # bug #????
163 cp libnm-util/tests/certs/test_ca_cert.pem src/settings/plugins/ifnet/tests/ || die
164 Xemake check
165 }
166
167 src_install() {
168 default
169
170 readme.gentoo_create_doc
171
172 # Gentoo init script
173 newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
174
175 # /var/run/NetworkManager is used by some distros, but not by Gentoo
176 rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
177
178 # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
179 keepdir /etc/NetworkManager/dispatcher.d
180
181 # Provide openrc net dependency only when nm is connected
182 exeinto /etc/NetworkManager/dispatcher.d
183 newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
184 sed -e "s:@EPREFIX@:${EPREFIX}:g" \
185 -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
186
187 # Default conf.d file
188 newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
189
190 # Add keyfile plugin support
191 keepdir /etc/NetworkManager/system-connections
192 chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
193 insinto /etc/NetworkManager
194 newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
195
196 # Allow users in plugdev group to modify system connections
197 insinto /usr/share/polkit-1/rules.d/
198 doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
199
200 # https://bugzilla.redhat.com/show_bug.cgi?id=974811 + bug #477086
201 # systemd can't find "
202
203 # Remove useless .la files
204 prune_libtool_files --modules
205 }
206
207 pkg_postinst() {
208 readme.gentoo_print_elog
209
210 if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
211 ewarn "The ${PN} system configuration file has moved to a new location."
212 ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
213 ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
214 ewarn
215 ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
216 fi
217
218 # The polkit rules file moved to /usr/share
219 old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
220 if [[ -f "${old_rules}" ]]; then
221 case "$(md5sum ${old_rules})" in
222 574d0cfa7e911b1f7792077003060240* )
223 # Automatically delete the old rules.d file if the user did not change it
224 elog
225 elog "Removing old ${old_rules} ..."
226 rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
227 ;;
228 * )
229 elog "The ${old_rules}"
230 elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
231 elog "If you edited ${old_rules}"
232 elog "without changing its behavior, you may want to remove it."
233 ;;
234 esac
235 fi
236 }

  ViewVC Help
Powered by ViewVC 1.1.20