summaryrefslogtreecommitdiff
blob: ade0c6b5c3ef977e82b6b6f97c40c8698e5f64ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-print/mtink/mtink-0.9.55.ebuild,v 1.2 2003/09/07 00:18:10 msterret Exp $

DESCRIPTION="mtink is a status monitor and inkjet cartridge changer for some Epson printers"
HOMEPAGE="http://xwtools.automatix.de/"
SRC_URI="http://xwtools.automatix.de/files/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="doc cups"

DEPEND="virtual/motif
	x11-base/xfree
	cups? ( net-print/cups )"
RDEPEND="${DEPEND}"

S="${WORKDIR}/mtink"

src_unpack() {
	unpack ${A}
}

src_compile() {
	cp -f Makefile.ORG Makefile
	make || die "Compile problem"
}

src_install() {
	exeinto /usr/bin
	doexe mtinkc mtink ttink detect/askPrinter

	exeinto /usr/sbin
	doexe mtinkd

	exeinto /etc/init.d
	newexe ${FILESDIR}/mtinkd.rc mtinkd

	insinto /etc/conf.d
	newins ${FILESDIR}/mtinkd.confd mtinkd

	use cups && \
		exeinto /usr/lib/cups/backend; \
		doexe etc/mtink-cups

	dodoc README CHANGE.LOG LICENCE
	use doc && {
		dohtml html/*.gif html/*.html
	}
}

pkg_postinst() {
	einfo
	einfo "mtink needs correct permissions to access printer device."
	einfo "To do this you either need to run the following chmod command:"
	einfo "chmod 666 /dev/<device>"
	einfo "or set the suid bit on mtink, mtinkc and ttink in /usr/bin"
	einfo
}