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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Tue Aug 14 04:47:00 2012 UTC (7 years, 5 months ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +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 tetromino 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 tetromino 1.2 # $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.9.4.0-r4.ebuild,v 1.1 2012/07/05 02:33:10 tetromino Exp $
4 tetromino 1.1
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     # 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    
117     epatch_user
118    
119     eautoreconf
120     default
121     }
122    
123     src_configure() {
124     ECONF="--disable-more-warnings
125     --disable-static
126     --localstatedir=/var
127     --with-distro=gentoo
128     --with-dbus-sys-dir=/etc/dbus-1/system.d
129     --with-udev-dir=/lib/udev
130     --with-iptables=/sbin/iptables
131     --enable-concheck
132     $(use_enable doc gtk-doc)
133     $(use_enable introspection)
134     $(use_enable ppp)
135     $(use_enable wimax)
136     $(use_with dhclient)
137     $(use_with dhcpcd)
138     $(use_with doc docs)
139     $(use_with resolvconf)
140     $(use_with wext)
141     $(use_with wimax libnl-1)
142     $(systemd_with_unitdir)"
143    
144     if use nss ; then
145     ECONF="${ECONF} $(use_with nss crypto=nss)"
146     else
147     ECONF="${ECONF} $(use_with gnutls crypto=gnutls)"
148     fi
149    
150     if use systemd; then
151     ECONF="${ECONF} --with-session-tracking=systemd"
152     else
153     ECONF="${ECONF} --with-session-tracking=ck"
154     fi
155    
156     econf ${ECONF}
157     }
158    
159     src_install() {
160     default
161     # /var/run/NetworkManager is used by some distros, but not by Gentoo
162     rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
163    
164     # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
165     keepdir /etc/NetworkManager/dispatcher.d
166    
167     # Provide openrc net dependency only when nm is connected
168     exeinto /etc/NetworkManager/dispatcher.d
169     newexe "${FILESDIR}/10-openrc-status-r2" 10-openrc-status
170     sed -e "s:@EPREFIX@:${EPREFIX}:g" \
171     -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
172    
173     # Add keyfile plugin support
174     keepdir /etc/NetworkManager/system-connections
175     chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
176     insinto /etc/NetworkManager
177     newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
178    
179     # Allow users in plugdev group to modify system connections
180     insinto /usr/share/polkit-1/rules.d/
181     doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
182     if has_version '<sys-auth/polkit-0.106'; then
183     insinto /etc/polkit-1/localauthority/10-vendor.d
184     doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.pkla"
185     fi
186    
187     # Default conf.d file
188     newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
189    
190     # Remove useless .la files
191     find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
192     }
193    
194     pkg_postinst() {
195     elog "To modify system network connections without needing to enter the"
196     elog "root password, add your user account to the 'plugdev' group."
197    
198     if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
199     ewarn "The ${PN} system configuration file has moved to a new location."
200     ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
201     ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
202     ewarn
203     ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
204     fi
205    
206     # The polkit rules file moved to /usr/share
207     old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
208     if [[ -f "${old_rules}" ]]; then
209     case "$(md5sum ${old_rules})" in
210     574d0cfa7e911b1f7792077003060240* )
211     # Automatically delete the old rules.d file if the user did not change it
212     elog
213     elog "Removing old ${old_rules} ..."
214     rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
215     ;;
216     * )
217     elog "The ${old_rules}"
218     elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
219     elog "If you edited ${old_rules}"
220     elog "without changing its behavior, you may want to remove it."
221     ;;
222     esac
223     fi
224     }

  ViewVC Help
Powered by ViewVC 1.1.20