1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit rpm versionator multilib
8 MY_PV="$(get_version_component_range 1-3)"
9 MY_PVR="$(replace_version_separator 3 -)"
11 DESCRIPTION="Epson Perfection V500 scanner plugin for SANE 'epkowa' backend"
12 HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
14 x86? ( https://dev.gentoo.org/~flameeyes/avasys/${PN}/${MY_PV}/${PN}-${MY_PVR}.i386.rpm )
15 amd64? ( https://dev.gentoo.org/~flameeyes/avasys/${PN}/${MY_PV}/${PN}-${MY_PVR}.x86_64.rpm )
20 KEYWORDS="-* ~amd64 ~x86"
24 DEPEND=">=media-gfx/iscan-2.21.0
25 !!<media-gfx/iscan-plugin-gt-x770-2.1.2.1-r2"
30 QA_PREBUILT="/opt/iscan/esci/libesint7C.so*"
32 src_configure() { :; }
36 # install scanner firmware
37 insinto /usr/share/iscan
38 doins "${WORKDIR}/usr/share/iscan/"*
40 dodoc usr/share/doc/*/*
42 # install scanner plugins
43 exeinto /opt/iscan/esci
44 doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"*
49 "iscan-registry --COMMAND interpreter usb 0x04b8 0x0130 /opt/iscan/esci/libesint7C /usr/share/iscan/esfw7C.bin"
55 elog "Firmware file esfw41.bin for Epson Perfection V500"
56 elog "has been installed in /usr/share/iscan."
59 [[ -n ${REPLACING_VERSIONS} ]] && return
61 # Needed for scanner to work properly.
62 if [[ ${ROOT} == "/" ]]; then
63 for basecmd in "${basecmds[@]}"; do
64 eval ${basecmd/COMMAND/add}
67 ewarn "Unable to register the plugin and firmware when installing outside of /."
68 ewarn "execute the following command yourself:"
69 for basecmd in "${basecmds[@]}"; do
70 ewarn "${basecmd/COMMAND/add}"
76 [[ -n ${REPLACED_BY_VERSION} ]] && return
78 if [[ ${ROOT} == "/" ]]; then
79 for basecmd in "${basecmds[@]}"; do
80 eval ${basecmd/COMMAND/remove}
83 ewarn "Unable to de-register the plugin and firmware when installing outside of /."
84 ewarn "execute the following command yourself:"
85 for basecmd in "${basecmds[@]}"; do
86 ewarn "${basecmd/COMMAND/remove}"