blob: 4f5ac4b0e22c1c862cff5424dabba682866308a4 (
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
60
|
EAPI=4
inherit rpm multilib
DESCRIPTION="Brother DCP-J515W LPR+cupswrapper drivers"
HOMEPAGE="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#DCP-J515W"
SRC_URI="http://pub.brother.com/pub/com/bsc/linux/dlf/dcpj515wlpr-1.1.1-1.i386.rpm
http://pub.brother.com/pub/com/bsc/linux/dlf/dcpj515wcupswrapper-1.1.1-3.i386.rpm"
LICENSE="GPL"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
RESTRICT="strip"
DEPEND="net-print/cups
app-text/a2ps"
RDEPEND="${DEPEND}"
S="${WORKDIR}" # Portage will bitch about missing $S so lets pretend that we have vaild $S.
src_unpack() {
rpm_unpack ${A}
}
src_install() {
has_multilib_profile && ABI=x86
dosbin "${WORKDIR}/usr/bin/brprintconf_dcpj515w"
cp -r usr "${D}" || die
mkdir -p ${D}/usr/libexec/cups/filter || die
( cd ${D}/usr/libexec/cups/filter/ && ln -s ../../../../usr/local/Brother/Printer/dcpj515w/lpd/filterdcpj515w brlpdwrapperdcpj515w ) || die
mkdir -p ${D}/usr/share/cups/model || die
( cd ${D}/usr/share/cups/model && ln -s ../../../../usr/local/Brother/Printer/dcpj515w/cupswrapper/brdcpj515w.ppd ) || die
}
pkg_postinst () {
ewarn "You really wanna read this."
elog "You need to use brprintconf_dcpj515w to change printer options"
elog "For example, you should set paper type to A4 right after instalation"
elog "or your prints will be misaligned!"
elog
elog "Set A4 Paper type:"
elog " brprintconf_dcpj515w -pt A4"
elog "Set 'Fast Normal' quality:"
elog " brprintconf_dcpj515w -reso 300x300dpi"
elog
elog "For more options just execute brprintconf_dcpj515w as root"
elog "You can check current settings in:"
elog " /usr/local/Brother/Printer/dcpj515w/inf/brdcpj515wrc"
elog
elog "To add printer over WIFI add use LPD or SOCKET protocol, for example:"
elog " lpd://<host_or_ip>/BINARY_P1"
elog " - or -"
elog " socket://<host_or_ip>:9100"
}
# TODO: Write alternative to filterdcpj515w or patch it for the security manner.
|