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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Jan 28 05:11:32 2013 UTC (6 years, 10 months ago) by tetromino
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Fix license; ModemManager had switched from LGPL to GPL in 2009. Drop old.

(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)

1 # Copyright 1999-2012 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.5.2.0-r2.ebuild,v 1.2 2012/12/02 22:46:07 ssuominen Exp $
4
5 EAPI="4"
6 GNOME_ORG_MODULE="ModemManager"
7
8 inherit gnome.org user multilib udev
9
10 DESCRIPTION="Modem and mobile broadband management libraries"
11 HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
12
13 LICENSE="LGPL-2.1"
14 SLOT="0"
15 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
16 IUSE="doc policykit test"
17
18 RDEPEND=">=dev-libs/glib-2.18:2
19 virtual/udev[gudev]
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="$(udev_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