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

Contents of /net-misc/modemmanager/modemmanager-1.0.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Thu Jul 24 18:18:56 2014 UTC (5 months ago) by ssuominen
Branch: MAIN
Changes since 1.6: +3 -3 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-1.0.0-r2.ebuild,v 1.6 2014/03/08 11:23:44 pacho Exp $
4
5 EAPI="5"
6 inherit autotools eutils user multilib readme.gentoo toolchain-funcs udev virtualx
7
8 DESCRIPTION="Modem and mobile broadband management libraries"
9 HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
10 SRC_URI="http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
11
12 LICENSE="GPL-2+"
13 SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
14 KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
15 IUSE="policykit +qmi qmi-newest"
16 REQUIRED_USE="qmi-newest? ( qmi )"
17
18 RDEPEND="
19 >=dev-libs/glib-2.32:2
20 virtual/libgudev:=
21 policykit? ( >=sys-auth/polkit-0.106[introspection] )
22 qmi? ( >=net-libs/libqmi-1.4.0:= )
23 "
24 DEPEND="${RDEPEND}
25 dev-util/gdbus-codegen
26 >=dev-util/intltool-0.40
27 sys-devel/gettext
28 virtual/pkgconfig
29 "
30
31 S="${WORKDIR}/ModemManager-${PV}"
32
33 src_prepare() {
34 DOC_CONTENTS="If your USB modem shows up as a Flash drive when you plug it in,
35 You should install sys-apps/usb_modeswitch which will automatically
36 switch it over to USB modem mode whenever you plug it in.\n"
37
38 if use policykit; then
39 DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
40 add your user account to the 'plugdev' group."
41 fi
42
43 # Fix dbus activation file generation, bug #477710
44 epatch "${FILESDIR}/${P}-dbus-generation.patch"
45
46 # Add logging to serial port open failures (from 1.0 branch)
47 epatch "${FILESDIR}/${P}-logging-serial.patch"
48
49 epatch_user
50 eautoreconf
51 }
52
53 src_configure() {
54 # We don't have mbim in the tree
55 econf \
56 --disable-more-warnings \
57 --with-udev-base-dir="$(get_udevdir)" \
58 --disable-static \
59 --with-dist-version=${PVR} \
60 $(use_with policykit polkit) \
61 $(use_with qmi) \
62 $(use_with qmi-newest newest-qmi-commands) \
63 --without-mbim
64 }
65
66 src_install() {
67 default
68
69 # Allow users in plugdev group full control over their modem
70 if use policykit; then
71 insinto /usr/share/polkit-1/rules.d/
72 doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
73 fi
74
75 prune_libtool_files --modules
76
77 readme.gentoo_create_doc
78 }
79
80 pkg_postinst() {
81 use policykit && enewgroup plugdev
82
83 # The polkit rules file moved to /usr/share
84 old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
85 if [[ -f "${old_rules}" ]]; then
86 case "$(md5sum ${old_rules})" in
87 c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
88 # Automatically delete the old rules.d file if the user did not change it
89 elog
90 elog "Removing old ${old_rules} ..."
91 rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
92 ;;
93 * )
94 elog "The ${old_rules}"
95 elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
96 elog "If you edited ${old_rules}"
97 elog "without changing its behavior, you may want to remove it."
98 ;;
99 esac
100 fi
101
102 readme.gentoo_print_elog
103 }

  ViewVC Help
Powered by ViewVC 1.1.20