1 |
commit: f4cc5018fb6d589921ea4a72e3d903c1cf070bb3 |
2 |
Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 14 10:59:58 2017 +0000 |
4 |
Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 14 10:59:58 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4cc5018 |
7 |
|
8 |
net-dialup/speedtouch-usb: update ebuild - new EAPI, replace deprecated built_with_use with has_version |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.1 |
11 |
|
12 |
.../speedtouch-usb-3.0.1.2-r3.ebuild | 28 ++++++++-------------- |
13 |
1 file changed, 10 insertions(+), 18 deletions(-) |
14 |
|
15 |
diff --git a/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild |
16 |
index 9a948fa1726..4cbf0542da6 100644 |
17 |
--- a/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild |
18 |
+++ b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild |
19 |
@@ -1,9 +1,11 @@ |
20 |
-# Copyright 1999-2013 Gentoo Foundation |
21 |
+# Copyright 1999-2017 Gentoo Foundation |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
+EAPI=6 |
25 |
+ |
26 |
inherit eutils linux-info |
27 |
|
28 |
-DESCRIPTION="Firmware, kernel driver and configuration instructions for Alcatel SpeedTouch USB modems" |
29 |
+DESCRIPTION="Firmware and configuration instructions for Alcatel SpeedTouch USB modems" |
30 |
HOMEPAGE="http://www.speedtouch.com/" |
31 |
SRC_URI="http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_${PV//./}.zip" |
32 |
|
33 |
@@ -11,23 +13,12 @@ SRC_URI="http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_$ |
34 |
LICENSE="SpeedTouch-USB-Firmware" |
35 |
SLOT="0" |
36 |
KEYWORDS="~amd64 x86" |
37 |
-IUSE="" |
38 |
|
39 |
RDEPEND="net-dialup/ppp" |
40 |
DEPEND="app-arch/unzip" |
41 |
|
42 |
S="${WORKDIR}" |
43 |
|
44 |
-pkg_setup() { |
45 |
- linux-info_pkg_setup |
46 |
- |
47 |
- if kernel_is lt 2 6 10 ; then |
48 |
- eerror "The kernel-space driver exists only in kernels >= 2.6.10." |
49 |
- eerror "Please upgrade the kernel." |
50 |
- die "Unsupported kernel version" |
51 |
- fi |
52 |
-} |
53 |
- |
54 |
src_install() { |
55 |
local FILE_VER="${PV#*.}" |
56 |
FILE_VER="${PV%%.*}.${FILE_VER//./}" # {major_ver}.{minor_digits} |
57 |
@@ -53,10 +44,10 @@ src_install() { |
58 |
# Copy to the firmware directory |
59 |
insinto /lib/firmware |
60 |
insopts -m 600 |
61 |
- doins speedtch-{1,2}.bin.{2,4} || die "doins firmware failed" |
62 |
+ doins speedtch-{1,2}.bin.{2,4} |
63 |
|
64 |
# Symlinks for other revisions of the modem |
65 |
- cd "${D}/lib/firmware" |
66 |
+ pushd "${D}/lib/firmware" >/dev/null || die |
67 |
for n in 1 2 ; do |
68 |
for rev in 0 1 ; do |
69 |
ln -sfn speedtch-${n}.bin.2 speedtch-${n}.bin.${rev} |
70 |
@@ -64,9 +55,10 @@ src_install() { |
71 |
# Seems like a reasonable guess, for revision 3 |
72 |
ln -sfn speedtch-${stub}${n}.bin.4 speedtch-${n}.bin.3 |
73 |
done |
74 |
+ popd >/dev/null || die |
75 |
|
76 |
# Documentation necessary to complete the setup |
77 |
- dodoc "${FILESDIR}/README" || die "dodoc failed" |
78 |
+ dodoc "${FILESDIR}/README" |
79 |
} |
80 |
|
81 |
pkg_postinst() { |
82 |
@@ -83,13 +75,13 @@ pkg_postinst() { |
83 |
echo |
84 |
|
85 |
# Check user-space for PPPoA support |
86 |
- if ! built_with_use net-dialup/ppp atm ; then |
87 |
+ if ! has_version net-dialup/ppp[atm] ; then |
88 |
ewarn "Run the following command if connecting via PPPoA protocol:" |
89 |
ewarn " euse -E atm && emerge net-dialup/ppp" |
90 |
echo |
91 |
fi |
92 |
# Check user-space for PPPoE support |
93 |
- if ! has_version >=net-dialup/linux-atm-2.5.0 ; then |
94 |
+ if ! has_version net-dialup/linux-atm ; then |
95 |
ewarn "Run the following command if connecting via PPPoE protocol:" |
96 |
ewarn " emerge net-dialup/linux-atm" |
97 |
echo |