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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Jun 10 09:25:33 2013 UTC (6 years, 5 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump, drop old

(Portage version: 2.1.12.2/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.7.995.ebuild,v 1.1 2013/01/28 07:05:05 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 eutils gnome.org linux-info systemd user toolchain-funcs vala virtualx udev
11
12 DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
13 HOMEPAGE="http://www.gnome.org/projects/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 doc gnutls
18 +introspection kernel_linux +nss modemmanager +ppp resolvconf systemd test vala
19 +wext" # wimax
20 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
21
22 REQUIRED_USE="
23 modemmanager? ( ppp )
24 ^^ ( nss gnutls )
25 ^^ ( dhclient dhcpcd )
26 ?? ( consolekit systemd )
27 "
28
29 # gobject-introspection-0.10.3 is needed due to gnome bug 642300
30 # wpa_supplicant-0.7.3-r3 is needed due to bug 359271
31 # TODO: Qt support?
32 COMMON_DEPEND=">=sys-apps/dbus-1.2
33 >=dev-libs/dbus-glib-0.94
34 >=dev-libs/glib-2.30
35 >=dev-libs/libnl-3.2.7:3=
36 >=sys-auth/polkit-0.106
37 >=net-libs/libsoup-2.26:2.4=
38 >=net-wireless/wpa_supplicant-0.7.3-r3[dbus]
39 >=virtual/udev-165[gudev]
40 bluetooth? ( >=net-wireless/bluez-4.82 )
41 avahi? ( net-dns/avahi:=[autoipd] )
42 connection-sharing? (
43 net-dns/dnsmasq
44 net-firewall/iptables )
45 gnutls? (
46 dev-libs/libgcrypt:=
47 net-libs/gnutls:= )
48 modemmanager? ( >=net-misc/modemmanager-0.7.990 )
49 nss? ( >=dev-libs/nss-3.11:= )
50 dhclient? ( =net-misc/dhcp-4*[client] )
51 dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
52 introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
53 ppp? ( >=net-dialup/ppp-2.4.5[ipv6] )
54 resolvconf? ( net-dns/openresolv )
55 systemd? ( >=sys-apps/systemd-183 )
56 !systemd? ( sys-power/upower )
57 "
58 RDEPEND="${COMMON_DEPEND}
59 consolekit? ( sys-auth/consolekit )
60 "
61 DEPEND="${COMMON_DEPEND}
62 >=dev-util/intltool-0.40
63 >=sys-devel/gettext-0.17
64 >=sys-kernel/linux-headers-2.6.29
65 virtual/pkgconfig
66 doc? ( >=dev-util/gtk-doc-1.8 )
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 # Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832
106 epatch "${FILESDIR}/${PN}-0.9.7.995-pre-sleep.patch"
107
108 # Use python2.7 shebangs for test scripts
109 sed -e 's@\(^#!.*python\)@\12.7@' \
110 -i */tests/*.py || die
111
112 epatch_user
113
114 use vala && vala_src_prepare
115
116 # Force use of /run, avoid eautoreconf
117 sed -e 's:$localstatedir/run/:/run/:' -i configure || die
118
119 default
120 }
121
122 src_configure() {
123 # TODO: enable wimax when we have a libnl:3 compatible revision of it
124 econf \
125 --disable-more-warnings \
126 --disable-static \
127 --localstatedir=/var \
128 --enable-ifnet \
129 --without-netconfig \
130 --with-dbus-sys-dir=/etc/dbus-1/system.d \
131 --with-udev-dir="$(udev_get_udevdir)" \
132 --with-iptables=/sbin/iptables \
133 --enable-concheck \
134 --with-crypto=$(usex nss nss gnutls) \
135 --with-session-tracking=$(usex consolekit consolekit $(usex systemd systemd no)) \
136 --with-suspend-resume=$(usex systemd systemd upower) \
137 $(use_enable doc) \
138 $(use_enable introspection) \
139 $(use_enable ppp) \
140 --disable-wimax \
141 $(use_with dhclient) \
142 $(use_with dhcpcd) \
143 $(use_with doc docs) \
144 $(use_with modemmanager modem-manager-1) \
145 $(use_with resolvconf) \
146 $(use_enable test tests) \
147 $(use_enable vala) \
148 $(use_with wext) \
149 "$(systemd_with_unitdir)"
150 }
151
152 src_test() {
153 cp libnm-util/tests/certs/test_ca_cert.pem src/settings/plugins/ifnet/tests/ || die
154 Xemake check
155 }
156
157 src_install() {
158 default
159
160 # Gentoo init script
161 newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
162
163 # /var/run/NetworkManager is used by some distros, but not by Gentoo
164 rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
165
166 # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
167 keepdir /etc/NetworkManager/dispatcher.d
168
169 if use systemd; then
170 # Our init.d script requires running a dispatcher script that annoys
171 # systemd users; bug #434692
172 rm -rv "${ED}/etc/init.d" || die "rm failed"
173 else
174 # Provide openrc net dependency only when nm is connected
175 exeinto /etc/NetworkManager/dispatcher.d
176 newexe "${FILESDIR}/10-openrc-status-r3" 10-openrc-status
177 sed -e "s:@EPREFIX@:${EPREFIX}:g" \
178 -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
179
180 # Default conf.d file
181 newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
182 fi
183
184 # Add keyfile plugin support
185 keepdir /etc/NetworkManager/system-connections
186 chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
187 insinto /etc/NetworkManager
188 newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
189
190 # Allow users in plugdev group to modify system connections
191 insinto /usr/share/polkit-1/rules.d/
192 doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
193
194 # Remove useless .la files
195 prune_libtool_files --modules
196 }
197
198 pkg_postinst() {
199 elog "To modify system network connections without needing to enter the"
200 elog "root password, add your user account to the 'plugdev' group."
201
202 if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
203 ewarn "The ${PN} system configuration file has moved to a new location."
204 ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
205 ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
206 ewarn
207 ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
208 fi
209
210 # The polkit rules file moved to /usr/share
211 old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
212 if [[ -f "${old_rules}" ]]; then
213 case "$(md5sum ${old_rules})" in
214 574d0cfa7e911b1f7792077003060240* )
215 # Automatically delete the old rules.d file if the user did not change it
216 elog
217 elog "Removing old ${old_rules} ..."
218 rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
219 ;;
220 * )
221 elog "The ${old_rules}"
222 elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
223 elog "If you edited ${old_rules}"
224 elog "without changing its behavior, you may want to remove it."
225 ;;
226 esac
227 fi
228 }

  ViewVC Help
Powered by ViewVC 1.1.20