/[gentoo-x86]/media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r2.ebuild
Gentoo

Contents of /media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Jul 5 18:56:54 2012 UTC (2 years, 5 months ago) by flameeyes
Branch: MAIN
Initial import of iscan-plugin-gt-x770 by Matthew Schultz (see bug #367585). This will require an unmerge of the sunrise version before merge to ensure proper path is registered with iscan.

(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="4"
6
7 inherit rpm versionator multilib
8
9 MY_PV="$(get_version_component_range 1-3)"
10 MY_PVR="$(replace_version_separator 3 -)"
11
12 DESCRIPTION="Epson Perfection V500 scanner plugin for SANE 'epkowa' backend."
13 HOMEPAGE="http://www.avasys.jp/english/linux_e/dl_scan.html"
14 SRC_URI="
15 x86? ( http://linux.avasys.jp/drivers/iscan-plugins/${PN}/${MY_PV}/${PN}-${MY_PVR}.i386.rpm )
16 amd64? ( http://linux.avasys.jp/drivers/iscan-plugins/${PN}/${MY_PV}/${PN}-${MY_PVR}.x86_64.rpm )
17 "
18
19 LICENSE="AVASYS"
20 SLOT="0"
21 KEYWORDS="-* ~amd64 ~x86"
22
23 IUSE=""
24
25 DEPEND=">=media-gfx/iscan-2.21.0
26 !!<media-gfx/iscan-plugin-gt-x770-2.1.2.1-r2"
27 RDEPEND="${DEPEND}"
28
29 S="${WORKDIR}"
30
31 QA_PREBUILT="
32 /opt/iscan/esci/libesint7C.so.2.0.1
33 /opt/iscan/esci/libesint7C.so.2
34 /opt/iscan/esci/libesint7C.so"
35
36 src_configure() { :; }
37 src_compile() { :; }
38
39 src_install() {
40 # install scanner firmware
41 insinto /usr/share/iscan
42 doins "${WORKDIR}/usr/share/iscan/"*
43
44 dodoc usr/share/doc/*/*
45
46 # install scanner plugins
47 exeinto /opt/iscan/esci
48 doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"*
49 }
50
51 pkg_setup() {
52 basecmds=(
53 "iscan-registry --COMMAND interpreter usb 0x04b8 0x0130 /opt/iscan/esci/libesint7C /usr/share/iscan/esfw7C.bin"
54 )
55 }
56
57 pkg_postinst() {
58 elog
59 elog "Firmware file esfw41.bin for Epson Perfection V500"
60 elog "has been installed in /usr/share/iscan."
61 elog
62
63 [[ -n ${REPLACING_VERSIONS} ]] && return
64
65 # Needed for scanner to work properly.
66 if [[ ${ROOT} == "/" ]]; then
67 for basecmd in "${basecmds[@]}"; do
68 eval ${basecmd/COMMAND/add}
69 done
70 else
71 ewarn "Unable to register the plugin and firmware when installing outside of /."
72 ewarn "execute the following command yourself:"
73 for basecmd in "${basecmds[@]}"; do
74 ewarn "${basecmd/COMMAND/add}"
75 done
76 fi
77 }
78
79 pkg_prerm() {
80 [[ -n ${REPLACED_BY_VERSION} ]] && return
81
82 if [[ ${ROOT} == "/" ]]; then
83 for basecmd in "${basecmds[@]}"; do
84 eval ${basecmd/COMMAND/remove}
85 done
86 else
87 ewarn "Unable to de-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/remove}"
91 done
92 fi
93 }

  ViewVC Help
Powered by ViewVC 1.1.20