Subversion Repositories KardasA Overlay

Rev

Rev 231 | Blame | Compare with Previous | Last modification | View Log | RSS feed

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 

EAPI="4"

inherit rpm versionator multilib

MY_PV="$(get_version_component_range 1-3)"
MY_PVR="$(replace_version_separator 3 -)"

DESCRIPTION="Epson Perfection 4490 PHOTO scanner plugin for SANE 'epkowa' backend."
HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
SRC_URI="
        x86? ( http://www.kardasa.pl/downloads/avasys/${PN}/${PN}-${MY_PVR}.i386.rpm )
        amd64? ( http://www.kardasa.pl/downloads/avasys/${PN}/${PN}-${MY_PVR}.x86_64.rpm )
"

LICENSE="AVASYS"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"

IUSE=""

DEPEND=">=media-gfx/iscan-2.21.0"
RDEPEND="${DEPEND}"

S="${WORKDIR}"

QA_PREBUILT="/usr/$(get_libdir)/libesint54.so*"

src_configure() { :; }
src_compile() { :; }

src_install() {
        # install scanner firmware
        insinto /usr/share/iscan
        doins "${WORKDIR}/usr/share/iscan/"*

        dodoc usr/share/doc/*/*

        # install scanner plugins
        exeinto /usr/$(get_libdir)/iscan/
        doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"*
}

pkg_postinst() {
    local MY_LIB="/usr/$(get_libdir)"

    # Needed for scaner to work properly.
    iscan-registry --add interpreter usb 0x04b8 0x0119 "${MY_LIB}/iscan/libesint54 /usr/share/iscan/esfw54.bin"
        elog
        elog "Firmware file esfw54.bin for Epson Perfection 4490 Photo"
        elog "has been installed in /usr/share/iscan."
        elog

}

pkg_postrm()
{
    local MY_LIB="/usr/$(get_libdir)"
    iscan-registry --remove interpreter usb 0x04b8 0x0119 "${MY_LIB}/iscan/libesint54 /usr/share/iscan/esfw54.bin"
}