Skip to content

Commit

Permalink
Merge pull request #121 from nvinson/master
Browse files Browse the repository at this point in the history
Fix printer detection in cupswrapper script
  • Loading branch information
stefan-langenmaier authored Sep 27, 2024
2 parents 8e27342 + f8b4af6 commit c7e7744
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inherit rpm multilib
PRINTER_MODEL=${PN#*-}
PRINTER_MODEL=${PRINTER_MODEL%-*}

DESCRIPTION="Brother printer drive for ${PRINTER_MODEL}"
DESCRIPTION="Brother printer driver for ${PRINTER_MODEL}"
HOMEPAGE="https://support.brother.com/g/b/downloadhowto.aspx?c=us&lang=en&prod=${PRINTER_MODEL}_us_eu_as"
SRC_URI="
https://download.brother.com/welcome/dlf103949/${PRINTER_MODEL}pdrv-1.0.2-0.i386.rpm
Expand All @@ -32,6 +32,14 @@ src_unpack() {
rpm_unpack ${A}
}

src_prepare() {
default
sed -i'' \
-e "s:my \$PRINTER=.*:my \$PRINTER='${PRINTER_MODEL}';:" \
-e 's:$PRINTER =~ .*::' \
"${S}"/opt/brother/Printers/${PRINTER_MODEL}/cupswrapper/brother_lpdwrapper_${PRINTER_MODEL}
}

src_install() {
has_multilib_profile && ABI=x86

Expand Down

0 comments on commit c7e7744

Please sign in to comment.