Skip to content

Commit

Permalink
Merge pull request #52 from automorphism88/mfc7460dn
Browse files Browse the repository at this point in the history
net-print/brother-mfc7460dn-bin: New ebuild
  • Loading branch information
stefan-langenmaier committed Apr 14, 2018
2 parents 9a0419c + c2c73b1 commit 63dbe11
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net-print/brother-mfc7460dn-bin/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
EBUILD brother-mfc7460dn-bin-1.0.ebuild 312 SHA256 abbed09b7e2416c2af3507a9f2deded3c3f6ac23159c200dd353dd6c7989f0fd SHA512 856f36a9f6d3c729f12408f209c5b84d186c8813d43c04ca37267645855510e8d111e55639258dae6cdea6a69e95fff5636bdfab0fc14739c2408f3411923a2d WHIRLPOOL 529678e20135ef428f3a89316c2726b55e2881abf44b9c4daff2d582d37cc9319ce5c5169c6f5050c58d5d941a7242d0b2a4728058f90d88210be04f574a3212
MISC metadata.xml 247 SHA256 371b83c25fffe2d464eef1f92dd1d44379bb6c781a6d28df18c72bb87ffda6aa SHA512 7f58d55a666f0e999c4ca104a308578a67413089ca787bc5e8cf99b4bfce01d7031190b9fede79e6bd4fab342fe51dafad0742f680e586e354dd02db13c57d53 WHIRLPOOL c072a7d67858f7d8b4bcad36e21c78f003df6090ff4970432217f8c66bdd829b05e3e2ea985864f988adafc4f7cb7b61267e015ac5971deca6e3f3bb8ee37d72
DIST cupswrapperMFC7460DN-2.0.4-2.i386.rpm 14760 BLAKE2B df2acb2afd40858ec8bdd87a3e5c78cca03c4bf7430ac77e60c10cbeafa127fdc401bf0c7dc323eea80ab2ad12ca1afeeb95ab41c66722e809dade58a0ad486c SHA512 1a02179b79b9519bef0a9151f746906b6d83b753f6ce4cf7382d77cb8d98f190b848ebfae44b0b8489e71c94a4099ea18be1f5459940c31087c5009f8f9cacb3
DIST mfc7460dnlpr-2.1.0-1.i386.rpm 37710 BLAKE2B 86c22041230732e5e47f97aac89575eae6a991367f29d2b06813222df29bc8ba4aa53493d4814d4870e45bfa41480c29c9552241831bd5702cbc0bbb83424105 SHA512 d2410b2345160533fc702d78b64039726f809be5d13e421040720b4dafa91cac731d5935a2e1f4366468419860bfe7947f4514d5ffecce6c2bfe28a5d75cf2e2
56 changes: 56 additions & 0 deletions net-print/brother-mfc7460dn-bin/brother-mfc7460dn-bin-2.0.4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="6"
inherit rpm linux-info multilib

DESCRIPTION="Brother MFC-7460DN printer driver"
HOMEPAGE="http://support.brother.com"

SRC_URI="http://download.brother.com/welcome/dlf006257/mfc7460dnlpr-2.1.0-1.i386.rpm
http://download.brother.com/welcome/dlf006259/cupswrapperMFC7460DN-2.0.4-2.i386.rpm"

LICENSE="brother-eula GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="net-print/cups"

RESTRICT="strip"
QA_PREBUILT="opt/brother/Printers/MFC7460DN/inf/brprintconflsr3
opt/brother/Printers/MFC7460DN/lpd/rawtobr3"
S="${WORKDIR}/usr/local/Brother/Printer/MFC7460DN"

pkg_setup() {
CONFIG_CHECK=""
if use amd64; then
CONFIG_CHECK="${CONFIG_CHECK} ~IA32_EMULATION"
if ! has_multilib_profile; then
die "This package CANNOT be installed on pure 64-bit system. You need multilib enabled."
fi
fi
linux-info_pkg_setup
}

src_unpack() {
rpm_unpack ${A}
}

src_prepare() {
default
sed -i -f "${FILESDIR}/fix-path.sed" "${S}/lpd/filterMFC7460DN" || die
sed -f "${FILESDIR}/extract-cups-ppd.sed" "${S}/cupswrapper/cupswrapperMFC7460DN-2.0.4" > "${T}/brother-MFC7460DN.ppd" || die
sed -f "${FILESDIR}/extract-cups-filter.sed" -f "${FILESDIR}/fix-path.sed" "${S}/cupswrapper/cupswrapperMFC7460DN-2.0.4" > "${T}/brlpdwrapperMFC7460DN" || die
}

src_install() {
keepdir /var/spool/lpd/MFC7460DN
dodir /opt/brother/Printers
cp -a "${S}" "${ED%/}/opt/brother/Printers" || die
insinto /opt/brother/Printers/MFC7460DN/cupswrapper
doins "${T}/brother-MFC7460DN.ppd"
exeinto /opt/brother/Printers/MFC7460DN/cupswrapper
doexe "${T}/brlpdwrapperMFC7460DN"
dosym ../../../../opt/brother/Printers/MFC7460DN/cupswrapper/brother-MFC7460DN.ppd /usr/share/cups/model/brother-MFC7460DN.ppd
dosym ../../../../opt/brother/Printers/MFC7460DN/cupswrapper/brlpdwrapperMFC7460DN /usr/libexec/cups/filter/brlpdwrapperMFC7460DN
}
4 changes: 4 additions & 0 deletions net-print/brother-mfc7460dn-bin/files/extract-cups-filter.sed
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sed -f
/^cat <<!ENDOFWFILTER!/,/^!ENDOFWFILTER!/!d
/!ENDOFWFILTER!/d
s/\\\([\`$]\)/\1/g
3 changes: 3 additions & 0 deletions net-print/brother-mfc7460dn-bin/files/extract-cups-ppd.sed
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sed -f
/^cat <<ENDOFPPDFILE/,/^ENDOFPPDFILE/!d
/ENDOFPPDFILE/d
2 changes: 2 additions & 0 deletions net-print/brother-mfc7460dn-bin/files/fix-path.sed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sed -f
s:/usr/local/Brother/Printer:/opt/brother/Printers:g

0 comments on commit 63dbe11

Please sign in to comment.