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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Apr 5 03:09:09 2012 UTC (7 years, 8 months ago) by qiaomuf
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix quote handling for global data

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

  ViewVC Help
Powered by ViewVC 1.1.20