# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit rpm DESCRIPTION="Epson Perfection V500 scanner plugin for SANE 'epkowa' backend." HOMEPAGE="http://www.avasys.jp/english/linux_e/dl_scan.html" SRC_URI="x86? ( http://linux.avasys.jp/drivers/scanner-plugins/GT-X770/${P}-2.c2.i386.rpm ) amd64? ( http://linux.avasys.jp/drivers/scanner-plugins/GT-X770/${P}-2.c2.x86_64.rpm )" LICENSE="AVASYS" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" DEPEND=">=media-gfx/iscan-2.18.0" RDEPEND="${DEPEND}" MY_LIB="/usr/$(get_libdir)" src_install() { # install scanner firmware insinto /usr/share/iscan doins "${WORKDIR}"/usr/share/iscan/* # install scanner plugins insinto "${MY_LIB}"/iscan INSOPTIONS="-m0755" doins "${WORKDIR}"/usr/$(get_libdir)/iscan/* } pkg_postinst() { # Needed for scaner to work properly. iscan-registry --add interpreter usb 0x04b8 0x0130 "${MY_LIB}"/iscan/libesint7C /usr/share/iscan/esfw7C.bin elog "Firmware file esfw7C.bin for Epson Perfection V500" elog "PHOTO has been installed in /usr/share/iscan and" elog "registered for use" } pkg_prerm() { iscan-registry --remove interpreter usb 0x04b8 0x0130 "${MY_LIB}"/iscan/libesint7C /usr/share/iscan/esfw7C.bin }