/[gentoo-x86]/net-misc/modemmanager/modemmanager-0.6.0.0.ebuild
Gentoo

Contents of /net-misc/modemmanager/modemmanager-0.6.0.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Thu Jul 24 18:18:56 2014 UTC (5 months ago) by ssuominen
Branch: MAIN
Changes since 1.11: +4 -4 lines
Use get_udevdir instead of the deprecated udev_get_udevdir. Use virtual/libgudev with := instead of virtual/udev for automatic rebuild.

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/modemmanager/modemmanager-0.6.0.0.ebuild,v 1.11 2013/02/03 19:38:37 ago Exp $
4
5 EAPI="4"
6 GNOME_ORG_MODULE="ModemManager"
7
8 inherit gnome.org user multilib toolchain-funcs udev
9
10 DESCRIPTION="Modem and mobile broadband management libraries"
11 HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
12
13 LICENSE="GPL-2+"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm ~ia64 ppc ppc64 ~sparc x86"
16 IUSE="doc policykit test"
17
18 RDEPEND=">=dev-libs/glib-2.18:2
19 virtual/libgudev
20 >=dev-libs/dbus-glib-0.86
21 net-dialup/ppp
22 policykit? ( >=sys-auth/polkit-0.99 )"
23 DEPEND="${RDEPEND}
24 doc? ( dev-libs/libxslt )
25 >=dev-util/intltool-0.35.0
26 sys-devel/gettext
27 virtual/pkgconfig"
28
29 DOCS="AUTHORS ChangeLog NEWS README"
30
31 src_configure() {
32 # ppp-2.4.5 changes the plugin directory
33 if has_version '=net-dialup/ppp-2.4.4*'; then
34 pppd_plugin_dir="pppd/2.4.4"
35 elif has_version '=net-dialup/ppp-2.4.5*'; then
36 pppd_plugin_dir="pppd/2.4.5"
37 fi
38
39 econf \
40 --disable-more-warnings \
41 --with-udev-base-dir="$(get_udevdir)" \
42 --disable-static \
43 --with-dist-version=${PVR} \
44 --with-pppd-plugin-dir="/usr/$(get_libdir)/${pppd_plugin_dir}" \
45 $(use_with doc docs) \
46 $(use_with policykit polkit) \
47 $(use_with test tests)
48 }
49
50 src_install() {
51 default
52 use doc && dohtml docs/spec.html
53
54 # Allow users in plugdev group full control over their modem
55 if use policykit; then
56 insinto /usr/share/polkit-1/rules.d/
57 doins "${FILESDIR}"/01-org.freedesktop.ModemManager.rules
58 if has_version '<sys-auth/polkit-0.106'; then
59 insinto /etc/polkit-1/localauthority/10-vendor.d
60 doins "${FILESDIR}/01-org.freedesktop.ModemManager.pkla"
61 fi
62 fi
63
64 # Remove useless .la files
65 find "${D}" -name '*.la' -delete
66 }
67
68 pkg_postinst() {
69 if use policykit; then
70 enewgroup plugdev
71 elog "To control your modem without needing to enter the root password,"
72 elog "add your user account to the 'plugdev' group."
73 elog
74 fi
75
76 # The polkit rules file moved to /usr/share
77 old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
78 if [[ -f "${old_rules}" ]]; then
79 case "$(md5sum ${old_rules})" in
80 c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
81 # Automatically delete the old rules.d file if the user did not change it
82 elog
83 elog "Removing old ${old_rules} ..."
84 rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
85 ;;
86 * )
87 elog "The ${old_rules}"
88 elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
89 elog "If you edited ${old_rules}"
90 elog "without changing its behavior, you may want to remove it."
91 ;;
92 esac
93 fi
94
95 elog "If your USB modem shows up as a Flash drive when you plug it in,"
96 elog "You should install sys-apps/usb_modeswitch which will automatically"
97 elog "switch it over to USB modem mode whenever you plug it in."
98 }

  ViewVC Help
Powered by ViewVC 1.1.20