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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20