summaryrefslogtreecommitdiff
path: root/net-print/brother-hl5340d-drivers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2015-05-25 16:21:46 +0100
committerV3n3RiX <venerix@rogentos.ro>2015-05-25 16:21:46 +0100
commitbc276655c9c9a61be0c181ecc4e560928b2bc397 (patch)
tree79f0f42b8900c01bd3df07d7820c9530de6e8e47 /net-print/brother-hl5340d-drivers
parentbde22322915ae30f7d6df35a8e76db7e522e961d (diff)
parent69cbba05e6f249e5b113fde154668247857294bd (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'net-print/brother-hl5340d-drivers')
-rw-r--r--net-print/brother-hl5340d-drivers/brother-hl5340d-drivers-2.0.4-r2.ebuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/net-print/brother-hl5340d-drivers/brother-hl5340d-drivers-2.0.4-r2.ebuild b/net-print/brother-hl5340d-drivers/brother-hl5340d-drivers-2.0.4-r2.ebuild
new file mode 100644
index 00000000..612f9258
--- /dev/null
+++ b/net-print/brother-hl5340d-drivers/brother-hl5340d-drivers-2.0.4-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Sabayon
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils multilib rpm
+
+WRAPPER_VER="2.0.4-1"
+LPR_VER="2.0.3-1"
+
+DESCRIPTION="CUPS filters and drivers for Brother HL-5340D"
+HOMEPAGE="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html"
+SRC_URI="http://www.brother.com/pub/bsc/linux/dlf/hl5340dlpr-${LPR_VER}.i386.rpm
+ http://www.brother.com/pub/bsc/linux/dlf/cupswrapperHL5340D-${WRAPPER_VER}.i386.rpm
+ http://www.brother.com/pub/bsc/linux/dlf/BR5340_2_GPL.ppd.gz"
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="${DEPEND}"
+RDEPEND="
+ app-text/ghostscript-gpl
+ net-print/cups"
+
+S="${WORKDIR}"
+RESTRICT="strip"
+
+src_prepare() {
+ default
+ epatch "${FILESDIR}/cupswrapper.patch"
+}
+
+src_install() {
+ # Thanks to the Arch folks!
+ mkdir -p usr/share || die
+ mv "${S}/usr/local/Brother" "${S}/usr/share/brother" || die
+
+ # Fix paths, move away from /usr/local
+ sed -i "s;/usr/local/Brother;/usr/share/brother;g" $(grep -rl "/usr/local/Brother" .) || die
+
+ # Create and install the file 'brPrintList'. This file must exist and contain the name
+ # of the printer in order to make CUPS settings work. Else, settings done in CUPS are
+ # not reflected in the file /usr/share/brother/inf/brHL5340Drc and thus are not considered
+ # by the LPR driver that's doing the actual printing.
+ mkdir -p "${S}/usr/share/brother/inf" || die
+ echo "HL5340D" > "${S}/usr/share/brother/inf/brPrintList" || die
+
+ # Generate the cups filter
+ cd "${S}" || die
+ ./usr/share/brother/cupswrapper/cupswrapperHL5340D-2.0.4 || die
+ insinto /usr/share/cups/model
+ newins "${WORKDIR}/BR5340_2_GPL.ppd" HL5340D.ppd
+ exeinto /usr/libexec/cups/filter
+ doexe brlpdwrapperHL5340D || die
+
+ # move /usr/local crap to /usr/share
+ dodir /usr/share
+ cd "${S}/usr/share" || die
+ insinto /usr/share
+ # preserve permissions
+ cp -rp brother "${D}/usr/share/" || die
+ fperms 0755 /usr/share/brother/inf/brHL5340Drc
+
+ dodir /usr/$(get_libdir)
+ exeinto /usr/$(get_libdir)
+ doexe "${S}"/usr/lib/*
+
+ dodir /usr/bin
+ exeinto /usr/bin
+ doexe "${S}"/usr/bin/*
+}