summaryrefslogtreecommitdiff
blob: 0a7e34244619eb49f53e26a423bca15562aa546a (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

LPR_BASEURI="http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_others"
CUPS_BASEURI="http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/cups_wrapper"

inherit rpm

KEYWORDS="~amd64 ~x86"

DESCRIPTION="Brother MFC-8860DN CUPS printer driver."
HOMEPAGE="http://solutions.brother.com/linux/en_us/index.html"
SRC_URI="${LPR_BASEURI}/brmfc8860dnlpr-${PV}-1.i386.rpm
		 ${CUPS_BASEURI}/cupswrapperMFC8860DN-${PV}-1.i386.rpm"
LICENSE="GPL-2"
SLOT="0"
IUSE=""

DEPEND=""
RDEPEND=">=net-print/cups-1.3"

src_unpack() {
	rpm_src_unpack
}

src_compile() {
	sed -e "s|/usr/lib/cups/|/usr/libexec/cups/|g" -i usr/local/Brother/cupswrapper/cupswrapperMFC8860DN-${PV}
	sed -e "s|/usr/lib64/cups/|/usr/libexec/cups/|g" -i usr/local/Brother/cupswrapper/cupswrapperMFC8860DN-${PV}
}

src_install() {
	cp -Rf "./" "${D}/"
}

pkg_postinst() {
	${ROOT}usr/local/Brother/inf/setupPrintcap MFC8860DN -i USB
	${ROOT}usr/local/Brother/inf/braddprinter -i MFC8860DN
	echo "[psconvert2]" >> ${ROOT}usr/local/Brother/inf/brMFC8860DNfunc
	echo "pstops=`which pstops`" >> ${ROOT}usr/local/Brother/inf/brMFC8860DNfunc

	${ROOT}usr/local/Brother/cupswrapper/cupswrapperMFC8860DN-${PV} -i
}