Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/dev/ulm:master commit in: net-print/brother-dcpj572dw/
Date: Sun, 09 Dec 2018 09:41:54
Message-Id: 1544348484.add3a3d60a9ff540029c4c82b4655c74bd87857f.ulm@gentoo
1 commit: add3a3d60a9ff540029c4c82b4655c74bd87857f
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 9 09:40:06 2018 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 9 09:41:24 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/dev/ulm.git/commit/?id=add3a3d6
7
8 net-print/brother-dcpj572dw: Initial import.
9
10 Ebuild contributed by me.
11
12 Package-Manager: Portage-2.3.52, Repoman-2.3.12
13 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
14
15 net-print/brother-dcpj572dw/Manifest | 1 +
16 .../brother-dcpj572dw-20180807.ebuild | 59 ++++++++++++++++++++++
17 net-print/brother-dcpj572dw/metadata.xml | 10 ++++
18 3 files changed, 70 insertions(+)
19
20 diff --git a/net-print/brother-dcpj572dw/Manifest b/net-print/brother-dcpj572dw/Manifest
21 new file mode 100644
22 index 0000000..fd3b37a
23 --- /dev/null
24 +++ b/net-print/brother-dcpj572dw/Manifest
25 @@ -0,0 +1 @@
26 +DIST dcpj572dwpdrv-1.0.5-0.i386.rpm 3511958 BLAKE2B 77b7fc64deb7ed10969ede63e2c3058047e21e01f2f4e4245ffa94f30feebc16af544ec434c7586d2f703dcf72552da985f579da4e2d9287cbfe2e1ecdca5e17 SHA512 fd04623b798c1a4260e1f64e52ebc54e5db384afc20d5983e39e46551d4534d1770316ff7ca541ff5ac150cf56386b2ef4f84ced6fbbc6f88d7272fff8e1fc69
27
28 diff --git a/net-print/brother-dcpj572dw/brother-dcpj572dw-20180807.ebuild b/net-print/brother-dcpj572dw/brother-dcpj572dw-20180807.ebuild
29 new file mode 100644
30 index 0000000..6e8f6ea
31 --- /dev/null
32 +++ b/net-print/brother-dcpj572dw/brother-dcpj572dw-20180807.ebuild
33 @@ -0,0 +1,59 @@
34 +# Copyright 1999-2018 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +inherit rpm
40 +
41 +MODEL="${PN#*-}"
42 +PV_LPR="1.0.5-0"
43 +
44 +DESCRIPTION="Brother printer driver for DCP-J572DW"
45 +HOMEPAGE="http://www.brother.com/"
46 +SRC_URI="https://download.brother.com/welcome/dlf103778/${MODEL}pdrv-${PV_LPR}.i386.rpm"
47 +
48 +LICENSE="GPL-2+ Brother-lpr no-source-code"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86"
51 +IUSE="metric"
52 +RESTRICT="strip"
53 +
54 +RDEPEND="net-print/cups"
55 +
56 +S="${WORKDIR}/opt/brother/Printers/${MODEL}"
57 +
58 +src_prepare() {
59 + eapply_user
60 + if use metric; then
61 + sed -i "/^PaperType/s/Letter/A4/" inf/br${MODEL}rc || die
62 + fi
63 +}
64 +
65 +src_install() {
66 + local dest=/opt/brother/Printers/${MODEL}
67 +
68 + cd "${S}"/lpd || die
69 + exeinto ${dest}/lpd
70 + doexe br${MODEL}filter filter_${MODEL}
71 + dosym ../../../..${dest}/lpd/filter_${MODEL} \
72 + /usr/libexec/cups/filter/brother_lpdwrapper_${MODEL}
73 +
74 + cd "${S}"/inf || die
75 + insinto ${dest}/inf
76 + doins br${MODEL}func ImagingArea PaperDimension paperinfij2
77 + doins -r lut
78 + insinto /etc${dest}/inf
79 + doins br${MODEL}rc # config file
80 + dosym ../../../../../etc${dest}/inf/br${MODEL}rc ${dest}/inf/br${MODEL}rc
81 +
82 + cd "${S}"/cupswrapper || die
83 + insinto ${dest}/cupswrapper
84 + doins brother_${MODEL}_printer_en.ppd
85 + dosym ../../../../..${dest}/cupswrapper/brother_${MODEL}_printer_en.ppd \
86 + /usr/share/cups/model/Brother/brother_${MODEL}_printer_en.ppd
87 +
88 + # The brprintconf utility is very broken and mangles the path
89 + # of the function list file. Therefore, don't install it.
90 + #exeinto ${dest}/bin
91 + #doexe "${WORKDIR}"/usr/bin/brprintconf_${MODEL}
92 +}
93
94 diff --git a/net-print/brother-dcpj572dw/metadata.xml b/net-print/brother-dcpj572dw/metadata.xml
95 new file mode 100644
96 index 0000000..9a3c73e
97 --- /dev/null
98 +++ b/net-print/brother-dcpj572dw/metadata.xml
99 @@ -0,0 +1,10 @@
100 +<?xml version="1.0" encoding="UTF-8"?>
101 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
102 +<pkgmetadata>
103 +<maintainer type="person">
104 + <email>ulm@g.o</email>
105 +</maintainer>
106 +<use>
107 + <flag name='metric'>Default to A4 paper size</flag>
108 +</use>
109 +</pkgmetadata>