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

Contents of /net-misc/networkmanager/networkmanager-0.9.4.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Aug 14 04:47:00 2012 UTC (22 months, 4 weeks ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Add 0.9.4.0-r7 with systemd USE flag; systemd USE flag will be disabled in 0.9.4.0-r6 to allow stabilization. Drop some old ebuilds.

(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.4.0-r2.ebuild,v 1.6 2012/06/27 14:41:17 ssuominen Exp $
4
5 EAPI="4"
6 GNOME_ORG_MODULE="NetworkManager"
7
8 inherit autotools eutils gnome.org linux-info systemd user
9
10 DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent."
11 HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 IUSE="avahi bluetooth connection-sharing dhclient +dhcpcd doc gnutls +introspection kernel_linux +nss modemmanager +ppp resolvconf systemd +wext wimax"
16 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
17
18 REQUIRED_USE="
19 modemmanager? ( ppp )
20 ^^ ( nss gnutls )
21 ^^ ( dhclient dhcpcd )"
22
23 # gobject-introspection-0.10.3 is needed due to gnome bug 642300
24 # wpa_supplicant-0.7.3-r3 is needed due to bug 359271
25 # libnl:1.1 is needed for linking to net-wireless/wimax libraries
26 # XXX: on bump, check that net-wireless/wimax is still using libnl:1.1 !
27 # TODO: Qt support?
28 COMMON_DEPEND=">=sys-apps/dbus-1.2
29 >=dev-libs/dbus-glib-0.75
30 || ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-147[extras] )
31 >=dev-libs/glib-2.26
32 >=sys-auth/polkit-0.97
33 >=net-libs/libsoup-2.26:2.4
34 >=net-wireless/wpa_supplicant-0.7.3-r3[dbus]
35 bluetooth? ( >=net-wireless/bluez-4.82 )
36 avahi? ( net-dns/avahi[autoipd] )
37 gnutls? (
38 dev-libs/libgcrypt
39 net-libs/gnutls )
40 nss? ( >=dev-libs/nss-3.11 )
41 dhclient? ( net-misc/dhcp )
42 dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
43 introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
44 ppp? ( >=net-dialup/ppp-2.4.5 )
45 resolvconf? ( net-dns/openresolv )
46 connection-sharing? (
47 net-dns/dnsmasq
48 net-firewall/iptables )
49 wimax? (
50 dev-libs/libnl:1.1
51 >=net-wireless/wimax-1.5.1 )
52 !wimax? ( dev-libs/libnl:3 )"
53
54 RDEPEND="${COMMON_DEPEND}
55 modemmanager? ( >=net-misc/modemmanager-0.4 )
56 systemd? ( >=sys-apps/systemd-31 )
57 !systemd? ( sys-auth/consolekit )"
58
59 DEPEND="${COMMON_DEPEND}
60 virtual/pkgconfig
61 >=dev-util/intltool-0.40
62 >=sys-devel/gettext-0.17
63 >=sys-kernel/linux-headers-2.6.29
64 doc? ( >=dev-util/gtk-doc-1.8 )"
65
66 sysfs_deprecated_check() {
67 ebegin "Checking for SYSFS_DEPRECATED support"
68
69 if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
70 eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
71 eerror "or NetworkManager will not work correctly."
72 eerror "See http://bugs.gentoo.org/333639 for more info."
73 die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
74 fi
75 eend $?
76 }
77
78 pkg_pretend() {
79 if use kernel_linux; then
80 get_version
81 if linux_config_exists; then
82 sysfs_deprecated_check
83 else
84 ewarn "Was unable to determine your kernel .config"
85 ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
86 ewarn "See http://bugs.gentoo.org/333639 for more info."
87 fi
88
89 fi
90 }
91
92 pkg_setup() {
93 enewgroup plugdev
94 }
95
96 src_prepare() {
97 # Don't build tests
98 epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch"
99 # Build against libnl:1.1 for net-wireless/wimax-1.5.2 compatibility
100 epatch "${FILESDIR}/${PN}-0.9.4.0-force-libnl1.1-r1.patch"
101 # Update init.d script to provide net and use inactive status if not connected
102 epatch "${FILESDIR}/${PN}-0.9.2.0-init-provide-net-r1.patch"
103 # Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832
104 epatch "${FILESDIR}/${PN}-0.9.2.0-pre-sleep.patch"
105 # Fix quote handling for global data (Bug #410821)
106 epatch "${FILESDIR}/${PN}-0.9.4.0-fix-quote-handling.patch"
107 # Fix uninitialized variables in libnm-glib
108 epatch "${FILESDIR}/${P}-libnm-glib-ensure_inited.patch"
109 epatch "${FILESDIR}/${P}-libnm-glib-init-gerror.patch"
110 # Fix building against linux-headers-3.4, #417055
111 epatch "${FILESDIR}/${P}-ip_ppp.h.patch"
112
113 eautoreconf
114 default
115 }
116
117 src_configure() {
118 ECONF="--disable-more-warnings
119 --disable-static
120 --localstatedir=/var
121 --with-distro=gentoo
122 --with-dbus-sys-dir=/etc/dbus-1/system.d
123 --with-udev-dir=/lib/udev
124 --with-iptables=/sbin/iptables
125 --enable-concheck
126 $(use_enable doc gtk-doc)
127 $(use_enable introspection)
128 $(use_enable ppp)
129 $(use_enable wimax)
130 $(use_with dhclient)
131 $(use_with dhcpcd)
132 $(use_with doc docs)
133 $(use_with resolvconf)
134 $(use_with wext)
135 $(use_with wimax libnl-1)
136 $(systemd_with_unitdir)"
137
138 if use nss ; then
139 ECONF="${ECONF} $(use_with nss crypto=nss)"
140 else
141 ECONF="${ECONF} $(use_with gnutls crypto=gnutls)"
142 fi
143
144 if use systemd; then
145 ECONF="${ECONF} --with-session-tracking=systemd"
146 else
147 ECONF="${ECONF} --with-session-tracking=ck"
148 fi
149
150 econf ${ECONF}
151 }
152
153 src_install() {
154 default
155 # /var/run/NetworkManager is used by some distros, but not by Gentoo
156 rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
157
158 # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
159 keepdir /etc/NetworkManager/dispatcher.d
160
161 # Provide openrc net dependency only when nm is connected
162 exeinto /etc/NetworkManager/dispatcher.d
163 newexe "${FILESDIR}/10-openrc-status-r1" 10-openrc-status
164 sed -e "s:@EPREFIX@:${EPREFIX}:g" \
165 -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
166
167 # Add keyfile plugin support
168 keepdir /etc/NetworkManager/system-connections
169 chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
170 insinto /etc/NetworkManager
171 newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
172
173 # Allow users in plugdev group to modify system connections
174 if has_version '<sys-auth/polkit-0.106'; then
175 insinto /etc/polkit-1/localauthority/10-vendor.d
176 doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.pkla"
177 fi
178
179 # Default conf.d file
180 newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
181
182 # Remove useless .la files
183 find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
184 }
185
186 pkg_postinst() {
187 elog "To modify system network connections without needing to enter the"
188 elog "root password, add your user account to the 'plugdev' group."
189
190 if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
191 ewarn "The ${PN} system configuration file has moved to a new location."
192 ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
193 ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
194 ewarn
195 ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
196 fi
197 }

  ViewVC Help
Powered by ViewVC 1.1.20