# $Id$ PNAME="gimp-print" PVER="5.3.1" PBUILD="r1" PCAT="media-gfx" DESCRIPTION="The Gimp-Print package contains high quality drivers for Canon, Epson, Lexmark and PCL printers." HOMEPAGE="http://gimp-print.sourceforge.net/" DEPEND=">= net-print/libcups-2.2 >= media-gfx/imagemagick-7.0 >= app-text/ghostscript-gpl-9 >= x11-libs/gtk2+-2.24 >= dev-lang/perl-5.28 >= sys-libs/readline-8.0" SDEPEND=">= virtual/sed >= dev-util/pkgconfig-0.25 >= net-print/cups-2.2 >= media-gfx/gimp-2.8" SRCFILE="gutenprint-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/gutenprint-${PVER}" sminclude mbuild mtools # disable src_check which takes way too long msetfeature "!check" SRC_URI=( sourceforge://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) #UP2DATE="updatecmd_sourceforge ${PNAME} gutenprint-5.2 - gutenprint" UP2DATE="updatecmd ${HOMEPAGE} | grep 'Gutenprint.*[released|available]!' | grep -v -- -pre | sed 's/.*Gutenprint\ \(.*\)\ is.*/\1/;q'" src_compile() { cd ${SRCDIR} mconfigure \ --enable-nls \ --enable-test \ --enable-libgutenprintui2 \ --with-cups \ --enable-cups-ppds \ --enable-cups-level3-ppds \ --with-readline \ --disable-translated-cups-ppds \ --with-gimp2-as-gutenprint \ --disable-static-genppd \ --enable-cups-ppds \ || die mmake || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/share/gutenprint || die mmake DESTDIR=${BINDIR} install || die # some other binaries minstallexec test/unprint /usr/share/gutenprint || die minstallexec test/pcl-unprint /usr/share/gutenprint || die minstallexec test/bjc-unprint /usr/share/gutenprint || die minstallexec test/parse-escp2 /usr/share/gutenprint || die minstallexec test/escp2-weavetest /usr/share/gutenprint || die minstallexec test/run-testdither /usr/share/gutenprint || die minstallexec test/run-weavetest /usr/share/gutenprint || die minstallexec test/testdither /usr/share/gutenprint || die # docs minstalldocs ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README \ doc/gutenprint-users-manual.{pdf,odt} || die # clean up non-wanted and already installed docs rm -fR ${BINDIR}/usr/share/gutenprint/doc || die } postinstall() { echo echo "Please run '/usr/sbin/cups-genppdupdate' and" echo "restart cups with following command:" echo " systemctl restart cups.service" echo "This command may take a very long time (up to 10 minutes) to complete." echo "Don't panic while CUPS is rescanning the list of PPD files." echo "The long delay will happen only once." echo }