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

Contents of /net-misc/networkmanager/networkmanager-0.8.2-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Feb 8 13:31:01 2011 UTC (8 years, 10 months ago) by dagger
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix temp files creation in keyfile plugin bug #349003

(Portage version: 2.1.9.35/cvs/Linux x86_64)

1 # Copyright 1999-2011 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.8.2-r5.ebuild,v 1.1 2011/02/06 15:06:17 qiaomuf Exp $
4
5 EAPI="2"
6
7 inherit autotools eutils gnome.org linux-info
8
9 # NetworkManager likes itself with capital letters
10 MY_PN=${PN/networkmanager/NetworkManager}
11 MY_P=${MY_PN}-${PV}
12
13 DESCRIPTION="Network configuration and management in an easy way. Desktop environment independent."
14 HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
15 SRC_URI="${SRC_URI//${PN}/${MY_PN}}"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
20 IUSE="avahi bluetooth doc nss gnutls dhclient dhcpcd kernel_linux resolvconf connection-sharing"
21
22 RDEPEND=">=sys-apps/dbus-1.2
23 >=dev-libs/dbus-glib-0.75
24 >=net-wireless/wireless-tools-28_pre9
25 >=sys-fs/udev-145[extras]
26 >=dev-libs/glib-2.18
27 >=sys-auth/polkit-0.92
28 >=dev-libs/libnl-1.1
29 >=net-misc/modemmanager-0.4
30 >=net-wireless/wpa_supplicant-0.5.10[dbus]
31 bluetooth? ( net-wireless/bluez )
32 || ( sys-libs/e2fsprogs-libs <sys-fs/e2fsprogs-1.41.0 )
33 avahi? ( net-dns/avahi[autoipd] )
34 gnutls? (
35 nss? ( >=dev-libs/nss-3.11 )
36 !nss? ( dev-libs/libgcrypt
37 net-libs/gnutls ) )
38 !gnutls? ( >=dev-libs/nss-3.11 )
39 dhclient? (
40 dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
41 !dhcpcd? ( net-misc/dhcp ) )
42 !dhclient? ( >=net-misc/dhcpcd-4.0.0_rc3 )
43 resolvconf? ( net-dns/openresolv )
44 connection-sharing? (
45 net-dns/dnsmasq
46 net-firewall/iptables )"
47
48 DEPEND="${RDEPEND}
49 dev-util/pkgconfig
50 dev-util/intltool
51 >=net-dialup/ppp-2.4.5
52 doc? ( >=dev-util/gtk-doc-1.8 )"
53
54 S=${WORKDIR}/${MY_P}
55
56 sysfs_deprecated_check() {
57 ebegin "Checking for SYSFS_DEPRECATED support"
58
59 if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
60 eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
61 eerror "or NetworkManager will not work correctly."
62 eerror "See http://bugs.gentoo.org/333639 for more info."
63 die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
64 fi
65 eend $?
66 }
67
68 pkg_setup() {
69 # FIXME. Required by -confchanges.patch, but the patch is invalid as
70 # ConsoleKit and PolicyKit is enough to get authorization.
71 enewgroup plugdev
72
73 if use kernel_linux; then
74 get_version
75 if linux_config_exists; then
76 sysfs_deprecated_check
77 else
78 ewarn "Was unable to determine your kernel .config"
79 ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
80 ewarn "See http://bugs.gentoo.org/333639 for more info."
81 fi
82
83 fi
84 }
85
86 src_prepare() {
87 # dbus policy patch
88 epatch "${FILESDIR}/${P}-confchanges.patch"
89 # accept "gw" in /etc/conf.d/net (bug #339215)
90 epatch "${FILESDIR}/${P}-accept-gw.patch"
91 # fix shared connection wrt bug #350476
92 # fix parsing dhclient.conf wrt bug #352638
93 epatch "${FILESDIR}/${P}-shared-connection.patch"
94 # Backports #1
95 epatch "${FILESDIR}/${P}-1.patch"
96 # won't crash upon startup for 32bit machines wrt bug #353807
97 epatch "${FILESDIR}/${P}-fix-timestamp.patch"
98 # fix tests wrt bug #353549
99 epatch "${FILESDIR}/${P}-fix-tests.patch"
100 eautoreconf
101 }
102
103 src_configure() {
104 ECONF="--disable-more-warnings
105 --localstatedir=/var
106 --with-distro=gentoo
107 --with-dbus-sys-dir=/etc/dbus-1/system.d
108 --with-udev-dir=/etc/udev
109 --with-iptables=/sbin/iptables
110 $(use_enable doc gtk-doc)
111 $(use_with doc docs)
112 $(use_with resolvconf)"
113
114 # default is dhcpcd (if none or both are specified), ISC dchclient otherwise
115 if use dhclient ; then
116 if use dhcpcd ; then
117 ECONF="${ECONF} --with-dhcpcd --without-dhclient"
118 else
119 ECONF="${ECONF} --with-dhclient --without-dhcpcd"
120 fi
121 else
122 ECONF="${ECONF} --with-dhcpcd --without-dhclient"
123 fi
124
125 # default is NSS (if none or both are specified), GnuTLS otherwise
126 if use gnutls ; then
127 if use nss ; then
128 ECONF="${ECONF} --with-crypto=nss"
129 else
130 ECONF="${ECONF} --with-crypto=gnutls"
131 fi
132 else
133 ECONF="${ECONF} --with-crypto=nss"
134 fi
135
136 econf ${ECONF}
137 }
138
139 src_install() {
140 emake DESTDIR="${D}" install || die "emake install failed"
141
142 # Need to keep the /var/run/NetworkManager directory
143 keepdir /var/run/NetworkManager
144
145 # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
146 keepdir /etc/NetworkManager/dispatcher.d
147
148 dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed"
149
150 # Add keyfile plugin support
151 keepdir /etc/NetworkManager/system-connections
152 insinto /etc/NetworkManager
153 newins "${FILESDIR}/nm-system-settings.conf-ifnet" nm-system-settings.conf \
154 || die "newins failed"
155 }
156
157 pkg_postinst() {
158 elog "You will need to reload DBus if this is your first time installing"
159 elog "NetworkManager, or if you're upgrading from 0.7 or older."
160 elog ""
161 }

  ViewVC Help
Powered by ViewVC 1.1.20