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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Aug 10 17:34:29 2012 UTC (2 years, 1 month ago) by ssuominen
Branch: MAIN
Query correct udevdir from udev.pc pkg-config file.

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

1 ssuominen 1.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-r5.ebuild,v 1.1 2012/07/17 05:43:11 tetromino Exp $
4    
5     EAPI="4"
6     GNOME_ORG_MODULE="NetworkManager"
7    
8     inherit autotools eutils gnome.org linux-info systemd user toolchain-funcs
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     # Fix ipv6 default route bug, #417529
113     epatch "${FILESDIR}/${P}-ipv6-route.patch"
114     # Bug #335147, https://bugzilla.gnome.org/show_bug.cgi?id=679428
115     epatch "${FILESDIR}/${P}-dhclient-ipv6.patch"
116     # Bug #426844, wext vs. nl80211 API issues
117     epatch "${FILESDIR}/${P}-nl80211-encryption-caps.patch"
118     epatch "${FILESDIR}/${P}-wifi-kernel-api.patch"
119    
120     epatch_user
121    
122     eautoreconf
123     default
124     }
125    
126     src_configure() {
127     local udevdir=/lib/udev
128     has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
129    
130     ECONF="--disable-more-warnings
131     --disable-static
132     --localstatedir=/var
133     --with-distro=gentoo
134     --with-dbus-sys-dir=/etc/dbus-1/system.d
135     --with-udev-dir=${udevdir}
136     --with-iptables=/sbin/iptables
137     --enable-concheck
138     $(use_enable doc gtk-doc)
139     $(use_enable introspection)
140     $(use_enable ppp)
141     $(use_enable wimax)
142     $(use_with dhclient)
143     $(use_with dhcpcd)
144     $(use_with doc docs)
145     $(use_with resolvconf)
146     $(use_with wext)
147     $(use_with wimax libnl-1)
148     $(systemd_with_unitdir)"
149    
150     if use nss ; then
151     ECONF="${ECONF} $(use_with nss crypto=nss)"
152     else
153     ECONF="${ECONF} $(use_with gnutls crypto=gnutls)"
154     fi
155    
156     if use systemd; then
157     ECONF="${ECONF} --with-session-tracking=systemd"
158     else
159     ECONF="${ECONF} --with-session-tracking=ck"
160     fi
161    
162     econf ${ECONF}
163     }
164    
165     src_install() {
166     default
167     # /var/run/NetworkManager is used by some distros, but not by Gentoo
168     rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
169    
170     # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
171     keepdir /etc/NetworkManager/dispatcher.d
172    
173     # Provide openrc net dependency only when nm is connected
174     exeinto /etc/NetworkManager/dispatcher.d
175     newexe "${FILESDIR}/10-openrc-status-r2" 10-openrc-status
176     sed -e "s:@EPREFIX@:${EPREFIX}:g" \
177     -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
178    
179     # Add keyfile plugin support
180     keepdir /etc/NetworkManager/system-connections
181     chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
182     insinto /etc/NetworkManager
183     newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
184    
185     # Allow users in plugdev group to modify system connections
186     insinto /usr/share/polkit-1/rules.d/
187     doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
188     if has_version '<sys-auth/polkit-0.106'; then
189     insinto /etc/polkit-1/localauthority/10-vendor.d
190     doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.pkla"
191     fi
192    
193     # Default conf.d file
194     newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
195    
196     # Remove useless .la files
197     find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
198     }
199    
200     pkg_postinst() {
201     elog "To modify system network connections without needing to enter the"
202     elog "root password, add your user account to the 'plugdev' group."
203    
204     if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
205     ewarn "The ${PN} system configuration file has moved to a new location."
206     ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
207     ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
208     ewarn
209     ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
210     fi
211    
212     # The polkit rules file moved to /usr/share
213     old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
214     if [[ -f "${old_rules}" ]]; then
215     case "$(md5sum ${old_rules})" in
216     574d0cfa7e911b1f7792077003060240* )
217     # Automatically delete the old rules.d file if the user did not change it
218     elog
219     elog "Removing old ${old_rules} ..."
220     rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
221     ;;
222     * )
223     elog "The ${old_rules}"
224     elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
225     elog "If you edited ${old_rules}"
226     elog "without changing its behavior, you may want to remove it."
227     ;;
228     esac
229     fi
230     }

  ViewVC Help
Powered by ViewVC 1.1.20