# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: Exp $ inherit eutils #don't use sed here, use bash internal abilities #MY_PV=$(echo ${PV} | sed -r "s/([0-9]+\.[0-9]+)\.([0-9])/\\1\-\\2/") #MY_PV2=$(echo ${PV} | sed -r "s/([0-9]+\.[0-9]+)\.([0-9])/\\1/") MY_PV="$PV" MY_PV2="$PV" DESCRIPTION="High quality printer drivers for Linux - Free Edition" HOMEPAGE="http://turboprint.de/" SRC_URI="http://www.turboprint.de/${PN}-${MY_PV}.tgz" LICENSE="TurboPrint" SLOT="0" KEYWORDS="x86" IUSE="cups gtk" RDEPEND="cups? ( net-print/cups ) !cups? ( virtual/lpr ) !cups? ( sys-apps/file ) !cups? ( app-text/psutils ) !cups? ( app-arch/gzip ) !cups? ( app-text/tetex ) !cups? ( sys-apps/groff ) !cups? ( media-libs/netpbm ) !cups? ( media-libs/jpeg ) !cups? ( app-text/a2ps ) !cups? ( app-text/enscript ) gtk? ( =x11-libs/gtk+-1.2* )" S=${WORKDIR}/${PN}-${MY_PV2} src_unpack() { unpack ${A} cd ${S} # Most of the tweaks can be done with sed but for the others... epatch ${FILESDIR}/setup.patch # Replace the RPM Build Root variable with our virtual root sed -i -r 's|[$]RBR|$MY_DESTDIR|g' lib/install-static # Replace TPPATH_* variables with MY_DESTDIR sed -i -r 's|"[$]TPPATH_[A-Z]+|"$MY_DESTDIR"&|g' lib/install-post } src_install() { if use cups; then CUPS="--cups=1" else CUPS="--cups=0" fi export MY_DESTDIR="$D" ./setup --batch ${CUPS} --nogui --language=en --charset=C } pkg_postinst() { # i have no clue, if this is really necessary # tpsetup --update || die einfo einfo " As a next step you will have to setup a printer with (x)tpsetup" einfo einfo " If you want the full functionality of this package you will have" einfo " to buy a keyfile from http://www.turboprint.de" einfo }