# Distributed under the terms of the GNU General Public License v2 inherit rpm DESCRIPTION="Driver for Lexmark Z32, Lexmark Z22, and Compaq IJ600 printers" HOMEPAGE="http://www.lexmark.com" SRC_URI="z32_eng_us-1.0-5.tgz" RESTRICT="nomirror fetch nostrip" LICENSE="GPL" SLOT="0" KEYWORDS="-* ~x86" IUSE="cups" DEPEND="" PDEPEND="cups? ( net-print/cups net-print/lexmark-foomatic-kit )" pkg_nofetch() { einfo "Please download z32_eng_us-1.0-5.tgz from:" einfo "http://downloads.lexmark.com/cgi-perl/downloads.cgi?ccs=229:1:0:287:0:0&searchLang=en&os_group=Redhat" einfo "The archive should then be placed into ${DISTDIR}." } pkg_setup() { case ${CHOST} in i586-pc-linux-gnu*) einfo "Found compatible architecture." ;; i686-pc-linux-gnu*) einfo "Found compatible architecture." ;; *) die "No compatible architecture found." ;; esac } src_unpack() { # It's a RPM inside a tgz archive .. that extracts 3 subdirs down # Nice piece of work by Lexmark, eh? unpack ${A} rpm_unpack "${WORKDIR}"/rpm/z32/english_US/lexmarkz22-z32-1.0-5.i386.rpm } src_install() { # copy files cp -pPR "${WORKDIR}"/usr "${D}" && cp -pPR "${WORKDIR}"/var "${D}" } pkg_postinst() { einfo "Be sure if you use cups to have the cups USE flag enabled to pull in" einfo "extra packages needed for these drivers to interact with cups." einfo "" einfo "Problem with this printer and cups:" einfo "Unfortunately this printer will not work over USB. Only parallel port." einfo "This likely stems from the perl foomatic error when trying to install" einfo "over USB using lexmarkinstall." }