summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-06-24 14:44:28 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-06-24 14:44:28 +0200
commit075ec9df621ebb9628844804552bf5497b26460b (patch)
treebbf9489e9646e91a23ecb2cc7475b1555356e232 /net-print/brother-dcp-j515w-drivers/brother-dcp-j515w-drivers-1.ebuild
parentar9170-firmware: Depend on virtual udev ebuild (diff)
downloadbenf-075ec9df621ebb9628844804552bf5497b26460b.tar.gz
benf-075ec9df621ebb9628844804552bf5497b26460b.tar.bz2
benf-075ec9df621ebb9628844804552bf5497b26460b.zip
Add brother-dcp-j515w-drivers-1.ebuild
Copied from funtoos nearly identical brother-dcp-j315w-drivers-1.ebuild.
Diffstat (limited to 'net-print/brother-dcp-j515w-drivers/brother-dcp-j515w-drivers-1.ebuild')
-rw-r--r--net-print/brother-dcp-j515w-drivers/brother-dcp-j515w-drivers-1.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/net-print/brother-dcp-j515w-drivers/brother-dcp-j515w-drivers-1.ebuild b/net-print/brother-dcp-j515w-drivers/brother-dcp-j515w-drivers-1.ebuild
new file mode 100644
index 0000000..4f5ac4b
--- /dev/null
+++ b/net-print/brother-dcp-j515w-drivers/brother-dcp-j515w-drivers-1.ebuild
@@ -0,0 +1,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.