# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 inherit rpm autotools base DESCRIPTION="Epson Inkjet Printer Driver (ESC/P) for Linux" HOMEPAGE="http://avasys.jp/eng/linux_driver/download/lsb/epson-inkjet/escp/" PKG="epson-inkjet-printer-ep-803a-903f-series" TGT="/opt/${PKG}" SRC_URI="http://linux.avasys.jp/drivers/lsb/epson-inkjet/stable/SRPMS/${PKG}-1.0.0-1lsb3.2.src.rpm" FILTERDIR=${WORKDIR}/epson-inkjet-printer-filter-1.0.0 LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" DEPEND="net-print/cups" RDEPEND="${DEPEND}" src_unpack() { rpm_src_unpack } src_prepare() { cd ${FILTERDIR} sed -i -e 's:/opt/lsb/:/usr/:g' configure.ac || die chmod +x configure eautoreconf # if you have runtime problems: add "--enable-debug" and look into /tmp/epson-inkjet-printer-filter.txt ./configure LDFLAGS="$LDFLAGS -Wl,--no-as-needed" --prefix=$TGT } src_compile() { cd ${FILTERDIR} make -j1 || die } src_install() { # install docs cd ${S} into $TGT dodoc AUTHORS COPYING COPYING.EPSON README Manual.txt # install ppds-files into /usr/share/ppd/Epson cd ppds gzip -9 *.ppd insinto /usr/share/ppd/Epson doins *.ppd.gz || die cd .. # install lib's, recources and watermarks case `uname -m` in x86_64) X86LIB=64 ;; *) ;; esac insinto $TGT/lib"$X86LIB" doins lib"$X86LIB"/* || die insinto $TGT/watermark doins watermark/* || die insinto $TGT/resource doins resource/* || die # install filter-binary exeinto $TGT/cups/lib/filter doexe ${FILTERDIR}/src/epson_inkjet_printer_filter || die }