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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Oct 17 23:44:36 2012 UTC (22 months ago) by flameeyes
Branch: MAIN
Changes since 1.1: +2 -2 lines
Use QA_PREBUILT instead of QA_PRESTRIPPED.

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

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.1.2.1.ebuild,v 1.1 2012/09/30 22:14:39 flameeyes Exp $
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 LICENSE="AVASYS"
19 SLOT="0"
20 KEYWORDS="-* ~amd64 ~x86"
21
22 IUSE=""
23
24 DEPEND=">=media-gfx/iscan-2.21.0
25 !!<media-gfx/iscan-plugin-gt-x820-2.1.2.1"
26 RDEPEND="${DEPEND}"
27
28 S="${WORKDIR}"
29
30 QA_PREBUILT="
31 /opt/iscan/lib/libesintA1.so.2.0.1
32 /opt/iscan/lib/libesintA1.so.2
33 /opt/iscan/lib/libesintA1.so"
34
35 src_configure() { :; }
36 src_compile() { :; }
37
38 src_install() {
39 # install scanner firmware
40 insinto /usr/share/iscan
41 doins "${WORKDIR}"/usr/share/iscan/*
42
43 dodoc usr/share/doc/*/*
44
45 # install scanner plugins
46 exeinto /opt/iscan/lib
47 doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"*
48 }
49
50 pkg_setup() {
51 basecmds=(
52 "iscan-registry --COMMAND interpreter usb 0x04b8 0x013a /opt/iscan/lib/libesintA1 /usr/share/iscan/esfwA1.bin"
53 )
54 }
55
56 pkg_postinst() {
57 elog
58 elog "Firmware file esfwA1.bin for Epson Perfection V600"
59 elog "has been installed in /usr/share/iscan."
60 elog
61
62 # Only register scanner on new installs
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 elog "New firmware has been registered automatically."
71 elog
72 else
73 ewarn "Unable to register the plugin and firmware when installing outside of /."
74 ewarn "execute the following command yourself:"
75 for basecmd in "${basecmds[@]}"; do
76 ewarn "${basecmd/COMMAND/add}"
77 done
78 fi
79 }
80
81 pkg_prerm() {
82 # Only unregister on on uninstall
83 [[ -n ${REPLACED_BY_VERSION} ]] && return
84
85 if [[ ${ROOT} == "/" ]]; then
86 for basecmd in "${basecmds[@]}"; do
87 eval ${basecmd/COMMAND/remove}
88 done
89 else
90 ewarn "Unable to register the plugin and firmware when installing outside of /."
91 ewarn "execute the following command yourself:"
92 for basecmd in "${basecmds[@]}"; do
93 ewarn "${basecmd/COMMAND/remove}"
94 done
95 fi
96 }

  ViewVC Help
Powered by ViewVC 1.1.20