add old ebuilds from svn ub0rlay
[ub0rlay.git] / net-print / turboprint / turboprint-1.96.4.ebuild
blob3101b4ddffe9ce9f5aa5e51268523677b989d90d
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 inherit eutils
7 MY_PV=${PV:0:4}-${PV:5}
8 MY_P=${PN}-${MY_PV}
10 DESCRIPTION="TurboPrint ermöglicht den Einsatz moderner Farbdrucker unter Linux."
11 HOMEPAGE="http://www.turboprint.de"
12 SRC_URI="
13 http://www.turboprint.info/${MY_P}.x86_64.tgz
14 ftp://ftp.zedonet.com/${MY_P}.x86_64.tgz
15 http://www.turboprint.info/${MY_P}.tgz
16 ftp://ftp.zedonet.com/${MY_P}.tgz
17 "
19 LICENSE="free for homeuse"
20 SLOT="0"
21 KEYWORDS="~x86 ~amd64"
22 IUSE="gtk"
24 DEPEND="sys-apps/grep sys-apps/sed net-print/cups"
25 RDEPEND="
26 gtk? ( =x11-libs/gtk+-1.2* )
27 net-print/cups
28 "
30 src_unpack() {
31 if echo ${ACCEPT_KEYWORDS} | grep amd64 > /dev/null ; then
32 A="${MY_P}.x86_64.tgz"
33 else
34 A="${MY_P}.tgz"
35 fi
36 unpack ${A} || die "failed unpacking the source"
37 cd ${MY_P}
38 epatch ${FILESDIR}/setup-0.patch
39 epatch ${FILESDIR}/install-static-0.patch
40 epatch ${FILESDIR}/install-post-0.patch
41 sed -i lib/install-post -e 's/"$TPPATH/"$RBR$TPPATH/g' || die "failed patching installer"
42 sed -i lib/install-post -e 's/"\/usr/"$RBR\/usr/g' || die "failed patching installer"
43 sed -i lib/install-post -e 's/"\/etc/"$RBR\/etc/g' || die "failed patching installer"
44 sed -i lib/install-post -e 's/ \/etc/ $RBR\/etc/g' || die "failed patching installer"
45 sed -i lib/install-post -e 's/^tpsetup/#tpsetup/g' || die "failed patching installer"
46 sed -i lib/install-info -e 's/"$TPPATH/"$RBR$TPPATH/g' || die "failed patching installer"
47 }
49 src_install() {
50 my_args="--batch --cups"
51 use gtk || my_args="$my_args --nogui"
52 cd ${MY_P}
53 export D
54 export RBR=${D}
56 exeinto /usr/libexec/cups/filter/
57 doexe lib/pstoturboprint
58 doexe lib/rastertoturboprint
60 #rm lib/pstoturboprint
61 #rm lib/rastertoturboprint
63 mkdir -p "$D/usr/share/applications/"
64 mkdir -p "$D/usr/kde/3.5/share/applnk/Utilities/"
66 ./setup $my_args
68 sed -i "$D/etc/system.cfg" -e 's:.*//:/:'
70 elog "please run tpsetup --writeppdfiles \"/usr/share/ppd/\""
71 elog "please run tpsetup --update and restart cups"
72 }