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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Mar 15 13:31:29 2015 UTC (4 years, 8 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
x86 stable, bug 534012

(Portage version: 2.2.17/cvs/Linux x86_64, RepoMan options: --include-arches="x86", signed Manifest commit with key A188FBD4)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/modemmanager/modemmanager-1.4.2.ebuild,v 1.4 2015/03/15 11:50:34 pacho Exp $
4
5 EAPI="5"
6 GCONF_DEBUG="no"
7 GNOME2_LA_PUNT="yes"
8 VALA_USE_DEPEND="vapigen"
9
10 inherit gnome2 user readme.gentoo udev vala
11
12 DESCRIPTION="Modem and mobile broadband management libraries"
13 HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
14 SRC_URI="http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
15
16 LICENSE="GPL-2+"
17 SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
18 KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ppc ppc64 ~sparc x86"
19 IUSE="+introspection mbim policykit +qmi qmi-newest vala"
20 REQUIRED_USE="
21 qmi-newest? ( qmi )
22 vala? ( introspection )
23 "
24
25 RDEPEND="
26 >=dev-libs/glib-2.32:2
27 virtual/libgudev:=
28 introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
29 mbim? ( >=net-libs/libmbim-1.10 )
30 policykit? ( >=sys-auth/polkit-0.106[introspection] )
31 qmi? ( >=net-libs/libqmi-1.6.0:= )
32 "
33 DEPEND="${RDEPEND}
34 dev-util/gdbus-codegen
35 >=dev-util/intltool-0.40
36 sys-devel/gettext
37 virtual/pkgconfig
38 vala? ( $(vala_depend) )
39 "
40
41 S="${WORKDIR}/ModemManager-${PV}"
42
43 src_prepare() {
44 DOC_CONTENTS="If your USB modem shows up as a Flash drive when you plug it in,
45 You should install sys-apps/usb_modeswitch which will automatically
46 switch it over to USB modem mode whenever you plug it in.\n"
47
48 if use policykit; then
49 DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
50 add your user account to the 'plugdev' group."
51 fi
52
53 use vala && vala_src_prepare
54 gnome2_src_prepare
55 }
56
57 src_configure() {
58 gnome2_src_configure \
59 --disable-more-warnings \
60 --with-udev-base-dir="$(get_udevdir)" \
61 --disable-static \
62 --with-dist-version=${PVR} \
63 $(use_enable introspection) \
64 $(use_with mbim) \
65 $(use_with policykit polkit) \
66 $(use_with qmi) \
67 $(use_with qmi-newest newest-qmi-commands) \
68 $(use_enable vala)
69 }
70
71 src_install() {
72 gnome2_src_install
73
74 # Allow users in plugdev group full control over their modem
75 if use policykit; then
76 insinto /usr/share/polkit-1/rules.d/
77 doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
78 fi
79
80 readme.gentoo_create_doc
81 }
82
83 pkg_postinst() {
84 gnome2_pkg_postinst
85
86 use policykit && enewgroup plugdev
87
88 # The polkit rules file moved to /usr/share
89 old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
90 if [[ -f "${old_rules}" ]]; then
91 case "$(md5sum ${old_rules})" in
92 c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
93 # Automatically delete the old rules.d file if the user did not change it
94 elog
95 elog "Removing old ${old_rules} ..."
96 rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
97 ;;
98 * )
99 elog "The ${old_rules}"
100 elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
101 elog "If you edited ${old_rules}"
102 elog "without changing its behavior, you may want to remove it."
103 ;;
104 esac
105 fi
106
107 readme.gentoo_print_elog
108 }

  ViewVC Help
Powered by ViewVC 1.1.20