1 |
commit: 5cec2faa9e3f8e18a20d9f45461e431309003118 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 24 21:47:42 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 25 19:11:49 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cec2faa |
7 |
|
8 |
media-gfx/iscan-plugin-gt-x820: port to EAPI 7 |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../iscan-plugin-gt-x820-2.2.0.1.ebuild | 47 +++++++--------------- |
14 |
1 file changed, 15 insertions(+), 32 deletions(-) |
15 |
|
16 |
diff --git a/media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.2.0.1.ebuild b/media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.2.0.1.ebuild |
17 |
index ba7639fb7a5..a368e5a4192 100644 |
18 |
--- a/media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.2.0.1.ebuild |
19 |
+++ b/media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.2.0.1.ebuild |
20 |
@@ -1,29 +1,26 @@ |
21 |
-# Copyright 1999-2014 Gentoo Foundation |
22 |
+# Copyright 1999-2020 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
-EAPI="4" |
26 |
+EAPI=7 |
27 |
|
28 |
-inherit rpm versionator multilib |
29 |
+inherit rpm |
30 |
|
31 |
-MY_PV="$(get_version_component_range 1-3)" |
32 |
-MY_PVR="$(replace_version_separator 3 -)" |
33 |
+MY_PV="$(ver_cut 1-3)" |
34 |
+MY_PVR="$(ver_rs 3 -)" |
35 |
|
36 |
DESCRIPTION="Epson Perfection V600 scanner plugin for SANE 'epkowa' backend" |
37 |
HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" |
38 |
SRC_URI="amd64? ( https://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.x86_64.rpm ) |
39 |
x86? ( https://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.i386.rpm )" |
40 |
+S="${WORKDIR}" |
41 |
|
42 |
LICENSE="AVASYS" |
43 |
SLOT="0" |
44 |
KEYWORDS="-* ~amd64 ~x86" |
45 |
|
46 |
-IUSE="" |
47 |
- |
48 |
DEPEND=">=media-gfx/iscan-2.21.0" |
49 |
RDEPEND="${DEPEND}" |
50 |
|
51 |
-S="${WORKDIR}" |
52 |
- |
53 |
QA_PREBUILT="/opt/iscan/lib/libesintA1.so*" |
54 |
|
55 |
src_configure() { :; } |
56 |
@@ -41,50 +38,36 @@ src_install() { |
57 |
doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"* |
58 |
} |
59 |
|
60 |
-pkg_setup() { |
61 |
- basecmds=( |
62 |
- "iscan-registry --COMMAND interpreter usb 0x04b8 0x013a /opt/iscan/lib/libesintA1 /usr/share/iscan/esfwA1.bin" |
63 |
- ) |
64 |
-} |
65 |
- |
66 |
pkg_postinst() { |
67 |
elog |
68 |
elog "Firmware file esfwA1.bin for Epson Perfection V600" |
69 |
- elog "has been installed in /usr/share/iscan." |
70 |
+ elog "has been installed in ${EROOT}/usr/share/iscan." |
71 |
elog |
72 |
|
73 |
# Only register scanner on new installs |
74 |
- [[ -n ${REPLACING_VERSIONS} ]] && return |
75 |
+ [[ -n "${REPLACING_VERSIONS}" ]] && return |
76 |
|
77 |
# Needed for scanner to work properly. |
78 |
- if [[ ${ROOT} == "/" ]]; then |
79 |
- for basecmd in "${basecmds[@]}"; do |
80 |
- eval ${basecmd/COMMAND/add} |
81 |
- done |
82 |
+ if [[ -z "${EROOT}" ]]; then |
83 |
+ iscan-registry --add interpreter usb 0x04b8 0x013a /opt/iscan/lib/libesintA1 /usr/share/iscan/esfwA1.bin || die |
84 |
elog "New firmware has been registered automatically." |
85 |
elog |
86 |
else |
87 |
ewarn "Unable to register the plugin and firmware when installing outside of /." |
88 |
ewarn "execute the following command yourself:" |
89 |
- for basecmd in "${basecmds[@]}"; do |
90 |
- ewarn "${basecmd/COMMAND/add}" |
91 |
- done |
92 |
+ ewarn "iscan-registry --add interpreter usb 0x04b8 0x013a /opt/iscan/lib/libesintA1 /usr/share/iscan/esfwA1.bin" |
93 |
fi |
94 |
} |
95 |
|
96 |
pkg_prerm() { |
97 |
# Only unregister on on uninstall |
98 |
- [[ -n ${REPLACED_BY_VERSION} ]] && return |
99 |
+ [[ -n "${REPLACED_BY_VERSION}" ]] && return |
100 |
|
101 |
- if [[ ${ROOT} == "/" ]]; then |
102 |
- for basecmd in "${basecmds[@]}"; do |
103 |
- eval ${basecmd/COMMAND/remove} |
104 |
- done |
105 |
+ if [[ -z "${EROOT}" ]]; then |
106 |
+ iscan-registry --remove interpreter usb 0x04b8 0x013a /opt/iscan/lib/libesintA1 /usr/share/iscan/esfwA1.bin || die |
107 |
else |
108 |
ewarn "Unable to register the plugin and firmware when installing outside of /." |
109 |
ewarn "execute the following command yourself:" |
110 |
- for basecmd in "${basecmds[@]}"; do |
111 |
- ewarn "${basecmd/COMMAND/remove}" |
112 |
- done |
113 |
+ ewarn "iscan-registry --remove interpreter usb 0x04b8 0x013a /opt/iscan/lib/libesintA1 /usr/share/iscan/esfwA1.bin" |
114 |
fi |
115 |
} |