* [PR PATCH] Add Printer Support: Brother DCP-L8410CDW
@ 2024-08-02 14:58 shahab-vahedi
2024-08-02 16:37 ` [PR PATCH] [Updated] " shahab-vahedi
` (18 more replies)
0 siblings, 19 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-02 14:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 860 bytes --]
There is a new pull request by shahab-vahedi against master on the void-packages repository
https://github.com/shahab-vahedi/void-packages brother
https://github.com/void-linux/void-packages/pull/51608
Add Printer Support: Brother DCP-L8410CDW
The LPR drivers and CUPS wrappers from Debian packages provided on [Brother's Support page](https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, `glibc`
A patch file from https://github.com/void-linux/void-packages/pull/51608.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-51608.patch --]
[-- Type: text/x-diff, Size: 10249 bytes --]
From 7f9752f272e1f8ed6191c6aa7f1d908ea84aae25 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:21 +0200
Subject: [PATCH 1/2] New package: brother-dcp8410-lpr-1.5.0
---
srcpkgs/brother-dcp8410-lpr/INSTALL | 9 +++++
srcpkgs/brother-dcp8410-lpr/REMOVE | 6 ++++
.../patches/fix-setup-script.patch | 17 +++++++++
srcpkgs/brother-dcp8410-lpr/template | 35 +++++++++++++++++++
4 files changed, 67 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-lpr/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-lpr/REMOVE
create mode 100644 srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
create mode 100644 srcpkgs/brother-dcp8410-lpr/template
diff --git a/srcpkgs/brother-dcp8410-lpr/INSTALL b/srcpkgs/brother-dcp8410-lpr/INSTALL
new file mode 100644
index 00000000000000..7297faa2a0aba9
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ usr/bin/brprintconf_dcpl8410cdw
+
+ mkdir -p var/spool/lpd
+ opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -i
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/REMOVE b/srcpkgs/brother-dcp8410-lpr/REMOVE
new file mode 100644
index 00000000000000..0c666f819ceec4
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/REMOVE
@@ -0,0 +1,6 @@
+case ${ACTION} in
+pre)
+ /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -e
+ unlink /usr/bin/brprintconf_dcpl8410cdw
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
new file mode 100644
index 00000000000000..09b116bdcc7cab
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
@@ -0,0 +1,17 @@
+Source: package maintainer
+Upstream: no
+Reason: There's no "lp" user on Void Linux
+
+--- a/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
++++ b/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
+@@ -34,9 +34,8 @@ case "$2" in
+ if [ ! -d $SPOOLER_NAME ]; then
+ mkdir -p $SPOOLER_NAME
+ fi
+- chown lp $SPOOLER_NAME
+ chgrp lp $SPOOLER_NAME
+- chmod 700 $SPOOLER_NAME
++ chmod 770 $SPOOLER_NAME
+
+ if [ "$3" = "USB" ]; then
+ DEVICE_IF=/dev/usb/lp0
diff --git a/srcpkgs/brother-dcp8410-lpr/template b/srcpkgs/brother-dcp8410-lpr/template
new file mode 100644
index 00000000000000..8bbf296fff6e9d
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/template
@@ -0,0 +1,35 @@
+# Template file for 'brother-dcp8410-lpr'
+pkgname=brother-dcp8410-lpr
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="ghostscript"
+short_desc="LPR driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="GPL-2.0-only"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103239/dcpl8410cdwlpr-1.5.0-0.i386.deb"
+checksum="1e97cd530e7b6162bf436d16e94098e524b438fdecf0a8044c5e07efa9300080"
+mutable_files="/opt/brother/Printers/dcpl8410cdw/inf/brdcpl8410cdwrc"
+nopie=yes
+
+do_install() {
+
+ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+ ln -sf ./x86_64/brdcpl8410cdwfilter \
+ opt/brother/Printers/dcpl8410cdw/lpd/brdcpl8410cdwfilter
+ ln -sf ./x86_64/brprintconf_dcpl8410cdw \
+ opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw
+ elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+ ln -sf ./i686/brdcpl8410cdwfilter \
+ opt/brother/Printers/dcpl8410cdw/lpd/brdcpl8410cdwfilter
+ ln -sf ./i686/brprintconf_dcpl8410cdw \
+ opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw
+ fi
+
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ /usr/bin/brprintconf_dcpl8410cdw
+
+ vcopy opt /
+}
From 2d206e64366b75c2f00f36c6570f29e833971652 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:50 +0200
Subject: [PATCH 2/2] New package: brother-dcp8410-cups-1.5.0
---
srcpkgs/brother-dcp8410-cups/INSTALL | 7 +
srcpkgs/brother-dcp8410-cups/REMOVE | 5 +
.../files/cupswrapperdcpl8410cdw.void | 152 ++++++++++++++++++
srcpkgs/brother-dcp8410-cups/template | 25 +++
4 files changed, 189 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-cups/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-cups/REMOVE
create mode 100755 srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
create mode 100644 srcpkgs/brother-dcp8410-cups/template
diff --git a/srcpkgs/brother-dcp8410-cups/INSTALL b/srcpkgs/brother-dcp8410-cups/INSTALL
new file mode 100644
index 00000000000000..3f0d483b50252a
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/INSTALL
@@ -0,0 +1,7 @@
+case "${ACTION}" in
+post)
+ chmod 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw.void -i
+ ;;
+esac
+
diff --git a/srcpkgs/brother-dcp8410-cups/REMOVE b/srcpkgs/brother-dcp8410-cups/REMOVE
new file mode 100644
index 00000000000000..9429345a453649
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/REMOVE
@@ -0,0 +1,5 @@
+case ${ACTION} in
+pre)
+ opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw.void -e
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
new file mode 100755
index 00000000000000..5ec8b25520e1ad
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
@@ -0,0 +1,152 @@
+#! /bin/sh
+#
+# Brother Print filter
+# Copyright (C) 2005-2016 Brother. Industries, Ltd.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# This is trimmed down and tailored for brother-dcpl8410cdw-cupswrapper
+# package of Void Linux
+
+printer_model="dcpl8410cdw"
+printer_name="DCPL8410CDW" # uppercase of $printer_model
+device_name="DCP-L8410CDW" # $printer_name with a hyphen after {MFC,DCP,HL}
+inst_path="/opt/brother/Printers/${printer_model}"
+lpdwrapper="$inst_path/cupswrapper/brother_lpdwrapper_${printer_model}"
+ppd_file_name=/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+brotherlpdwrapper=/usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+
+if [ -d "/usr/share/cups/model" ]
+then
+ mkdir -p /usr/share/cups/model/Brother
+fi
+
+# Eliminate
+if [ "$1" = '-e' ]
+then
+ lpadmin -x ${printer_name}
+ rm -f "$ppd_file"
+ rm -f "$brotherlpdwrapper"
+ rm -f "$lpdwrapper"
+ sv restart cupsd
+ exit 0
+fi
+
+# Restart
+if [ "$1" = "-r" ]
+then
+ lpadmin -x ${printer_name}
+ sv restart cupsd
+ exit 0
+fi
+
+if [ "$1" = "help" ] || [ "$1" = "-h" ]
+then
+ echo 'option -h : help'
+ echo ' -i : install'
+ echo ' -e : uninstall'
+ echo ' -r : remove printer'
+ exit 0
+fi
+
+#
+# The rest is "install"
+#
+
+if [ -e "$inst_path/lpd/filter_${printer_model}" ]
+then
+ :
+else
+ echo "ERROR : Brother LPD filter is not installed."
+fi
+rm -f $ppd_file_name
+
+src_ppd="$inst_path/cupswrapper/brother_${printer_model}_printer_en.ppd"
+if [ -e "$src_ppd" ]
+then
+ cp "$src_ppd" $ppd_file_name
+fi
+chmod 644 $ppd_file_name
+
+#
+# check /usr/lib/cups/filter
+#
+if [ -d /usr/lib/cups/filter ]
+then
+ rm -f $brotherlpdwrapper
+ ln -s $lpdwrapper $brotherlpdwrapper
+fi
+
+sv restart cupsd
+
+sleep 2s
+
+uris=$(lpinfo -v)
+
+for uri in $uris
+do
+ URI=$(echo $uri | grep ${device_name} | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+done
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep ${device_name} )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep -i Brother | grep usb )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ URI="usb://dev/usb/lp0"
+fi
+
+echo lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+
+exit 0
diff --git a/srcpkgs/brother-dcp8410-cups/template b/srcpkgs/brother-dcp8410-cups/template
new file mode 100644
index 00000000000000..dd642d2f1629f9
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/template
@@ -0,0 +1,25 @@
+# Template file for 'brother-dcp8410-cups'
+pkgname=brother-dcp8410-cups
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="brother-dcp8410-lpr cups"
+short_desc="CUPS wrapper driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="GPL-2.0-only"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103248/dcpl8410cdwcupswrapper-1.5.0-0.i386.deb"
+checksum="b9deb04a6b8f7dd800e04cd90dcd3fa6129214bf36d63649b1710915fd8b549a"
+
+do_install() {
+ vcopy opt /
+}
+
+post_install() {
+ # favour the "*.void" version over the one provided by the distfile
+ vinstall ${FILESDIR}/cupswrapperdcpl8410cdw.void 755 opt/brother/Printers/dcpl8410cdw/cupswrapper/
+ chmod a-x ${DESTDIR}/opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw
+
+ chmod 755 ${DESTDIR}/opt/brother/Printers/dcpl8410cdw/cupswrapper
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
@ 2024-08-02 16:37 ` shahab-vahedi
2024-08-04 22:04 ` shahab-vahedi
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-02 16:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 865 bytes --]
There is an updated pull request by shahab-vahedi against master on the void-packages repository
https://github.com/shahab-vahedi/void-packages brother
https://github.com/void-linux/void-packages/pull/51608
Add Printer Support: Brother DCP-L8410CDW
The LPR drivers and CUPS wrappers from Debian packages provided on [Brother's Support page](https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, `glibc`
A patch file from https://github.com/void-linux/void-packages/pull/51608.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-51608.patch --]
[-- Type: text/x-diff, Size: 10259 bytes --]
From 4c9ae7f5bf86bb2f201598cd5f9df4f6ed9ce7f9 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:21 +0200
Subject: [PATCH 1/2] New package: brother-dcp8410-lpr-1.5.0
---
srcpkgs/brother-dcp8410-lpr/INSTALL | 9 +++++
srcpkgs/brother-dcp8410-lpr/REMOVE | 6 ++++
.../patches/fix-setup-script.patch | 17 +++++++++
srcpkgs/brother-dcp8410-lpr/template | 35 +++++++++++++++++++
4 files changed, 67 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-lpr/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-lpr/REMOVE
create mode 100644 srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
create mode 100644 srcpkgs/brother-dcp8410-lpr/template
diff --git a/srcpkgs/brother-dcp8410-lpr/INSTALL b/srcpkgs/brother-dcp8410-lpr/INSTALL
new file mode 100644
index 00000000000000..7297faa2a0aba9
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+post)
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ usr/bin/brprintconf_dcpl8410cdw
+
+ mkdir -p var/spool/lpd
+ opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -i
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/REMOVE b/srcpkgs/brother-dcp8410-lpr/REMOVE
new file mode 100644
index 00000000000000..0c666f819ceec4
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/REMOVE
@@ -0,0 +1,6 @@
+case ${ACTION} in
+pre)
+ /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -e
+ unlink /usr/bin/brprintconf_dcpl8410cdw
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
new file mode 100644
index 00000000000000..09b116bdcc7cab
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
@@ -0,0 +1,17 @@
+Source: package maintainer
+Upstream: no
+Reason: There's no "lp" user on Void Linux
+
+--- a/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
++++ b/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
+@@ -34,9 +34,8 @@ case "$2" in
+ if [ ! -d $SPOOLER_NAME ]; then
+ mkdir -p $SPOOLER_NAME
+ fi
+- chown lp $SPOOLER_NAME
+ chgrp lp $SPOOLER_NAME
+- chmod 700 $SPOOLER_NAME
++ chmod 770 $SPOOLER_NAME
+
+ if [ "$3" = "USB" ]; then
+ DEVICE_IF=/dev/usb/lp0
diff --git a/srcpkgs/brother-dcp8410-lpr/template b/srcpkgs/brother-dcp8410-lpr/template
new file mode 100644
index 00000000000000..78a79232ee03c9
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/template
@@ -0,0 +1,35 @@
+# Template file for 'brother-dcp8410-lpr'
+pkgname=brother-dcp8410-lpr
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="ghostscript"
+short_desc="LPR driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="GPL-2.0-only"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103239/dcpl8410cdwlpr-${version}-0.i386.deb"
+checksum="1e97cd530e7b6162bf436d16e94098e524b438fdecf0a8044c5e07efa9300080"
+mutable_files="/opt/brother/Printers/dcpl8410cdw/inf/brdcpl8410cdwrc"
+nopie=yes
+
+do_install() {
+
+ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+ ln -sf ./x86_64/brdcpl8410cdwfilter \
+ opt/brother/Printers/dcpl8410cdw/lpd/brdcpl8410cdwfilter
+ ln -sf ./x86_64/brprintconf_dcpl8410cdw \
+ opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw
+ elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+ ln -sf ./i686/brdcpl8410cdwfilter \
+ opt/brother/Printers/dcpl8410cdw/lpd/brdcpl8410cdwfilter
+ ln -sf ./i686/brprintconf_dcpl8410cdw \
+ opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw
+ fi
+
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ /usr/bin/brprintconf_dcpl8410cdw
+
+ vcopy opt /
+}
From e31304fa1cd57078577357c38f447a98a017e94d Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:50 +0200
Subject: [PATCH 2/2] New package: brother-dcp8410-cups-1.5.0
---
srcpkgs/brother-dcp8410-cups/INSTALL | 7 +
srcpkgs/brother-dcp8410-cups/REMOVE | 5 +
.../files/cupswrapperdcpl8410cdw.void | 152 ++++++++++++++++++
srcpkgs/brother-dcp8410-cups/template | 25 +++
4 files changed, 189 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-cups/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-cups/REMOVE
create mode 100755 srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
create mode 100644 srcpkgs/brother-dcp8410-cups/template
diff --git a/srcpkgs/brother-dcp8410-cups/INSTALL b/srcpkgs/brother-dcp8410-cups/INSTALL
new file mode 100644
index 00000000000000..3f0d483b50252a
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/INSTALL
@@ -0,0 +1,7 @@
+case "${ACTION}" in
+post)
+ chmod 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw.void -i
+ ;;
+esac
+
diff --git a/srcpkgs/brother-dcp8410-cups/REMOVE b/srcpkgs/brother-dcp8410-cups/REMOVE
new file mode 100644
index 00000000000000..9429345a453649
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/REMOVE
@@ -0,0 +1,5 @@
+case ${ACTION} in
+pre)
+ opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw.void -e
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
new file mode 100755
index 00000000000000..5ec8b25520e1ad
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
@@ -0,0 +1,152 @@
+#! /bin/sh
+#
+# Brother Print filter
+# Copyright (C) 2005-2016 Brother. Industries, Ltd.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# This is trimmed down and tailored for brother-dcpl8410cdw-cupswrapper
+# package of Void Linux
+
+printer_model="dcpl8410cdw"
+printer_name="DCPL8410CDW" # uppercase of $printer_model
+device_name="DCP-L8410CDW" # $printer_name with a hyphen after {MFC,DCP,HL}
+inst_path="/opt/brother/Printers/${printer_model}"
+lpdwrapper="$inst_path/cupswrapper/brother_lpdwrapper_${printer_model}"
+ppd_file_name=/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+brotherlpdwrapper=/usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+
+if [ -d "/usr/share/cups/model" ]
+then
+ mkdir -p /usr/share/cups/model/Brother
+fi
+
+# Eliminate
+if [ "$1" = '-e' ]
+then
+ lpadmin -x ${printer_name}
+ rm -f "$ppd_file"
+ rm -f "$brotherlpdwrapper"
+ rm -f "$lpdwrapper"
+ sv restart cupsd
+ exit 0
+fi
+
+# Restart
+if [ "$1" = "-r" ]
+then
+ lpadmin -x ${printer_name}
+ sv restart cupsd
+ exit 0
+fi
+
+if [ "$1" = "help" ] || [ "$1" = "-h" ]
+then
+ echo 'option -h : help'
+ echo ' -i : install'
+ echo ' -e : uninstall'
+ echo ' -r : remove printer'
+ exit 0
+fi
+
+#
+# The rest is "install"
+#
+
+if [ -e "$inst_path/lpd/filter_${printer_model}" ]
+then
+ :
+else
+ echo "ERROR : Brother LPD filter is not installed."
+fi
+rm -f $ppd_file_name
+
+src_ppd="$inst_path/cupswrapper/brother_${printer_model}_printer_en.ppd"
+if [ -e "$src_ppd" ]
+then
+ cp "$src_ppd" $ppd_file_name
+fi
+chmod 644 $ppd_file_name
+
+#
+# check /usr/lib/cups/filter
+#
+if [ -d /usr/lib/cups/filter ]
+then
+ rm -f $brotherlpdwrapper
+ ln -s $lpdwrapper $brotherlpdwrapper
+fi
+
+sv restart cupsd
+
+sleep 2s
+
+uris=$(lpinfo -v)
+
+for uri in $uris
+do
+ URI=$(echo $uri | grep ${device_name} | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+done
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep ${device_name} )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep -i Brother | grep usb )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ URI="usb://dev/usb/lp0"
+fi
+
+echo lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+
+exit 0
diff --git a/srcpkgs/brother-dcp8410-cups/template b/srcpkgs/brother-dcp8410-cups/template
new file mode 100644
index 00000000000000..4610712412267d
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/template
@@ -0,0 +1,25 @@
+# Template file for 'brother-dcp8410-cups'
+pkgname=brother-dcp8410-cups
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="brother-dcp8410-lpr cups"
+short_desc="CUPS wrapper driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="GPL-2.0-only"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103248/dcpl8410cdwcupswrapper-${version}-0.i386.deb"
+checksum="b9deb04a6b8f7dd800e04cd90dcd3fa6129214bf36d63649b1710915fd8b549a"
+
+do_install() {
+ vcopy opt /
+}
+
+post_install() {
+ # favour the "*.void" version over the one provided by the distfile
+ vinstall ${FILESDIR}/cupswrapperdcpl8410cdw.void 755 opt/brother/Printers/dcpl8410cdw/cupswrapper/
+ chmod a-x ${DESTDIR}/opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw
+
+ chmod 755 ${DESTDIR}/opt/brother/Printers/dcpl8410cdw/cupswrapper
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
2024-08-02 16:37 ` [PR PATCH] [Updated] " shahab-vahedi
@ 2024-08-04 22:04 ` shahab-vahedi
2024-08-05 7:39 ` shahab-vahedi
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-04 22:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
There is an updated pull request by shahab-vahedi against master on the void-packages repository
https://github.com/shahab-vahedi/void-packages brother
https://github.com/void-linux/void-packages/pull/51608
Add Printer Support: Brother DCP-L8410CDW
The LPR drivers and CUPS wrappers from Debian packages provided on [Brother's Support page](https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, `x86_64-glibc`
A patch file from https://github.com/void-linux/void-packages/pull/51608.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-51608.patch --]
[-- Type: text/x-diff, Size: 40760 bytes --]
From 894bc8c4d400290db82696ad710b18ec64cac9d7 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:21 +0200
Subject: [PATCH 1/2] New package: brother-dcp8410-lpr-1.5.0
---
srcpkgs/brother-dcp8410-lpr/INSTALL | 4 +
.../files/README.voidlinux | 5 +
srcpkgs/brother-dcp8410-lpr/files/agree.html | 248 ++++++++++++++++++
.../patches/fix-setup-script.patch | 17 ++
srcpkgs/brother-dcp8410-lpr/template | 45 ++++
5 files changed, 319 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-lpr/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
create mode 100644 srcpkgs/brother-dcp8410-lpr/files/agree.html
create mode 100644 srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
create mode 100644 srcpkgs/brother-dcp8410-lpr/template
diff --git a/srcpkgs/brother-dcp8410-lpr/INSTALL b/srcpkgs/brother-dcp8410-lpr/INSTALL
new file mode 100644
index 00000000000000..b3bc10a08d1f8c
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/INSTALL
@@ -0,0 +1,4 @@
+case "${ACTION}" in
+post)
+ mkdir -p var/spool/lpd
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux b/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
new file mode 100644
index 00000000000000..768afa57c17ac6
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
@@ -0,0 +1,5 @@
+If you have attached the device through a USB interface, then run:
+# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -i
+
+Also, before removing the package, you have to execute:
+# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -e
diff --git a/srcpkgs/brother-dcp8410-lpr/files/agree.html b/srcpkgs/brother-dcp8410-lpr/files/agree.html
new file mode 100644
index 00000000000000..577f6b82035fa8
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/files/agree.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>End-User License Agreement for Brother Software</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all">
+<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script>
+
+<style type="text/css">
+<!--
+body { font-size: 100%}
+.main { font-size: 100%}
+.sm { font-size: 90%}
+-->
+</style>
+</head>
+
+<body>
+
+<!-- begin #header -->
+<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header">
+<tr>
+<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td>
+<td>
+
+<table border="0" cellpadding="0" cellspacing="0" summary="">
+<tr>
+<td id="brotherLogo">
+<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a>
+</td>
+<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+<td id="formArea">
+<!-- SelectCountry -->
+<div id="country">
+<form name="form1" id="form1">
+<select name="select_country" class="countryTxt">
+<option value="http://www.brother.com/index.htm" selected>Global Site</option>
+<option></option>
+<optgroup label="North/ South/ Central America">
+<option value="http://www.brother.com.ar/">Argentina - Español</option>
+<option value="http://www.brother.com.br/">Brasil - Português</option>
+<option value="http://www.brother.ca/en/index.asp">Canada - English</option>
+<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option>
+<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option>
+<option value="http://www.brother.cl/">Chile - Español</option>
+<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option>
+<option value="http://www.brother.com.mx/">México - Español</option>
+<option value="http://www.brother-usa.com/">U.S.A. - English</option>
+<option></option>
+</optgroup>
+<optgroup label="Europe">
+<option value="http://www.brother.eu/">Brother Europe</option>
+<option value="http://www.brother.at/?lang=en">Austria - English</option>
+<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option>
+<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option>
+<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option>
+<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option>
+<option value="http://www.brother.cz/">Česká republika - česky</option>
+<option value="http://www.brother.dk/">Danmark - Dansk</option>
+<option value="http://www.brother.de/">Deutschland - Deutsch</option>
+<option value="http://www.brother.es/">España - Español</option>
+<option value="http://www.brother.fi/">Finland -Suomi</option>
+<option value="http://www.brother.fr/">France - Français</option>
+<option value="http://www.brother.ie/">Ireland - English</option>
+<option value="http://www.brother.it/">Italia - Italiano</option>
+<option value="http://www.brother.hu/">Magyarország - Magyar</option>
+<option value="http://www.brother.nl/">Nederland - Nederlands</option>
+<option value="http://www.brother.no/">Norge - Norsk</option>
+<option value="http://www.brother.pl/">Polska - Polski</option>
+<option value="http://www.brother.pt/">Portugal - Português</option>
+<option value="http://www.brother.ru/">Россия - Pусский</option>
+<option value="http://www.brother.com.ro/">România - Românã</option>
+<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option>
+<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.se/">Sverige - Svenska</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option>
+<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option></option>
+</optgroup>
+<optgroup label="Middle East/ Africa">
+<option value="http://www.brother.ae/">Bahrain - English</option>
+<option value="http://www.brother.ae/">Egypt - English</option>
+<option value="http://www.brother.ae/">Ethiopia - English</option>
+<option value="http://www.brother.ae/">Iran - English</option>
+<option value="http://www.brother.ae/">Iraq - English</option>
+<option value="http://www.brother.ae/">Jordan - English</option>
+<option value="http://www.brother.ae/">Kenya - English</option>
+<option value="http://www.brother.ae/">Kuwait - English</option>
+<option value="http://www.brother.ae/">Lebanon - English</option>
+<option value="http://www.brother.ae/">Libya - English</option>
+<option value="http://www.brother.ae/">Mauritius - English</option>
+<option value="http://www.brother.ae/">Nigeria - English</option>
+<option value="http://www.brother.ae/">Oman - English</option>
+<option value="http://www.brother.ae/">Qatar - English</option>
+<option value="http://www.brother.ae/">Saudi Arabia - English</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.ae/">Syria - English</option>
+<option value="http://www.brother.ae/">Tanzania - English</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.ae/">Uganda - English</option>
+<option value="http://www.brother.ae/">United Arab Emirates - English</option>
+<option value="http://www.brother.ae/">Yemen - English</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option>
+<option></option>
+</optgroup>
+<optgroup label="Asia/ Oceania">
+<option value="http://www.brother.com.au/">Australia - English</option>
+<option value="http://www.brother.ae/">Bangladesh - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+-<option value="http://www.brother-cn.net/">China - Chinese</option>
+<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option>
+<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option>
+<option value="http://www.brother.in/">India - English</option>
+<option value="http://www.brother.com.sg/">Indonesia - English</option>
+<option value="http://www.brother.co.jp/">Japan - Japanese</option>
+<option value="http://www.brother.com.my/">Malaysia - English</option>
+<option value="http://www.brother.ae/">Nepal - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.co.nz/">New Zealand - English</option>
+<option value="http://www.brother.ae/">Pakistan - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.ph/">Philippines - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Singapore - English</option>
+-<option value="http://www.brother.co.th/">Thailand - Thai</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Vietnam - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option>
+</optgroup>
+</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a>
+</form>
+</div>
+<!-- SelectCountry -->
+
+
+<!-- SiteSearch -->
+<div id="search">
+<form name="gs" method="GET" action="http://search2.brother.co.jp/search?">
+<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif">
+<input type="hidden" name="sort" value="date:D:L:d1">
+<input type="hidden" name="output" value="xml_no_dtd">
+<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8">
+<input type="hidden" name="client" value="fe_www_com">
+<input type="hidden" name="proxystylesheet" value="fe_www_com">
+<input type="hidden" name="site" value="col_www_com_cominf_sol">
+ </div>
+ </form>
+</div>
+<!-- SiteSearch -->
+</td>
+</tr>
+</table>
+
+</td>
+<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+</tr>
+
+
+</table>
+<!-- end #header -->
+
+<div style="line-height:1px;"> </div>
+
+<table border="0" cellspacing="0" cellpadding="2" width="600">
+<tr>
+<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td>
+</tr>
+<tr>
+<td><p>This Agreement provides terms and conditions for license grant for use
+ of the software that is distributed with this Agreement ("Software")
+ from Brother Industries, Ltd. ("Brother") to recipients thereof
+ ("You").</p>
+ <table width="100%" height="60" border="1" bordercolor="#000099">
+ <tr>
+ <td bordercolor="#000099"><strong>Note:</strong><br>
+ Please click on "I Accept" while holding down "Shift" or
+ right click on "I Accept" and select "Save Target As,,," from
+ the menu.</td>
+ </tr>
+ </table>
+ <ol>
+ <li>The Software is comprised of the following software modules:<br>
+ <br>
+ (1) Certain software modules that is the subject of GNU GENERAL PUBLIC
+ LICENSE ("GPL Modules"), and
+ <br>
+ (2) Other software modules ("Non-GPL Modules")
+ <br>
+ <br>
+ You may distinguish each of GPL Modules by downloading source files
+ of the Software as Brother separately makes available and reading such
+ files.<br>
+ </li>
+ <li>Your use of all GPL Modules shall be subject to the terms and conditions
+ of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2").
+ Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You
+ shall use GPL Modules in accordance with the terms and conditions of GPLv2.
+ Your use of GPL Modules shall be deemed
+ as your agreement to the terms and conditions of GPLv2.<br>
+ </li>
+ <li>You have the right to use all Non-GPL Modules only in accordance with
+ the following terms and conditions. Your use of Non-GPL Modules shall be
+ deemed as your agreement to the following terms and conditions:
+ <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no
+ case this Agreement shall be construed to assign or otherwise transfer
+ from Brother to you any copyrights or other intellectual property rights
+ to whole or any part of Non-GPL Modules.</p>
+ <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute
+ (via Internet or in any other manner) Non-GPL Modules. Brother further
+ grants you a non-exclusive license to modify, alter, translate or otherwise
+ prepare derivative works of Non-GPL Modules and to reproduce and/or distribute
+ (via Internet or in any other manner) such modification, alteration,
+ translation or other derivative works of Non-GPL Modules.</p>
+ <p>(3) When you distribute (via Internet or in any other manner) Non-GPL
+ Modules or any modification, alteration, translation or other derivative
+ works thereof under the license granted in accordance with subparagraph
+ 3(2) above, you must expressly grant any and all recipient thereof the
+ license equivalent to this Agreement which applies to Non-GPL Modules.</p>
+ <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS
+ IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY,
+ MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p>
+ <p>(5) To the extent allowed by applicable laws, Brother shall have no
+ liability in contract, tort (including negligence or breach of statutory
+ duty) or otherwise for any interruption of use, loss of data, or for
+ any indirect, incidental, punitive or consequential loss or damage, or
+ for any loss of profit, revenue, data, goodwill or anticipated savings
+ that arises under, out of, or in contemplation of this Agreement or otherwise
+ arises due to any error, inaccuracy or defect in Non-GPL Modules even
+ if Brother has been advised of the possibility of such loss or damage.</p>
+ <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers
+ sole discretion. Brother does not have any obligation to distribute or
+ disclose Non-GPL Modules in source code form. In no case shall this Agreement
+ be deemed as Brothers express or implied agreement to disclose source
+ code of Non-GPL Modules.</p>
+ </li>
+ </ol></td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
new file mode 100644
index 00000000000000..09b116bdcc7cab
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
@@ -0,0 +1,17 @@
+Source: package maintainer
+Upstream: no
+Reason: There's no "lp" user on Void Linux
+
+--- a/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
++++ b/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
+@@ -34,9 +34,8 @@ case "$2" in
+ if [ ! -d $SPOOLER_NAME ]; then
+ mkdir -p $SPOOLER_NAME
+ fi
+- chown lp $SPOOLER_NAME
+ chgrp lp $SPOOLER_NAME
+- chmod 700 $SPOOLER_NAME
++ chmod 770 $SPOOLER_NAME
+
+ if [ "$3" = "USB" ]; then
+ DEVICE_IF=/dev/usb/lp0
diff --git a/srcpkgs/brother-dcp8410-lpr/template b/srcpkgs/brother-dcp8410-lpr/template
new file mode 100644
index 00000000000000..c24f93bbeaf396
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/template
@@ -0,0 +1,45 @@
+# Template file for 'brother-dcp8410-lpr'
+pkgname=brother-dcp8410-lpr
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="ghostscript"
+short_desc="LPR driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:EULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103239/dcpl8410cdwlpr-${version}-0.i386.deb"
+checksum="1e97cd530e7b6162bf436d16e94098e524b438fdecf0a8044c5e07efa9300080"
+repository="nonfree"
+conf_files="/opt/brother/Printers/dcpl8410cdw/inf/brdcpl8410cdwrc"
+nopie=yes
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/lpd 755
+
+ vcopy opt/brother/Printers/dcpl8410cdw/inf opt/brother/Printers/dcpl8410cdw
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/filter_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd
+
+ # Copy the executables based on architecture type
+ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+ _arch="x86_64"
+ elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+ _arch="i686"
+ else
+ _arch="unknown"
+ fi
+ for bin in brdcpl8410cdwfilter brprintconf_dcpl8410cdw; do
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/x86_64/${bin} \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd/
+ done
+
+ vmkdir usr/bin 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ ${DESTDIR}/usr/bin/brprintconf_dcpl8410cdw
+
+ vlicense ${FILESDIR}/agree.html LICENSE.html
+
+ vdoc "${FILESDIR}/README.voidlinux"
+}
From f516a3cd94451ddb064c76d64ed07ee0a60a9e39 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:50 +0200
Subject: [PATCH 2/2] New package: brother-dcp8410-cups-1.5.0
---
srcpkgs/brother-dcp8410-cups/INSTALL | 6 +
srcpkgs/brother-dcp8410-cups/REMOVE | 5 +
srcpkgs/brother-dcp8410-cups/files/agree.html | 248 ++++++++++++++++++
.../files/cupswrapperdcpl8410cdw.void | 152 +++++++++++
srcpkgs/brother-dcp8410-cups/template | 37 +++
5 files changed, 448 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-cups/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-cups/REMOVE
create mode 100644 srcpkgs/brother-dcp8410-cups/files/agree.html
create mode 100755 srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
create mode 100644 srcpkgs/brother-dcp8410-cups/template
diff --git a/srcpkgs/brother-dcp8410-cups/INSTALL b/srcpkgs/brother-dcp8410-cups/INSTALL
new file mode 100644
index 00000000000000..3f342471bd0f92
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/INSTALL
@@ -0,0 +1,6 @@
+case "${ACTION}" in
+post)
+ [ -d /var/service/cupsd ] && sv restart cupsd
+ ;;
+esac
+
diff --git a/srcpkgs/brother-dcp8410-cups/REMOVE b/srcpkgs/brother-dcp8410-cups/REMOVE
new file mode 100644
index 00000000000000..1515570c7f7835
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/REMOVE
@@ -0,0 +1,5 @@
+case ${ACTION} in
+post)
+ [ -d /var/service/cupsd ] && sv restart cupsd
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-cups/files/agree.html b/srcpkgs/brother-dcp8410-cups/files/agree.html
new file mode 100644
index 00000000000000..577f6b82035fa8
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/agree.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>End-User License Agreement for Brother Software</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all">
+<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script>
+
+<style type="text/css">
+<!--
+body { font-size: 100%}
+.main { font-size: 100%}
+.sm { font-size: 90%}
+-->
+</style>
+</head>
+
+<body>
+
+<!-- begin #header -->
+<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header">
+<tr>
+<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td>
+<td>
+
+<table border="0" cellpadding="0" cellspacing="0" summary="">
+<tr>
+<td id="brotherLogo">
+<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a>
+</td>
+<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+<td id="formArea">
+<!-- SelectCountry -->
+<div id="country">
+<form name="form1" id="form1">
+<select name="select_country" class="countryTxt">
+<option value="http://www.brother.com/index.htm" selected>Global Site</option>
+<option></option>
+<optgroup label="North/ South/ Central America">
+<option value="http://www.brother.com.ar/">Argentina - Español</option>
+<option value="http://www.brother.com.br/">Brasil - Português</option>
+<option value="http://www.brother.ca/en/index.asp">Canada - English</option>
+<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option>
+<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option>
+<option value="http://www.brother.cl/">Chile - Español</option>
+<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option>
+<option value="http://www.brother.com.mx/">México - Español</option>
+<option value="http://www.brother-usa.com/">U.S.A. - English</option>
+<option></option>
+</optgroup>
+<optgroup label="Europe">
+<option value="http://www.brother.eu/">Brother Europe</option>
+<option value="http://www.brother.at/?lang=en">Austria - English</option>
+<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option>
+<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option>
+<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option>
+<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option>
+<option value="http://www.brother.cz/">Česká republika - česky</option>
+<option value="http://www.brother.dk/">Danmark - Dansk</option>
+<option value="http://www.brother.de/">Deutschland - Deutsch</option>
+<option value="http://www.brother.es/">España - Español</option>
+<option value="http://www.brother.fi/">Finland -Suomi</option>
+<option value="http://www.brother.fr/">France - Français</option>
+<option value="http://www.brother.ie/">Ireland - English</option>
+<option value="http://www.brother.it/">Italia - Italiano</option>
+<option value="http://www.brother.hu/">Magyarország - Magyar</option>
+<option value="http://www.brother.nl/">Nederland - Nederlands</option>
+<option value="http://www.brother.no/">Norge - Norsk</option>
+<option value="http://www.brother.pl/">Polska - Polski</option>
+<option value="http://www.brother.pt/">Portugal - Português</option>
+<option value="http://www.brother.ru/">Россия - Pусский</option>
+<option value="http://www.brother.com.ro/">România - Românã</option>
+<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option>
+<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.se/">Sverige - Svenska</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option>
+<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option></option>
+</optgroup>
+<optgroup label="Middle East/ Africa">
+<option value="http://www.brother.ae/">Bahrain - English</option>
+<option value="http://www.brother.ae/">Egypt - English</option>
+<option value="http://www.brother.ae/">Ethiopia - English</option>
+<option value="http://www.brother.ae/">Iran - English</option>
+<option value="http://www.brother.ae/">Iraq - English</option>
+<option value="http://www.brother.ae/">Jordan - English</option>
+<option value="http://www.brother.ae/">Kenya - English</option>
+<option value="http://www.brother.ae/">Kuwait - English</option>
+<option value="http://www.brother.ae/">Lebanon - English</option>
+<option value="http://www.brother.ae/">Libya - English</option>
+<option value="http://www.brother.ae/">Mauritius - English</option>
+<option value="http://www.brother.ae/">Nigeria - English</option>
+<option value="http://www.brother.ae/">Oman - English</option>
+<option value="http://www.brother.ae/">Qatar - English</option>
+<option value="http://www.brother.ae/">Saudi Arabia - English</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.ae/">Syria - English</option>
+<option value="http://www.brother.ae/">Tanzania - English</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.ae/">Uganda - English</option>
+<option value="http://www.brother.ae/">United Arab Emirates - English</option>
+<option value="http://www.brother.ae/">Yemen - English</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option>
+<option></option>
+</optgroup>
+<optgroup label="Asia/ Oceania">
+<option value="http://www.brother.com.au/">Australia - English</option>
+<option value="http://www.brother.ae/">Bangladesh - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+-<option value="http://www.brother-cn.net/">China - Chinese</option>
+<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option>
+<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option>
+<option value="http://www.brother.in/">India - English</option>
+<option value="http://www.brother.com.sg/">Indonesia - English</option>
+<option value="http://www.brother.co.jp/">Japan - Japanese</option>
+<option value="http://www.brother.com.my/">Malaysia - English</option>
+<option value="http://www.brother.ae/">Nepal - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.co.nz/">New Zealand - English</option>
+<option value="http://www.brother.ae/">Pakistan - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.ph/">Philippines - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Singapore - English</option>
+-<option value="http://www.brother.co.th/">Thailand - Thai</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Vietnam - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option>
+</optgroup>
+</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a>
+</form>
+</div>
+<!-- SelectCountry -->
+
+
+<!-- SiteSearch -->
+<div id="search">
+<form name="gs" method="GET" action="http://search2.brother.co.jp/search?">
+<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif">
+<input type="hidden" name="sort" value="date:D:L:d1">
+<input type="hidden" name="output" value="xml_no_dtd">
+<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8">
+<input type="hidden" name="client" value="fe_www_com">
+<input type="hidden" name="proxystylesheet" value="fe_www_com">
+<input type="hidden" name="site" value="col_www_com_cominf_sol">
+ </div>
+ </form>
+</div>
+<!-- SiteSearch -->
+</td>
+</tr>
+</table>
+
+</td>
+<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+</tr>
+
+
+</table>
+<!-- end #header -->
+
+<div style="line-height:1px;"> </div>
+
+<table border="0" cellspacing="0" cellpadding="2" width="600">
+<tr>
+<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td>
+</tr>
+<tr>
+<td><p>This Agreement provides terms and conditions for license grant for use
+ of the software that is distributed with this Agreement ("Software")
+ from Brother Industries, Ltd. ("Brother") to recipients thereof
+ ("You").</p>
+ <table width="100%" height="60" border="1" bordercolor="#000099">
+ <tr>
+ <td bordercolor="#000099"><strong>Note:</strong><br>
+ Please click on "I Accept" while holding down "Shift" or
+ right click on "I Accept" and select "Save Target As,,," from
+ the menu.</td>
+ </tr>
+ </table>
+ <ol>
+ <li>The Software is comprised of the following software modules:<br>
+ <br>
+ (1) Certain software modules that is the subject of GNU GENERAL PUBLIC
+ LICENSE ("GPL Modules"), and
+ <br>
+ (2) Other software modules ("Non-GPL Modules")
+ <br>
+ <br>
+ You may distinguish each of GPL Modules by downloading source files
+ of the Software as Brother separately makes available and reading such
+ files.<br>
+ </li>
+ <li>Your use of all GPL Modules shall be subject to the terms and conditions
+ of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2").
+ Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You
+ shall use GPL Modules in accordance with the terms and conditions of GPLv2.
+ Your use of GPL Modules shall be deemed
+ as your agreement to the terms and conditions of GPLv2.<br>
+ </li>
+ <li>You have the right to use all Non-GPL Modules only in accordance with
+ the following terms and conditions. Your use of Non-GPL Modules shall be
+ deemed as your agreement to the following terms and conditions:
+ <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no
+ case this Agreement shall be construed to assign or otherwise transfer
+ from Brother to you any copyrights or other intellectual property rights
+ to whole or any part of Non-GPL Modules.</p>
+ <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute
+ (via Internet or in any other manner) Non-GPL Modules. Brother further
+ grants you a non-exclusive license to modify, alter, translate or otherwise
+ prepare derivative works of Non-GPL Modules and to reproduce and/or distribute
+ (via Internet or in any other manner) such modification, alteration,
+ translation or other derivative works of Non-GPL Modules.</p>
+ <p>(3) When you distribute (via Internet or in any other manner) Non-GPL
+ Modules or any modification, alteration, translation or other derivative
+ works thereof under the license granted in accordance with subparagraph
+ 3(2) above, you must expressly grant any and all recipient thereof the
+ license equivalent to this Agreement which applies to Non-GPL Modules.</p>
+ <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS
+ IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY,
+ MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p>
+ <p>(5) To the extent allowed by applicable laws, Brother shall have no
+ liability in contract, tort (including negligence or breach of statutory
+ duty) or otherwise for any interruption of use, loss of data, or for
+ any indirect, incidental, punitive or consequential loss or damage, or
+ for any loss of profit, revenue, data, goodwill or anticipated savings
+ that arises under, out of, or in contemplation of this Agreement or otherwise
+ arises due to any error, inaccuracy or defect in Non-GPL Modules even
+ if Brother has been advised of the possibility of such loss or damage.</p>
+ <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers
+ sole discretion. Brother does not have any obligation to distribute or
+ disclose Non-GPL Modules in source code form. In no case shall this Agreement
+ be deemed as Brothers express or implied agreement to disclose source
+ code of Non-GPL Modules.</p>
+ </li>
+ </ol></td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
new file mode 100755
index 00000000000000..5ec8b25520e1ad
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
@@ -0,0 +1,152 @@
+#! /bin/sh
+#
+# Brother Print filter
+# Copyright (C) 2005-2016 Brother. Industries, Ltd.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# This is trimmed down and tailored for brother-dcpl8410cdw-cupswrapper
+# package of Void Linux
+
+printer_model="dcpl8410cdw"
+printer_name="DCPL8410CDW" # uppercase of $printer_model
+device_name="DCP-L8410CDW" # $printer_name with a hyphen after {MFC,DCP,HL}
+inst_path="/opt/brother/Printers/${printer_model}"
+lpdwrapper="$inst_path/cupswrapper/brother_lpdwrapper_${printer_model}"
+ppd_file_name=/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+brotherlpdwrapper=/usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+
+if [ -d "/usr/share/cups/model" ]
+then
+ mkdir -p /usr/share/cups/model/Brother
+fi
+
+# Eliminate
+if [ "$1" = '-e' ]
+then
+ lpadmin -x ${printer_name}
+ rm -f "$ppd_file"
+ rm -f "$brotherlpdwrapper"
+ rm -f "$lpdwrapper"
+ sv restart cupsd
+ exit 0
+fi
+
+# Restart
+if [ "$1" = "-r" ]
+then
+ lpadmin -x ${printer_name}
+ sv restart cupsd
+ exit 0
+fi
+
+if [ "$1" = "help" ] || [ "$1" = "-h" ]
+then
+ echo 'option -h : help'
+ echo ' -i : install'
+ echo ' -e : uninstall'
+ echo ' -r : remove printer'
+ exit 0
+fi
+
+#
+# The rest is "install"
+#
+
+if [ -e "$inst_path/lpd/filter_${printer_model}" ]
+then
+ :
+else
+ echo "ERROR : Brother LPD filter is not installed."
+fi
+rm -f $ppd_file_name
+
+src_ppd="$inst_path/cupswrapper/brother_${printer_model}_printer_en.ppd"
+if [ -e "$src_ppd" ]
+then
+ cp "$src_ppd" $ppd_file_name
+fi
+chmod 644 $ppd_file_name
+
+#
+# check /usr/lib/cups/filter
+#
+if [ -d /usr/lib/cups/filter ]
+then
+ rm -f $brotherlpdwrapper
+ ln -s $lpdwrapper $brotherlpdwrapper
+fi
+
+sv restart cupsd
+
+sleep 2s
+
+uris=$(lpinfo -v)
+
+for uri in $uris
+do
+ URI=$(echo $uri | grep ${device_name} | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+done
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep ${device_name} )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep -i Brother | grep usb )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ URI="usb://dev/usb/lp0"
+fi
+
+echo lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+
+exit 0
diff --git a/srcpkgs/brother-dcp8410-cups/template b/srcpkgs/brother-dcp8410-cups/template
new file mode 100644
index 00000000000000..e3d0026dd07a15
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/template
@@ -0,0 +1,37 @@
+# Template file for 'brother-dcp8410-cups'
+pkgname=brother-dcp8410-cups
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="brother-dcp8410-lpr cups cups-filters"
+short_desc="CUPS wrapper driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:EULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103248/dcpl8410cdwcupswrapper-${version}-0.i386.deb"
+checksum="b9deb04a6b8f7dd800e04cd90dcd3fa6129214bf36d63649b1710915fd8b549a"
+repository="nonfree"
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/cupswrapper 755
+
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall ${FILESDIR}/cupswrapperdcpl8410cdw.void \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+
+ # Copy the PPD file to its rightful place
+ vmkdir usr/share/cups/model/Brother 755
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 usr/share/cups/model/Brother
+
+ # Create a link to lpdwrapper in CUPS filter directory
+ vmkdir usr/lib/cups/filter 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ ${DESTDIR}/usr/lib/cups/filter/brother_lpdwrapper_dcpl8410cdw
+
+ vlicense ${FILESDIR}/agree.html LICENSE.html
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
2024-08-02 16:37 ` [PR PATCH] [Updated] " shahab-vahedi
2024-08-04 22:04 ` shahab-vahedi
@ 2024-08-05 7:39 ` shahab-vahedi
2024-08-05 7:53 ` shahab-vahedi
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-05 7:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
There is an updated pull request by shahab-vahedi against master on the void-packages repository
https://github.com/shahab-vahedi/void-packages brother
https://github.com/void-linux/void-packages/pull/51608
Add Printer Support: Brother DCP-L8410CDW
The LPR drivers and CUPS wrappers from Debian packages provided on [Brother's Support page](https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, `x86_64-glibc`
A patch file from https://github.com/void-linux/void-packages/pull/51608.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-51608.patch --]
[-- Type: text/x-diff, Size: 42180 bytes --]
From 894bc8c4d400290db82696ad710b18ec64cac9d7 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:21 +0200
Subject: [PATCH 1/2] New package: brother-dcp8410-lpr-1.5.0
---
srcpkgs/brother-dcp8410-lpr/INSTALL | 4 +
.../files/README.voidlinux | 5 +
srcpkgs/brother-dcp8410-lpr/files/agree.html | 248 ++++++++++++++++++
.../patches/fix-setup-script.patch | 17 ++
srcpkgs/brother-dcp8410-lpr/template | 45 ++++
5 files changed, 319 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-lpr/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
create mode 100644 srcpkgs/brother-dcp8410-lpr/files/agree.html
create mode 100644 srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
create mode 100644 srcpkgs/brother-dcp8410-lpr/template
diff --git a/srcpkgs/brother-dcp8410-lpr/INSTALL b/srcpkgs/brother-dcp8410-lpr/INSTALL
new file mode 100644
index 00000000000000..b3bc10a08d1f8c
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/INSTALL
@@ -0,0 +1,4 @@
+case "${ACTION}" in
+post)
+ mkdir -p var/spool/lpd
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux b/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
new file mode 100644
index 00000000000000..768afa57c17ac6
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
@@ -0,0 +1,5 @@
+If you have attached the device through a USB interface, then run:
+# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -i
+
+Also, before removing the package, you have to execute:
+# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -e
diff --git a/srcpkgs/brother-dcp8410-lpr/files/agree.html b/srcpkgs/brother-dcp8410-lpr/files/agree.html
new file mode 100644
index 00000000000000..577f6b82035fa8
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/files/agree.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>End-User License Agreement for Brother Software</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all">
+<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script>
+
+<style type="text/css">
+<!--
+body { font-size: 100%}
+.main { font-size: 100%}
+.sm { font-size: 90%}
+-->
+</style>
+</head>
+
+<body>
+
+<!-- begin #header -->
+<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header">
+<tr>
+<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td>
+<td>
+
+<table border="0" cellpadding="0" cellspacing="0" summary="">
+<tr>
+<td id="brotherLogo">
+<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a>
+</td>
+<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+<td id="formArea">
+<!-- SelectCountry -->
+<div id="country">
+<form name="form1" id="form1">
+<select name="select_country" class="countryTxt">
+<option value="http://www.brother.com/index.htm" selected>Global Site</option>
+<option></option>
+<optgroup label="North/ South/ Central America">
+<option value="http://www.brother.com.ar/">Argentina - Español</option>
+<option value="http://www.brother.com.br/">Brasil - Português</option>
+<option value="http://www.brother.ca/en/index.asp">Canada - English</option>
+<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option>
+<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option>
+<option value="http://www.brother.cl/">Chile - Español</option>
+<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option>
+<option value="http://www.brother.com.mx/">México - Español</option>
+<option value="http://www.brother-usa.com/">U.S.A. - English</option>
+<option></option>
+</optgroup>
+<optgroup label="Europe">
+<option value="http://www.brother.eu/">Brother Europe</option>
+<option value="http://www.brother.at/?lang=en">Austria - English</option>
+<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option>
+<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option>
+<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option>
+<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option>
+<option value="http://www.brother.cz/">Česká republika - česky</option>
+<option value="http://www.brother.dk/">Danmark - Dansk</option>
+<option value="http://www.brother.de/">Deutschland - Deutsch</option>
+<option value="http://www.brother.es/">España - Español</option>
+<option value="http://www.brother.fi/">Finland -Suomi</option>
+<option value="http://www.brother.fr/">France - Français</option>
+<option value="http://www.brother.ie/">Ireland - English</option>
+<option value="http://www.brother.it/">Italia - Italiano</option>
+<option value="http://www.brother.hu/">Magyarország - Magyar</option>
+<option value="http://www.brother.nl/">Nederland - Nederlands</option>
+<option value="http://www.brother.no/">Norge - Norsk</option>
+<option value="http://www.brother.pl/">Polska - Polski</option>
+<option value="http://www.brother.pt/">Portugal - Português</option>
+<option value="http://www.brother.ru/">Россия - Pусский</option>
+<option value="http://www.brother.com.ro/">România - Românã</option>
+<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option>
+<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.se/">Sverige - Svenska</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option>
+<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option></option>
+</optgroup>
+<optgroup label="Middle East/ Africa">
+<option value="http://www.brother.ae/">Bahrain - English</option>
+<option value="http://www.brother.ae/">Egypt - English</option>
+<option value="http://www.brother.ae/">Ethiopia - English</option>
+<option value="http://www.brother.ae/">Iran - English</option>
+<option value="http://www.brother.ae/">Iraq - English</option>
+<option value="http://www.brother.ae/">Jordan - English</option>
+<option value="http://www.brother.ae/">Kenya - English</option>
+<option value="http://www.brother.ae/">Kuwait - English</option>
+<option value="http://www.brother.ae/">Lebanon - English</option>
+<option value="http://www.brother.ae/">Libya - English</option>
+<option value="http://www.brother.ae/">Mauritius - English</option>
+<option value="http://www.brother.ae/">Nigeria - English</option>
+<option value="http://www.brother.ae/">Oman - English</option>
+<option value="http://www.brother.ae/">Qatar - English</option>
+<option value="http://www.brother.ae/">Saudi Arabia - English</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.ae/">Syria - English</option>
+<option value="http://www.brother.ae/">Tanzania - English</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.ae/">Uganda - English</option>
+<option value="http://www.brother.ae/">United Arab Emirates - English</option>
+<option value="http://www.brother.ae/">Yemen - English</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option>
+<option></option>
+</optgroup>
+<optgroup label="Asia/ Oceania">
+<option value="http://www.brother.com.au/">Australia - English</option>
+<option value="http://www.brother.ae/">Bangladesh - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+-<option value="http://www.brother-cn.net/">China - Chinese</option>
+<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option>
+<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option>
+<option value="http://www.brother.in/">India - English</option>
+<option value="http://www.brother.com.sg/">Indonesia - English</option>
+<option value="http://www.brother.co.jp/">Japan - Japanese</option>
+<option value="http://www.brother.com.my/">Malaysia - English</option>
+<option value="http://www.brother.ae/">Nepal - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.co.nz/">New Zealand - English</option>
+<option value="http://www.brother.ae/">Pakistan - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.ph/">Philippines - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Singapore - English</option>
+-<option value="http://www.brother.co.th/">Thailand - Thai</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Vietnam - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option>
+</optgroup>
+</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a>
+</form>
+</div>
+<!-- SelectCountry -->
+
+
+<!-- SiteSearch -->
+<div id="search">
+<form name="gs" method="GET" action="http://search2.brother.co.jp/search?">
+<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif">
+<input type="hidden" name="sort" value="date:D:L:d1">
+<input type="hidden" name="output" value="xml_no_dtd">
+<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8">
+<input type="hidden" name="client" value="fe_www_com">
+<input type="hidden" name="proxystylesheet" value="fe_www_com">
+<input type="hidden" name="site" value="col_www_com_cominf_sol">
+ </div>
+ </form>
+</div>
+<!-- SiteSearch -->
+</td>
+</tr>
+</table>
+
+</td>
+<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+</tr>
+
+
+</table>
+<!-- end #header -->
+
+<div style="line-height:1px;"> </div>
+
+<table border="0" cellspacing="0" cellpadding="2" width="600">
+<tr>
+<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td>
+</tr>
+<tr>
+<td><p>This Agreement provides terms and conditions for license grant for use
+ of the software that is distributed with this Agreement ("Software")
+ from Brother Industries, Ltd. ("Brother") to recipients thereof
+ ("You").</p>
+ <table width="100%" height="60" border="1" bordercolor="#000099">
+ <tr>
+ <td bordercolor="#000099"><strong>Note:</strong><br>
+ Please click on "I Accept" while holding down "Shift" or
+ right click on "I Accept" and select "Save Target As,,," from
+ the menu.</td>
+ </tr>
+ </table>
+ <ol>
+ <li>The Software is comprised of the following software modules:<br>
+ <br>
+ (1) Certain software modules that is the subject of GNU GENERAL PUBLIC
+ LICENSE ("GPL Modules"), and
+ <br>
+ (2) Other software modules ("Non-GPL Modules")
+ <br>
+ <br>
+ You may distinguish each of GPL Modules by downloading source files
+ of the Software as Brother separately makes available and reading such
+ files.<br>
+ </li>
+ <li>Your use of all GPL Modules shall be subject to the terms and conditions
+ of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2").
+ Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You
+ shall use GPL Modules in accordance with the terms and conditions of GPLv2.
+ Your use of GPL Modules shall be deemed
+ as your agreement to the terms and conditions of GPLv2.<br>
+ </li>
+ <li>You have the right to use all Non-GPL Modules only in accordance with
+ the following terms and conditions. Your use of Non-GPL Modules shall be
+ deemed as your agreement to the following terms and conditions:
+ <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no
+ case this Agreement shall be construed to assign or otherwise transfer
+ from Brother to you any copyrights or other intellectual property rights
+ to whole or any part of Non-GPL Modules.</p>
+ <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute
+ (via Internet or in any other manner) Non-GPL Modules. Brother further
+ grants you a non-exclusive license to modify, alter, translate or otherwise
+ prepare derivative works of Non-GPL Modules and to reproduce and/or distribute
+ (via Internet or in any other manner) such modification, alteration,
+ translation or other derivative works of Non-GPL Modules.</p>
+ <p>(3) When you distribute (via Internet or in any other manner) Non-GPL
+ Modules or any modification, alteration, translation or other derivative
+ works thereof under the license granted in accordance with subparagraph
+ 3(2) above, you must expressly grant any and all recipient thereof the
+ license equivalent to this Agreement which applies to Non-GPL Modules.</p>
+ <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS
+ IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY,
+ MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p>
+ <p>(5) To the extent allowed by applicable laws, Brother shall have no
+ liability in contract, tort (including negligence or breach of statutory
+ duty) or otherwise for any interruption of use, loss of data, or for
+ any indirect, incidental, punitive or consequential loss or damage, or
+ for any loss of profit, revenue, data, goodwill or anticipated savings
+ that arises under, out of, or in contemplation of this Agreement or otherwise
+ arises due to any error, inaccuracy or defect in Non-GPL Modules even
+ if Brother has been advised of the possibility of such loss or damage.</p>
+ <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers
+ sole discretion. Brother does not have any obligation to distribute or
+ disclose Non-GPL Modules in source code form. In no case shall this Agreement
+ be deemed as Brothers express or implied agreement to disclose source
+ code of Non-GPL Modules.</p>
+ </li>
+ </ol></td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
new file mode 100644
index 00000000000000..09b116bdcc7cab
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
@@ -0,0 +1,17 @@
+Source: package maintainer
+Upstream: no
+Reason: There's no "lp" user on Void Linux
+
+--- a/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
++++ b/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
+@@ -34,9 +34,8 @@ case "$2" in
+ if [ ! -d $SPOOLER_NAME ]; then
+ mkdir -p $SPOOLER_NAME
+ fi
+- chown lp $SPOOLER_NAME
+ chgrp lp $SPOOLER_NAME
+- chmod 700 $SPOOLER_NAME
++ chmod 770 $SPOOLER_NAME
+
+ if [ "$3" = "USB" ]; then
+ DEVICE_IF=/dev/usb/lp0
diff --git a/srcpkgs/brother-dcp8410-lpr/template b/srcpkgs/brother-dcp8410-lpr/template
new file mode 100644
index 00000000000000..c24f93bbeaf396
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/template
@@ -0,0 +1,45 @@
+# Template file for 'brother-dcp8410-lpr'
+pkgname=brother-dcp8410-lpr
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="ghostscript"
+short_desc="LPR driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:EULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103239/dcpl8410cdwlpr-${version}-0.i386.deb"
+checksum="1e97cd530e7b6162bf436d16e94098e524b438fdecf0a8044c5e07efa9300080"
+repository="nonfree"
+conf_files="/opt/brother/Printers/dcpl8410cdw/inf/brdcpl8410cdwrc"
+nopie=yes
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/lpd 755
+
+ vcopy opt/brother/Printers/dcpl8410cdw/inf opt/brother/Printers/dcpl8410cdw
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/filter_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd
+
+ # Copy the executables based on architecture type
+ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+ _arch="x86_64"
+ elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+ _arch="i686"
+ else
+ _arch="unknown"
+ fi
+ for bin in brdcpl8410cdwfilter brprintconf_dcpl8410cdw; do
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/x86_64/${bin} \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd/
+ done
+
+ vmkdir usr/bin 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ ${DESTDIR}/usr/bin/brprintconf_dcpl8410cdw
+
+ vlicense ${FILESDIR}/agree.html LICENSE.html
+
+ vdoc "${FILESDIR}/README.voidlinux"
+}
From 18794fe9098b769b7008511380a3f961fdeebefd Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:50 +0200
Subject: [PATCH 2/2] New package: brother-dcp8410-cups-1.5.0
---
srcpkgs/brother-dcp8410-cups/INSTALL | 6 +
srcpkgs/brother-dcp8410-cups/REMOVE | 5 +
.../files/README.voidlinux | 29 ++
srcpkgs/brother-dcp8410-cups/files/agree.html | 248 ++++++++++++++++++
.../files/cupswrapperdcpl8410cdw.void | 152 +++++++++++
srcpkgs/brother-dcp8410-cups/template | 37 +++
6 files changed, 477 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-cups/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-cups/REMOVE
create mode 100644 srcpkgs/brother-dcp8410-cups/files/README.voidlinux
create mode 100644 srcpkgs/brother-dcp8410-cups/files/agree.html
create mode 100755 srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
create mode 100644 srcpkgs/brother-dcp8410-cups/template
diff --git a/srcpkgs/brother-dcp8410-cups/INSTALL b/srcpkgs/brother-dcp8410-cups/INSTALL
new file mode 100644
index 00000000000000..3f342471bd0f92
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/INSTALL
@@ -0,0 +1,6 @@
+case "${ACTION}" in
+post)
+ [ -d /var/service/cupsd ] && sv restart cupsd
+ ;;
+esac
+
diff --git a/srcpkgs/brother-dcp8410-cups/REMOVE b/srcpkgs/brother-dcp8410-cups/REMOVE
new file mode 100644
index 00000000000000..1515570c7f7835
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/REMOVE
@@ -0,0 +1,5 @@
+case ${ACTION} in
+post)
+ [ -d /var/service/cupsd ] && sv restart cupsd
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-cups/files/README.voidlinux b/srcpkgs/brother-dcp8410-cups/files/README.voidlinux
new file mode 100644
index 00000000000000..6de3bf2a5af10b
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/README.voidlinux
@@ -0,0 +1,29 @@
+A few tips for managing your printer
+------------------------------------
+
+Check the PPD is in place:
+$ lpinfo -m | grep 8410
+ Brother/brother_dcpl8410cdw_printer_en.ppd Brother DCP-L8410CDW CUPS
+
+Scan the network/usb/etc for the printer:
+$ lpinfo -v
+ ...
+ network lpd://BRWD0123456789A/BINARY_P1
+For network connections, sometimes you have to execute above couple of
+times.
+
+Add the printer:
+# lpadmin -p mybrother \
+ -L "Valhalla" \
+ -D "The Almighty Printer" \
+ -E \
+ -v lpd://BRWD0123456789A/BINARY_P1 \
+ -P /usr/share/cups/model/Brother/brother_dcpl8410cdw_printer_en.ppd
+
+Later, it can be removed with:
+# lpadmin -x mybrother
+
+There's also a "cupswrapperdcpl8410cdw.void" script installed in:
+ /opt/brother/Printers/dcpl8410cdw/cupswrapper/
+But if you follow the previous tips, there's no need running it.
+Nonetheless, pass "-h" to it to list the commands.
diff --git a/srcpkgs/brother-dcp8410-cups/files/agree.html b/srcpkgs/brother-dcp8410-cups/files/agree.html
new file mode 100644
index 00000000000000..577f6b82035fa8
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/agree.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>End-User License Agreement for Brother Software</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all">
+<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script>
+
+<style type="text/css">
+<!--
+body { font-size: 100%}
+.main { font-size: 100%}
+.sm { font-size: 90%}
+-->
+</style>
+</head>
+
+<body>
+
+<!-- begin #header -->
+<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header">
+<tr>
+<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td>
+<td>
+
+<table border="0" cellpadding="0" cellspacing="0" summary="">
+<tr>
+<td id="brotherLogo">
+<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a>
+</td>
+<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+<td id="formArea">
+<!-- SelectCountry -->
+<div id="country">
+<form name="form1" id="form1">
+<select name="select_country" class="countryTxt">
+<option value="http://www.brother.com/index.htm" selected>Global Site</option>
+<option></option>
+<optgroup label="North/ South/ Central America">
+<option value="http://www.brother.com.ar/">Argentina - Español</option>
+<option value="http://www.brother.com.br/">Brasil - Português</option>
+<option value="http://www.brother.ca/en/index.asp">Canada - English</option>
+<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option>
+<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option>
+<option value="http://www.brother.cl/">Chile - Español</option>
+<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option>
+<option value="http://www.brother.com.mx/">México - Español</option>
+<option value="http://www.brother-usa.com/">U.S.A. - English</option>
+<option></option>
+</optgroup>
+<optgroup label="Europe">
+<option value="http://www.brother.eu/">Brother Europe</option>
+<option value="http://www.brother.at/?lang=en">Austria - English</option>
+<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option>
+<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option>
+<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option>
+<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option>
+<option value="http://www.brother.cz/">Česká republika - česky</option>
+<option value="http://www.brother.dk/">Danmark - Dansk</option>
+<option value="http://www.brother.de/">Deutschland - Deutsch</option>
+<option value="http://www.brother.es/">España - Español</option>
+<option value="http://www.brother.fi/">Finland -Suomi</option>
+<option value="http://www.brother.fr/">France - Français</option>
+<option value="http://www.brother.ie/">Ireland - English</option>
+<option value="http://www.brother.it/">Italia - Italiano</option>
+<option value="http://www.brother.hu/">Magyarország - Magyar</option>
+<option value="http://www.brother.nl/">Nederland - Nederlands</option>
+<option value="http://www.brother.no/">Norge - Norsk</option>
+<option value="http://www.brother.pl/">Polska - Polski</option>
+<option value="http://www.brother.pt/">Portugal - Português</option>
+<option value="http://www.brother.ru/">Россия - Pусский</option>
+<option value="http://www.brother.com.ro/">România - Românã</option>
+<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option>
+<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.se/">Sverige - Svenska</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option>
+<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option></option>
+</optgroup>
+<optgroup label="Middle East/ Africa">
+<option value="http://www.brother.ae/">Bahrain - English</option>
+<option value="http://www.brother.ae/">Egypt - English</option>
+<option value="http://www.brother.ae/">Ethiopia - English</option>
+<option value="http://www.brother.ae/">Iran - English</option>
+<option value="http://www.brother.ae/">Iraq - English</option>
+<option value="http://www.brother.ae/">Jordan - English</option>
+<option value="http://www.brother.ae/">Kenya - English</option>
+<option value="http://www.brother.ae/">Kuwait - English</option>
+<option value="http://www.brother.ae/">Lebanon - English</option>
+<option value="http://www.brother.ae/">Libya - English</option>
+<option value="http://www.brother.ae/">Mauritius - English</option>
+<option value="http://www.brother.ae/">Nigeria - English</option>
+<option value="http://www.brother.ae/">Oman - English</option>
+<option value="http://www.brother.ae/">Qatar - English</option>
+<option value="http://www.brother.ae/">Saudi Arabia - English</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.ae/">Syria - English</option>
+<option value="http://www.brother.ae/">Tanzania - English</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.ae/">Uganda - English</option>
+<option value="http://www.brother.ae/">United Arab Emirates - English</option>
+<option value="http://www.brother.ae/">Yemen - English</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option>
+<option></option>
+</optgroup>
+<optgroup label="Asia/ Oceania">
+<option value="http://www.brother.com.au/">Australia - English</option>
+<option value="http://www.brother.ae/">Bangladesh - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+-<option value="http://www.brother-cn.net/">China - Chinese</option>
+<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option>
+<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option>
+<option value="http://www.brother.in/">India - English</option>
+<option value="http://www.brother.com.sg/">Indonesia - English</option>
+<option value="http://www.brother.co.jp/">Japan - Japanese</option>
+<option value="http://www.brother.com.my/">Malaysia - English</option>
+<option value="http://www.brother.ae/">Nepal - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.co.nz/">New Zealand - English</option>
+<option value="http://www.brother.ae/">Pakistan - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.ph/">Philippines - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Singapore - English</option>
+-<option value="http://www.brother.co.th/">Thailand - Thai</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Vietnam - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option>
+</optgroup>
+</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a>
+</form>
+</div>
+<!-- SelectCountry -->
+
+
+<!-- SiteSearch -->
+<div id="search">
+<form name="gs" method="GET" action="http://search2.brother.co.jp/search?">
+<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif">
+<input type="hidden" name="sort" value="date:D:L:d1">
+<input type="hidden" name="output" value="xml_no_dtd">
+<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8">
+<input type="hidden" name="client" value="fe_www_com">
+<input type="hidden" name="proxystylesheet" value="fe_www_com">
+<input type="hidden" name="site" value="col_www_com_cominf_sol">
+ </div>
+ </form>
+</div>
+<!-- SiteSearch -->
+</td>
+</tr>
+</table>
+
+</td>
+<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+</tr>
+
+
+</table>
+<!-- end #header -->
+
+<div style="line-height:1px;"> </div>
+
+<table border="0" cellspacing="0" cellpadding="2" width="600">
+<tr>
+<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td>
+</tr>
+<tr>
+<td><p>This Agreement provides terms and conditions for license grant for use
+ of the software that is distributed with this Agreement ("Software")
+ from Brother Industries, Ltd. ("Brother") to recipients thereof
+ ("You").</p>
+ <table width="100%" height="60" border="1" bordercolor="#000099">
+ <tr>
+ <td bordercolor="#000099"><strong>Note:</strong><br>
+ Please click on "I Accept" while holding down "Shift" or
+ right click on "I Accept" and select "Save Target As,,," from
+ the menu.</td>
+ </tr>
+ </table>
+ <ol>
+ <li>The Software is comprised of the following software modules:<br>
+ <br>
+ (1) Certain software modules that is the subject of GNU GENERAL PUBLIC
+ LICENSE ("GPL Modules"), and
+ <br>
+ (2) Other software modules ("Non-GPL Modules")
+ <br>
+ <br>
+ You may distinguish each of GPL Modules by downloading source files
+ of the Software as Brother separately makes available and reading such
+ files.<br>
+ </li>
+ <li>Your use of all GPL Modules shall be subject to the terms and conditions
+ of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2").
+ Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You
+ shall use GPL Modules in accordance with the terms and conditions of GPLv2.
+ Your use of GPL Modules shall be deemed
+ as your agreement to the terms and conditions of GPLv2.<br>
+ </li>
+ <li>You have the right to use all Non-GPL Modules only in accordance with
+ the following terms and conditions. Your use of Non-GPL Modules shall be
+ deemed as your agreement to the following terms and conditions:
+ <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no
+ case this Agreement shall be construed to assign or otherwise transfer
+ from Brother to you any copyrights or other intellectual property rights
+ to whole or any part of Non-GPL Modules.</p>
+ <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute
+ (via Internet or in any other manner) Non-GPL Modules. Brother further
+ grants you a non-exclusive license to modify, alter, translate or otherwise
+ prepare derivative works of Non-GPL Modules and to reproduce and/or distribute
+ (via Internet or in any other manner) such modification, alteration,
+ translation or other derivative works of Non-GPL Modules.</p>
+ <p>(3) When you distribute (via Internet or in any other manner) Non-GPL
+ Modules or any modification, alteration, translation or other derivative
+ works thereof under the license granted in accordance with subparagraph
+ 3(2) above, you must expressly grant any and all recipient thereof the
+ license equivalent to this Agreement which applies to Non-GPL Modules.</p>
+ <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS
+ IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY,
+ MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p>
+ <p>(5) To the extent allowed by applicable laws, Brother shall have no
+ liability in contract, tort (including negligence or breach of statutory
+ duty) or otherwise for any interruption of use, loss of data, or for
+ any indirect, incidental, punitive or consequential loss or damage, or
+ for any loss of profit, revenue, data, goodwill or anticipated savings
+ that arises under, out of, or in contemplation of this Agreement or otherwise
+ arises due to any error, inaccuracy or defect in Non-GPL Modules even
+ if Brother has been advised of the possibility of such loss or damage.</p>
+ <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers
+ sole discretion. Brother does not have any obligation to distribute or
+ disclose Non-GPL Modules in source code form. In no case shall this Agreement
+ be deemed as Brothers express or implied agreement to disclose source
+ code of Non-GPL Modules.</p>
+ </li>
+ </ol></td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
new file mode 100755
index 00000000000000..5ec8b25520e1ad
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
@@ -0,0 +1,152 @@
+#! /bin/sh
+#
+# Brother Print filter
+# Copyright (C) 2005-2016 Brother. Industries, Ltd.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# This is trimmed down and tailored for brother-dcpl8410cdw-cupswrapper
+# package of Void Linux
+
+printer_model="dcpl8410cdw"
+printer_name="DCPL8410CDW" # uppercase of $printer_model
+device_name="DCP-L8410CDW" # $printer_name with a hyphen after {MFC,DCP,HL}
+inst_path="/opt/brother/Printers/${printer_model}"
+lpdwrapper="$inst_path/cupswrapper/brother_lpdwrapper_${printer_model}"
+ppd_file_name=/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+brotherlpdwrapper=/usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+
+if [ -d "/usr/share/cups/model" ]
+then
+ mkdir -p /usr/share/cups/model/Brother
+fi
+
+# Eliminate
+if [ "$1" = '-e' ]
+then
+ lpadmin -x ${printer_name}
+ rm -f "$ppd_file"
+ rm -f "$brotherlpdwrapper"
+ rm -f "$lpdwrapper"
+ sv restart cupsd
+ exit 0
+fi
+
+# Restart
+if [ "$1" = "-r" ]
+then
+ lpadmin -x ${printer_name}
+ sv restart cupsd
+ exit 0
+fi
+
+if [ "$1" = "help" ] || [ "$1" = "-h" ]
+then
+ echo 'option -h : help'
+ echo ' -i : install'
+ echo ' -e : uninstall'
+ echo ' -r : remove printer'
+ exit 0
+fi
+
+#
+# The rest is "install"
+#
+
+if [ -e "$inst_path/lpd/filter_${printer_model}" ]
+then
+ :
+else
+ echo "ERROR : Brother LPD filter is not installed."
+fi
+rm -f $ppd_file_name
+
+src_ppd="$inst_path/cupswrapper/brother_${printer_model}_printer_en.ppd"
+if [ -e "$src_ppd" ]
+then
+ cp "$src_ppd" $ppd_file_name
+fi
+chmod 644 $ppd_file_name
+
+#
+# check /usr/lib/cups/filter
+#
+if [ -d /usr/lib/cups/filter ]
+then
+ rm -f $brotherlpdwrapper
+ ln -s $lpdwrapper $brotherlpdwrapper
+fi
+
+sv restart cupsd
+
+sleep 2s
+
+uris=$(lpinfo -v)
+
+for uri in $uris
+do
+ URI=$(echo $uri | grep ${device_name} | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+done
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep ${device_name} )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep -i Brother | grep usb )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ URI="usb://dev/usb/lp0"
+fi
+
+echo lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+
+exit 0
diff --git a/srcpkgs/brother-dcp8410-cups/template b/srcpkgs/brother-dcp8410-cups/template
new file mode 100644
index 00000000000000..e3d0026dd07a15
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/template
@@ -0,0 +1,37 @@
+# Template file for 'brother-dcp8410-cups'
+pkgname=brother-dcp8410-cups
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="brother-dcp8410-lpr cups cups-filters"
+short_desc="CUPS wrapper driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:EULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103248/dcpl8410cdwcupswrapper-${version}-0.i386.deb"
+checksum="b9deb04a6b8f7dd800e04cd90dcd3fa6129214bf36d63649b1710915fd8b549a"
+repository="nonfree"
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/cupswrapper 755
+
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall ${FILESDIR}/cupswrapperdcpl8410cdw.void \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+
+ # Copy the PPD file to its rightful place
+ vmkdir usr/share/cups/model/Brother 755
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 usr/share/cups/model/Brother
+
+ # Create a link to lpdwrapper in CUPS filter directory
+ vmkdir usr/lib/cups/filter 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ ${DESTDIR}/usr/lib/cups/filter/brother_lpdwrapper_dcpl8410cdw
+
+ vlicense ${FILESDIR}/agree.html LICENSE.html
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (2 preceding siblings ...)
2024-08-05 7:39 ` shahab-vahedi
@ 2024-08-05 7:53 ` shahab-vahedi
2024-08-05 7:56 ` shahab-vahedi
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-05 7:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
There is an updated pull request by shahab-vahedi against master on the void-packages repository
https://github.com/shahab-vahedi/void-packages brother
https://github.com/void-linux/void-packages/pull/51608
Add Printer Support: Brother DCP-L8410CDW
The LPR drivers and CUPS wrappers from Debian packages provided on [Brother's Support page](https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, `x86_64-glibc`
A patch file from https://github.com/void-linux/void-packages/pull/51608.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-51608.patch --]
[-- Type: text/x-diff, Size: 42182 bytes --]
From 9593cfc8b5d11e115c8f1578c2d511649a67d74c Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:21 +0200
Subject: [PATCH 1/2] New package: brother-dcp8410-lpr-1.5.0
---
srcpkgs/brother-dcp8410-lpr/INSTALL | 4 +
.../files/README.voidlinux | 5 +
srcpkgs/brother-dcp8410-lpr/files/agree.html | 248 ++++++++++++++++++
.../patches/fix-setup-script.patch | 17 ++
srcpkgs/brother-dcp8410-lpr/template | 45 ++++
5 files changed, 319 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-lpr/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
create mode 100644 srcpkgs/brother-dcp8410-lpr/files/agree.html
create mode 100644 srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
create mode 100644 srcpkgs/brother-dcp8410-lpr/template
diff --git a/srcpkgs/brother-dcp8410-lpr/INSTALL b/srcpkgs/brother-dcp8410-lpr/INSTALL
new file mode 100644
index 00000000000000..b3bc10a08d1f8c
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/INSTALL
@@ -0,0 +1,4 @@
+case "${ACTION}" in
+post)
+ mkdir -p var/spool/lpd
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux b/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
new file mode 100644
index 00000000000000..768afa57c17ac6
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
@@ -0,0 +1,5 @@
+If you have attached the device through a USB interface, then run:
+# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -i
+
+Also, before removing the package, you have to execute:
+# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -e
diff --git a/srcpkgs/brother-dcp8410-lpr/files/agree.html b/srcpkgs/brother-dcp8410-lpr/files/agree.html
new file mode 100644
index 00000000000000..577f6b82035fa8
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/files/agree.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>End-User License Agreement for Brother Software</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all">
+<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script>
+
+<style type="text/css">
+<!--
+body { font-size: 100%}
+.main { font-size: 100%}
+.sm { font-size: 90%}
+-->
+</style>
+</head>
+
+<body>
+
+<!-- begin #header -->
+<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header">
+<tr>
+<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td>
+<td>
+
+<table border="0" cellpadding="0" cellspacing="0" summary="">
+<tr>
+<td id="brotherLogo">
+<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a>
+</td>
+<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+<td id="formArea">
+<!-- SelectCountry -->
+<div id="country">
+<form name="form1" id="form1">
+<select name="select_country" class="countryTxt">
+<option value="http://www.brother.com/index.htm" selected>Global Site</option>
+<option></option>
+<optgroup label="North/ South/ Central America">
+<option value="http://www.brother.com.ar/">Argentina - Español</option>
+<option value="http://www.brother.com.br/">Brasil - Português</option>
+<option value="http://www.brother.ca/en/index.asp">Canada - English</option>
+<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option>
+<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option>
+<option value="http://www.brother.cl/">Chile - Español</option>
+<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option>
+<option value="http://www.brother.com.mx/">México - Español</option>
+<option value="http://www.brother-usa.com/">U.S.A. - English</option>
+<option></option>
+</optgroup>
+<optgroup label="Europe">
+<option value="http://www.brother.eu/">Brother Europe</option>
+<option value="http://www.brother.at/?lang=en">Austria - English</option>
+<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option>
+<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option>
+<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option>
+<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option>
+<option value="http://www.brother.cz/">Česká republika - česky</option>
+<option value="http://www.brother.dk/">Danmark - Dansk</option>
+<option value="http://www.brother.de/">Deutschland - Deutsch</option>
+<option value="http://www.brother.es/">España - Español</option>
+<option value="http://www.brother.fi/">Finland -Suomi</option>
+<option value="http://www.brother.fr/">France - Français</option>
+<option value="http://www.brother.ie/">Ireland - English</option>
+<option value="http://www.brother.it/">Italia - Italiano</option>
+<option value="http://www.brother.hu/">Magyarország - Magyar</option>
+<option value="http://www.brother.nl/">Nederland - Nederlands</option>
+<option value="http://www.brother.no/">Norge - Norsk</option>
+<option value="http://www.brother.pl/">Polska - Polski</option>
+<option value="http://www.brother.pt/">Portugal - Português</option>
+<option value="http://www.brother.ru/">Россия - Pусский</option>
+<option value="http://www.brother.com.ro/">România - Românã</option>
+<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option>
+<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.se/">Sverige - Svenska</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option>
+<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option></option>
+</optgroup>
+<optgroup label="Middle East/ Africa">
+<option value="http://www.brother.ae/">Bahrain - English</option>
+<option value="http://www.brother.ae/">Egypt - English</option>
+<option value="http://www.brother.ae/">Ethiopia - English</option>
+<option value="http://www.brother.ae/">Iran - English</option>
+<option value="http://www.brother.ae/">Iraq - English</option>
+<option value="http://www.brother.ae/">Jordan - English</option>
+<option value="http://www.brother.ae/">Kenya - English</option>
+<option value="http://www.brother.ae/">Kuwait - English</option>
+<option value="http://www.brother.ae/">Lebanon - English</option>
+<option value="http://www.brother.ae/">Libya - English</option>
+<option value="http://www.brother.ae/">Mauritius - English</option>
+<option value="http://www.brother.ae/">Nigeria - English</option>
+<option value="http://www.brother.ae/">Oman - English</option>
+<option value="http://www.brother.ae/">Qatar - English</option>
+<option value="http://www.brother.ae/">Saudi Arabia - English</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.ae/">Syria - English</option>
+<option value="http://www.brother.ae/">Tanzania - English</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.ae/">Uganda - English</option>
+<option value="http://www.brother.ae/">United Arab Emirates - English</option>
+<option value="http://www.brother.ae/">Yemen - English</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option>
+<option></option>
+</optgroup>
+<optgroup label="Asia/ Oceania">
+<option value="http://www.brother.com.au/">Australia - English</option>
+<option value="http://www.brother.ae/">Bangladesh - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+-<option value="http://www.brother-cn.net/">China - Chinese</option>
+<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option>
+<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option>
+<option value="http://www.brother.in/">India - English</option>
+<option value="http://www.brother.com.sg/">Indonesia - English</option>
+<option value="http://www.brother.co.jp/">Japan - Japanese</option>
+<option value="http://www.brother.com.my/">Malaysia - English</option>
+<option value="http://www.brother.ae/">Nepal - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.co.nz/">New Zealand - English</option>
+<option value="http://www.brother.ae/">Pakistan - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.ph/">Philippines - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Singapore - English</option>
+-<option value="http://www.brother.co.th/">Thailand - Thai</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Vietnam - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option>
+</optgroup>
+</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a>
+</form>
+</div>
+<!-- SelectCountry -->
+
+
+<!-- SiteSearch -->
+<div id="search">
+<form name="gs" method="GET" action="http://search2.brother.co.jp/search?">
+<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif">
+<input type="hidden" name="sort" value="date:D:L:d1">
+<input type="hidden" name="output" value="xml_no_dtd">
+<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8">
+<input type="hidden" name="client" value="fe_www_com">
+<input type="hidden" name="proxystylesheet" value="fe_www_com">
+<input type="hidden" name="site" value="col_www_com_cominf_sol">
+ </div>
+ </form>
+</div>
+<!-- SiteSearch -->
+</td>
+</tr>
+</table>
+
+</td>
+<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+</tr>
+
+
+</table>
+<!-- end #header -->
+
+<div style="line-height:1px;"> </div>
+
+<table border="0" cellspacing="0" cellpadding="2" width="600">
+<tr>
+<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td>
+</tr>
+<tr>
+<td><p>This Agreement provides terms and conditions for license grant for use
+ of the software that is distributed with this Agreement ("Software")
+ from Brother Industries, Ltd. ("Brother") to recipients thereof
+ ("You").</p>
+ <table width="100%" height="60" border="1" bordercolor="#000099">
+ <tr>
+ <td bordercolor="#000099"><strong>Note:</strong><br>
+ Please click on "I Accept" while holding down "Shift" or
+ right click on "I Accept" and select "Save Target As,,," from
+ the menu.</td>
+ </tr>
+ </table>
+ <ol>
+ <li>The Software is comprised of the following software modules:<br>
+ <br>
+ (1) Certain software modules that is the subject of GNU GENERAL PUBLIC
+ LICENSE ("GPL Modules"), and
+ <br>
+ (2) Other software modules ("Non-GPL Modules")
+ <br>
+ <br>
+ You may distinguish each of GPL Modules by downloading source files
+ of the Software as Brother separately makes available and reading such
+ files.<br>
+ </li>
+ <li>Your use of all GPL Modules shall be subject to the terms and conditions
+ of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2").
+ Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You
+ shall use GPL Modules in accordance with the terms and conditions of GPLv2.
+ Your use of GPL Modules shall be deemed
+ as your agreement to the terms and conditions of GPLv2.<br>
+ </li>
+ <li>You have the right to use all Non-GPL Modules only in accordance with
+ the following terms and conditions. Your use of Non-GPL Modules shall be
+ deemed as your agreement to the following terms and conditions:
+ <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no
+ case this Agreement shall be construed to assign or otherwise transfer
+ from Brother to you any copyrights or other intellectual property rights
+ to whole or any part of Non-GPL Modules.</p>
+ <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute
+ (via Internet or in any other manner) Non-GPL Modules. Brother further
+ grants you a non-exclusive license to modify, alter, translate or otherwise
+ prepare derivative works of Non-GPL Modules and to reproduce and/or distribute
+ (via Internet or in any other manner) such modification, alteration,
+ translation or other derivative works of Non-GPL Modules.</p>
+ <p>(3) When you distribute (via Internet or in any other manner) Non-GPL
+ Modules or any modification, alteration, translation or other derivative
+ works thereof under the license granted in accordance with subparagraph
+ 3(2) above, you must expressly grant any and all recipient thereof the
+ license equivalent to this Agreement which applies to Non-GPL Modules.</p>
+ <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS
+ IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY,
+ MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p>
+ <p>(5) To the extent allowed by applicable laws, Brother shall have no
+ liability in contract, tort (including negligence or breach of statutory
+ duty) or otherwise for any interruption of use, loss of data, or for
+ any indirect, incidental, punitive or consequential loss or damage, or
+ for any loss of profit, revenue, data, goodwill or anticipated savings
+ that arises under, out of, or in contemplation of this Agreement or otherwise
+ arises due to any error, inaccuracy or defect in Non-GPL Modules even
+ if Brother has been advised of the possibility of such loss or damage.</p>
+ <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers
+ sole discretion. Brother does not have any obligation to distribute or
+ disclose Non-GPL Modules in source code form. In no case shall this Agreement
+ be deemed as Brothers express or implied agreement to disclose source
+ code of Non-GPL Modules.</p>
+ </li>
+ </ol></td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
new file mode 100644
index 00000000000000..09b116bdcc7cab
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
@@ -0,0 +1,17 @@
+Source: package maintainer
+Upstream: no
+Reason: There's no "lp" user on Void Linux
+
+--- a/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
++++ b/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
+@@ -34,9 +34,8 @@ case "$2" in
+ if [ ! -d $SPOOLER_NAME ]; then
+ mkdir -p $SPOOLER_NAME
+ fi
+- chown lp $SPOOLER_NAME
+ chgrp lp $SPOOLER_NAME
+- chmod 700 $SPOOLER_NAME
++ chmod 770 $SPOOLER_NAME
+
+ if [ "$3" = "USB" ]; then
+ DEVICE_IF=/dev/usb/lp0
diff --git a/srcpkgs/brother-dcp8410-lpr/template b/srcpkgs/brother-dcp8410-lpr/template
new file mode 100644
index 00000000000000..b27e571f69af13
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/template
@@ -0,0 +1,45 @@
+# Template file for 'brother-dcp8410-lpr'
+pkgname=brother-dcp8410-lpr
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="ghostscript"
+short_desc="LPR driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:EULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103239/dcpl8410cdwlpr-${version}-0.i386.deb"
+checksum="1e97cd530e7b6162bf436d16e94098e524b438fdecf0a8044c5e07efa9300080"
+repository="nonfree"
+conf_files="/opt/brother/Printers/dcpl8410cdw/inf/brdcpl8410cdwrc"
+nopie=yes
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/lpd 755
+
+ vcopy opt/brother/Printers/dcpl8410cdw/inf opt/brother/Printers/dcpl8410cdw
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/filter_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd
+
+ # Copy the executables based on architecture type
+ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+ _arch="x86_64"
+ elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+ _arch="i686"
+ else
+ _arch="unknown"
+ fi
+ for bin in brdcpl8410cdwfilter brprintconf_dcpl8410cdw; do
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/${_arch}/${bin} \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd/
+ done
+
+ vmkdir usr/bin 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ ${DESTDIR}/usr/bin/brprintconf_dcpl8410cdw
+
+ vlicense ${FILESDIR}/agree.html LICENSE.html
+
+ vdoc "${FILESDIR}/README.voidlinux"
+}
From 50512ddb304b8fa1d5f026496fca2b62da4d0fcf Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:50 +0200
Subject: [PATCH 2/2] New package: brother-dcp8410-cups-1.5.0
---
srcpkgs/brother-dcp8410-cups/INSTALL | 6 +
srcpkgs/brother-dcp8410-cups/REMOVE | 5 +
.../files/README.voidlinux | 29 ++
srcpkgs/brother-dcp8410-cups/files/agree.html | 248 ++++++++++++++++++
.../files/cupswrapperdcpl8410cdw.void | 152 +++++++++++
srcpkgs/brother-dcp8410-cups/template | 37 +++
6 files changed, 477 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-cups/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-cups/REMOVE
create mode 100644 srcpkgs/brother-dcp8410-cups/files/README.voidlinux
create mode 100644 srcpkgs/brother-dcp8410-cups/files/agree.html
create mode 100755 srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
create mode 100644 srcpkgs/brother-dcp8410-cups/template
diff --git a/srcpkgs/brother-dcp8410-cups/INSTALL b/srcpkgs/brother-dcp8410-cups/INSTALL
new file mode 100644
index 00000000000000..3f342471bd0f92
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/INSTALL
@@ -0,0 +1,6 @@
+case "${ACTION}" in
+post)
+ [ -d /var/service/cupsd ] && sv restart cupsd
+ ;;
+esac
+
diff --git a/srcpkgs/brother-dcp8410-cups/REMOVE b/srcpkgs/brother-dcp8410-cups/REMOVE
new file mode 100644
index 00000000000000..1515570c7f7835
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/REMOVE
@@ -0,0 +1,5 @@
+case ${ACTION} in
+post)
+ [ -d /var/service/cupsd ] && sv restart cupsd
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-cups/files/README.voidlinux b/srcpkgs/brother-dcp8410-cups/files/README.voidlinux
new file mode 100644
index 00000000000000..6de3bf2a5af10b
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/README.voidlinux
@@ -0,0 +1,29 @@
+A few tips for managing your printer
+------------------------------------
+
+Check the PPD is in place:
+$ lpinfo -m | grep 8410
+ Brother/brother_dcpl8410cdw_printer_en.ppd Brother DCP-L8410CDW CUPS
+
+Scan the network/usb/etc for the printer:
+$ lpinfo -v
+ ...
+ network lpd://BRWD0123456789A/BINARY_P1
+For network connections, sometimes you have to execute above couple of
+times.
+
+Add the printer:
+# lpadmin -p mybrother \
+ -L "Valhalla" \
+ -D "The Almighty Printer" \
+ -E \
+ -v lpd://BRWD0123456789A/BINARY_P1 \
+ -P /usr/share/cups/model/Brother/brother_dcpl8410cdw_printer_en.ppd
+
+Later, it can be removed with:
+# lpadmin -x mybrother
+
+There's also a "cupswrapperdcpl8410cdw.void" script installed in:
+ /opt/brother/Printers/dcpl8410cdw/cupswrapper/
+But if you follow the previous tips, there's no need running it.
+Nonetheless, pass "-h" to it to list the commands.
diff --git a/srcpkgs/brother-dcp8410-cups/files/agree.html b/srcpkgs/brother-dcp8410-cups/files/agree.html
new file mode 100644
index 00000000000000..577f6b82035fa8
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/agree.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>End-User License Agreement for Brother Software</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all">
+<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script>
+
+<style type="text/css">
+<!--
+body { font-size: 100%}
+.main { font-size: 100%}
+.sm { font-size: 90%}
+-->
+</style>
+</head>
+
+<body>
+
+<!-- begin #header -->
+<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header">
+<tr>
+<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td>
+<td>
+
+<table border="0" cellpadding="0" cellspacing="0" summary="">
+<tr>
+<td id="brotherLogo">
+<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a>
+</td>
+<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+<td id="formArea">
+<!-- SelectCountry -->
+<div id="country">
+<form name="form1" id="form1">
+<select name="select_country" class="countryTxt">
+<option value="http://www.brother.com/index.htm" selected>Global Site</option>
+<option></option>
+<optgroup label="North/ South/ Central America">
+<option value="http://www.brother.com.ar/">Argentina - Español</option>
+<option value="http://www.brother.com.br/">Brasil - Português</option>
+<option value="http://www.brother.ca/en/index.asp">Canada - English</option>
+<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option>
+<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option>
+<option value="http://www.brother.cl/">Chile - Español</option>
+<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option>
+<option value="http://www.brother.com.mx/">México - Español</option>
+<option value="http://www.brother-usa.com/">U.S.A. - English</option>
+<option></option>
+</optgroup>
+<optgroup label="Europe">
+<option value="http://www.brother.eu/">Brother Europe</option>
+<option value="http://www.brother.at/?lang=en">Austria - English</option>
+<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option>
+<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option>
+<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option>
+<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option>
+<option value="http://www.brother.cz/">Česká republika - česky</option>
+<option value="http://www.brother.dk/">Danmark - Dansk</option>
+<option value="http://www.brother.de/">Deutschland - Deutsch</option>
+<option value="http://www.brother.es/">España - Español</option>
+<option value="http://www.brother.fi/">Finland -Suomi</option>
+<option value="http://www.brother.fr/">France - Français</option>
+<option value="http://www.brother.ie/">Ireland - English</option>
+<option value="http://www.brother.it/">Italia - Italiano</option>
+<option value="http://www.brother.hu/">Magyarország - Magyar</option>
+<option value="http://www.brother.nl/">Nederland - Nederlands</option>
+<option value="http://www.brother.no/">Norge - Norsk</option>
+<option value="http://www.brother.pl/">Polska - Polski</option>
+<option value="http://www.brother.pt/">Portugal - Português</option>
+<option value="http://www.brother.ru/">Россия - Pусский</option>
+<option value="http://www.brother.com.ro/">România - Românã</option>
+<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option>
+<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.se/">Sverige - Svenska</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option>
+<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option></option>
+</optgroup>
+<optgroup label="Middle East/ Africa">
+<option value="http://www.brother.ae/">Bahrain - English</option>
+<option value="http://www.brother.ae/">Egypt - English</option>
+<option value="http://www.brother.ae/">Ethiopia - English</option>
+<option value="http://www.brother.ae/">Iran - English</option>
+<option value="http://www.brother.ae/">Iraq - English</option>
+<option value="http://www.brother.ae/">Jordan - English</option>
+<option value="http://www.brother.ae/">Kenya - English</option>
+<option value="http://www.brother.ae/">Kuwait - English</option>
+<option value="http://www.brother.ae/">Lebanon - English</option>
+<option value="http://www.brother.ae/">Libya - English</option>
+<option value="http://www.brother.ae/">Mauritius - English</option>
+<option value="http://www.brother.ae/">Nigeria - English</option>
+<option value="http://www.brother.ae/">Oman - English</option>
+<option value="http://www.brother.ae/">Qatar - English</option>
+<option value="http://www.brother.ae/">Saudi Arabia - English</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.ae/">Syria - English</option>
+<option value="http://www.brother.ae/">Tanzania - English</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.ae/">Uganda - English</option>
+<option value="http://www.brother.ae/">United Arab Emirates - English</option>
+<option value="http://www.brother.ae/">Yemen - English</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option>
+<option></option>
+</optgroup>
+<optgroup label="Asia/ Oceania">
+<option value="http://www.brother.com.au/">Australia - English</option>
+<option value="http://www.brother.ae/">Bangladesh - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+-<option value="http://www.brother-cn.net/">China - Chinese</option>
+<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option>
+<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option>
+<option value="http://www.brother.in/">India - English</option>
+<option value="http://www.brother.com.sg/">Indonesia - English</option>
+<option value="http://www.brother.co.jp/">Japan - Japanese</option>
+<option value="http://www.brother.com.my/">Malaysia - English</option>
+<option value="http://www.brother.ae/">Nepal - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.co.nz/">New Zealand - English</option>
+<option value="http://www.brother.ae/">Pakistan - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.ph/">Philippines - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Singapore - English</option>
+-<option value="http://www.brother.co.th/">Thailand - Thai</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Vietnam - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option>
+</optgroup>
+</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a>
+</form>
+</div>
+<!-- SelectCountry -->
+
+
+<!-- SiteSearch -->
+<div id="search">
+<form name="gs" method="GET" action="http://search2.brother.co.jp/search?">
+<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif">
+<input type="hidden" name="sort" value="date:D:L:d1">
+<input type="hidden" name="output" value="xml_no_dtd">
+<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8">
+<input type="hidden" name="client" value="fe_www_com">
+<input type="hidden" name="proxystylesheet" value="fe_www_com">
+<input type="hidden" name="site" value="col_www_com_cominf_sol">
+ </div>
+ </form>
+</div>
+<!-- SiteSearch -->
+</td>
+</tr>
+</table>
+
+</td>
+<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+</tr>
+
+
+</table>
+<!-- end #header -->
+
+<div style="line-height:1px;"> </div>
+
+<table border="0" cellspacing="0" cellpadding="2" width="600">
+<tr>
+<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td>
+</tr>
+<tr>
+<td><p>This Agreement provides terms and conditions for license grant for use
+ of the software that is distributed with this Agreement ("Software")
+ from Brother Industries, Ltd. ("Brother") to recipients thereof
+ ("You").</p>
+ <table width="100%" height="60" border="1" bordercolor="#000099">
+ <tr>
+ <td bordercolor="#000099"><strong>Note:</strong><br>
+ Please click on "I Accept" while holding down "Shift" or
+ right click on "I Accept" and select "Save Target As,,," from
+ the menu.</td>
+ </tr>
+ </table>
+ <ol>
+ <li>The Software is comprised of the following software modules:<br>
+ <br>
+ (1) Certain software modules that is the subject of GNU GENERAL PUBLIC
+ LICENSE ("GPL Modules"), and
+ <br>
+ (2) Other software modules ("Non-GPL Modules")
+ <br>
+ <br>
+ You may distinguish each of GPL Modules by downloading source files
+ of the Software as Brother separately makes available and reading such
+ files.<br>
+ </li>
+ <li>Your use of all GPL Modules shall be subject to the terms and conditions
+ of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2").
+ Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You
+ shall use GPL Modules in accordance with the terms and conditions of GPLv2.
+ Your use of GPL Modules shall be deemed
+ as your agreement to the terms and conditions of GPLv2.<br>
+ </li>
+ <li>You have the right to use all Non-GPL Modules only in accordance with
+ the following terms and conditions. Your use of Non-GPL Modules shall be
+ deemed as your agreement to the following terms and conditions:
+ <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no
+ case this Agreement shall be construed to assign or otherwise transfer
+ from Brother to you any copyrights or other intellectual property rights
+ to whole or any part of Non-GPL Modules.</p>
+ <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute
+ (via Internet or in any other manner) Non-GPL Modules. Brother further
+ grants you a non-exclusive license to modify, alter, translate or otherwise
+ prepare derivative works of Non-GPL Modules and to reproduce and/or distribute
+ (via Internet or in any other manner) such modification, alteration,
+ translation or other derivative works of Non-GPL Modules.</p>
+ <p>(3) When you distribute (via Internet or in any other manner) Non-GPL
+ Modules or any modification, alteration, translation or other derivative
+ works thereof under the license granted in accordance with subparagraph
+ 3(2) above, you must expressly grant any and all recipient thereof the
+ license equivalent to this Agreement which applies to Non-GPL Modules.</p>
+ <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS
+ IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY,
+ MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p>
+ <p>(5) To the extent allowed by applicable laws, Brother shall have no
+ liability in contract, tort (including negligence or breach of statutory
+ duty) or otherwise for any interruption of use, loss of data, or for
+ any indirect, incidental, punitive or consequential loss or damage, or
+ for any loss of profit, revenue, data, goodwill or anticipated savings
+ that arises under, out of, or in contemplation of this Agreement or otherwise
+ arises due to any error, inaccuracy or defect in Non-GPL Modules even
+ if Brother has been advised of the possibility of such loss or damage.</p>
+ <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers
+ sole discretion. Brother does not have any obligation to distribute or
+ disclose Non-GPL Modules in source code form. In no case shall this Agreement
+ be deemed as Brothers express or implied agreement to disclose source
+ code of Non-GPL Modules.</p>
+ </li>
+ </ol></td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
new file mode 100755
index 00000000000000..5ec8b25520e1ad
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
@@ -0,0 +1,152 @@
+#! /bin/sh
+#
+# Brother Print filter
+# Copyright (C) 2005-2016 Brother. Industries, Ltd.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# This is trimmed down and tailored for brother-dcpl8410cdw-cupswrapper
+# package of Void Linux
+
+printer_model="dcpl8410cdw"
+printer_name="DCPL8410CDW" # uppercase of $printer_model
+device_name="DCP-L8410CDW" # $printer_name with a hyphen after {MFC,DCP,HL}
+inst_path="/opt/brother/Printers/${printer_model}"
+lpdwrapper="$inst_path/cupswrapper/brother_lpdwrapper_${printer_model}"
+ppd_file_name=/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+brotherlpdwrapper=/usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+
+if [ -d "/usr/share/cups/model" ]
+then
+ mkdir -p /usr/share/cups/model/Brother
+fi
+
+# Eliminate
+if [ "$1" = '-e' ]
+then
+ lpadmin -x ${printer_name}
+ rm -f "$ppd_file"
+ rm -f "$brotherlpdwrapper"
+ rm -f "$lpdwrapper"
+ sv restart cupsd
+ exit 0
+fi
+
+# Restart
+if [ "$1" = "-r" ]
+then
+ lpadmin -x ${printer_name}
+ sv restart cupsd
+ exit 0
+fi
+
+if [ "$1" = "help" ] || [ "$1" = "-h" ]
+then
+ echo 'option -h : help'
+ echo ' -i : install'
+ echo ' -e : uninstall'
+ echo ' -r : remove printer'
+ exit 0
+fi
+
+#
+# The rest is "install"
+#
+
+if [ -e "$inst_path/lpd/filter_${printer_model}" ]
+then
+ :
+else
+ echo "ERROR : Brother LPD filter is not installed."
+fi
+rm -f $ppd_file_name
+
+src_ppd="$inst_path/cupswrapper/brother_${printer_model}_printer_en.ppd"
+if [ -e "$src_ppd" ]
+then
+ cp "$src_ppd" $ppd_file_name
+fi
+chmod 644 $ppd_file_name
+
+#
+# check /usr/lib/cups/filter
+#
+if [ -d /usr/lib/cups/filter ]
+then
+ rm -f $brotherlpdwrapper
+ ln -s $lpdwrapper $brotherlpdwrapper
+fi
+
+sv restart cupsd
+
+sleep 2s
+
+uris=$(lpinfo -v)
+
+for uri in $uris
+do
+ URI=$(echo $uri | grep ${device_name} | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+done
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep ${device_name} )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep -i Brother | grep usb )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ URI="usb://dev/usb/lp0"
+fi
+
+echo lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+
+exit 0
diff --git a/srcpkgs/brother-dcp8410-cups/template b/srcpkgs/brother-dcp8410-cups/template
new file mode 100644
index 00000000000000..e3d0026dd07a15
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/template
@@ -0,0 +1,37 @@
+# Template file for 'brother-dcp8410-cups'
+pkgname=brother-dcp8410-cups
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="brother-dcp8410-lpr cups cups-filters"
+short_desc="CUPS wrapper driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:EULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103248/dcpl8410cdwcupswrapper-${version}-0.i386.deb"
+checksum="b9deb04a6b8f7dd800e04cd90dcd3fa6129214bf36d63649b1710915fd8b549a"
+repository="nonfree"
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/cupswrapper 755
+
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall ${FILESDIR}/cupswrapperdcpl8410cdw.void \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+
+ # Copy the PPD file to its rightful place
+ vmkdir usr/share/cups/model/Brother 755
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 usr/share/cups/model/Brother
+
+ # Create a link to lpdwrapper in CUPS filter directory
+ vmkdir usr/lib/cups/filter 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ ${DESTDIR}/usr/lib/cups/filter/brother_lpdwrapper_dcpl8410cdw
+
+ vlicense ${FILESDIR}/agree.html LICENSE.html
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (3 preceding siblings ...)
2024-08-05 7:53 ` shahab-vahedi
@ 2024-08-05 7:56 ` shahab-vahedi
2024-08-10 19:57 ` shahab-vahedi
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-05 7:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
There is an updated pull request by shahab-vahedi against master on the void-packages repository
https://github.com/shahab-vahedi/void-packages brother
https://github.com/void-linux/void-packages/pull/51608
Add Printer Support: Brother DCP-L8410CDW
The LPR drivers and CUPS wrappers from Debian packages provided on [Brother's Support page](https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, `x86_64-glibc`
A patch file from https://github.com/void-linux/void-packages/pull/51608.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-51608.patch --]
[-- Type: text/x-diff, Size: 42222 bytes --]
From 9593cfc8b5d11e115c8f1578c2d511649a67d74c Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:21 +0200
Subject: [PATCH 1/2] New package: brother-dcp8410-lpr-1.5.0
---
srcpkgs/brother-dcp8410-lpr/INSTALL | 4 +
.../files/README.voidlinux | 5 +
srcpkgs/brother-dcp8410-lpr/files/agree.html | 248 ++++++++++++++++++
.../patches/fix-setup-script.patch | 17 ++
srcpkgs/brother-dcp8410-lpr/template | 45 ++++
5 files changed, 319 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-lpr/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
create mode 100644 srcpkgs/brother-dcp8410-lpr/files/agree.html
create mode 100644 srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
create mode 100644 srcpkgs/brother-dcp8410-lpr/template
diff --git a/srcpkgs/brother-dcp8410-lpr/INSTALL b/srcpkgs/brother-dcp8410-lpr/INSTALL
new file mode 100644
index 00000000000000..b3bc10a08d1f8c
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/INSTALL
@@ -0,0 +1,4 @@
+case "${ACTION}" in
+post)
+ mkdir -p var/spool/lpd
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux b/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
new file mode 100644
index 00000000000000..768afa57c17ac6
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/files/README.voidlinux
@@ -0,0 +1,5 @@
+If you have attached the device through a USB interface, then run:
+# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -i
+
+Also, before removing the package, you have to execute:
+# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -e
diff --git a/srcpkgs/brother-dcp8410-lpr/files/agree.html b/srcpkgs/brother-dcp8410-lpr/files/agree.html
new file mode 100644
index 00000000000000..577f6b82035fa8
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/files/agree.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>End-User License Agreement for Brother Software</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all">
+<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script>
+
+<style type="text/css">
+<!--
+body { font-size: 100%}
+.main { font-size: 100%}
+.sm { font-size: 90%}
+-->
+</style>
+</head>
+
+<body>
+
+<!-- begin #header -->
+<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header">
+<tr>
+<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td>
+<td>
+
+<table border="0" cellpadding="0" cellspacing="0" summary="">
+<tr>
+<td id="brotherLogo">
+<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a>
+</td>
+<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+<td id="formArea">
+<!-- SelectCountry -->
+<div id="country">
+<form name="form1" id="form1">
+<select name="select_country" class="countryTxt">
+<option value="http://www.brother.com/index.htm" selected>Global Site</option>
+<option></option>
+<optgroup label="North/ South/ Central America">
+<option value="http://www.brother.com.ar/">Argentina - Español</option>
+<option value="http://www.brother.com.br/">Brasil - Português</option>
+<option value="http://www.brother.ca/en/index.asp">Canada - English</option>
+<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option>
+<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option>
+<option value="http://www.brother.cl/">Chile - Español</option>
+<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option>
+<option value="http://www.brother.com.mx/">México - Español</option>
+<option value="http://www.brother-usa.com/">U.S.A. - English</option>
+<option></option>
+</optgroup>
+<optgroup label="Europe">
+<option value="http://www.brother.eu/">Brother Europe</option>
+<option value="http://www.brother.at/?lang=en">Austria - English</option>
+<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option>
+<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option>
+<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option>
+<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option>
+<option value="http://www.brother.cz/">Česká republika - česky</option>
+<option value="http://www.brother.dk/">Danmark - Dansk</option>
+<option value="http://www.brother.de/">Deutschland - Deutsch</option>
+<option value="http://www.brother.es/">España - Español</option>
+<option value="http://www.brother.fi/">Finland -Suomi</option>
+<option value="http://www.brother.fr/">France - Français</option>
+<option value="http://www.brother.ie/">Ireland - English</option>
+<option value="http://www.brother.it/">Italia - Italiano</option>
+<option value="http://www.brother.hu/">Magyarország - Magyar</option>
+<option value="http://www.brother.nl/">Nederland - Nederlands</option>
+<option value="http://www.brother.no/">Norge - Norsk</option>
+<option value="http://www.brother.pl/">Polska - Polski</option>
+<option value="http://www.brother.pt/">Portugal - Português</option>
+<option value="http://www.brother.ru/">Россия - Pусский</option>
+<option value="http://www.brother.com.ro/">România - Românã</option>
+<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option>
+<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.se/">Sverige - Svenska</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option>
+<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option></option>
+</optgroup>
+<optgroup label="Middle East/ Africa">
+<option value="http://www.brother.ae/">Bahrain - English</option>
+<option value="http://www.brother.ae/">Egypt - English</option>
+<option value="http://www.brother.ae/">Ethiopia - English</option>
+<option value="http://www.brother.ae/">Iran - English</option>
+<option value="http://www.brother.ae/">Iraq - English</option>
+<option value="http://www.brother.ae/">Jordan - English</option>
+<option value="http://www.brother.ae/">Kenya - English</option>
+<option value="http://www.brother.ae/">Kuwait - English</option>
+<option value="http://www.brother.ae/">Lebanon - English</option>
+<option value="http://www.brother.ae/">Libya - English</option>
+<option value="http://www.brother.ae/">Mauritius - English</option>
+<option value="http://www.brother.ae/">Nigeria - English</option>
+<option value="http://www.brother.ae/">Oman - English</option>
+<option value="http://www.brother.ae/">Qatar - English</option>
+<option value="http://www.brother.ae/">Saudi Arabia - English</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.ae/">Syria - English</option>
+<option value="http://www.brother.ae/">Tanzania - English</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.ae/">Uganda - English</option>
+<option value="http://www.brother.ae/">United Arab Emirates - English</option>
+<option value="http://www.brother.ae/">Yemen - English</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option>
+<option></option>
+</optgroup>
+<optgroup label="Asia/ Oceania">
+<option value="http://www.brother.com.au/">Australia - English</option>
+<option value="http://www.brother.ae/">Bangladesh - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+-<option value="http://www.brother-cn.net/">China - Chinese</option>
+<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option>
+<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option>
+<option value="http://www.brother.in/">India - English</option>
+<option value="http://www.brother.com.sg/">Indonesia - English</option>
+<option value="http://www.brother.co.jp/">Japan - Japanese</option>
+<option value="http://www.brother.com.my/">Malaysia - English</option>
+<option value="http://www.brother.ae/">Nepal - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.co.nz/">New Zealand - English</option>
+<option value="http://www.brother.ae/">Pakistan - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.ph/">Philippines - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Singapore - English</option>
+-<option value="http://www.brother.co.th/">Thailand - Thai</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Vietnam - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option>
+</optgroup>
+</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a>
+</form>
+</div>
+<!-- SelectCountry -->
+
+
+<!-- SiteSearch -->
+<div id="search">
+<form name="gs" method="GET" action="http://search2.brother.co.jp/search?">
+<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif">
+<input type="hidden" name="sort" value="date:D:L:d1">
+<input type="hidden" name="output" value="xml_no_dtd">
+<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8">
+<input type="hidden" name="client" value="fe_www_com">
+<input type="hidden" name="proxystylesheet" value="fe_www_com">
+<input type="hidden" name="site" value="col_www_com_cominf_sol">
+ </div>
+ </form>
+</div>
+<!-- SiteSearch -->
+</td>
+</tr>
+</table>
+
+</td>
+<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+</tr>
+
+
+</table>
+<!-- end #header -->
+
+<div style="line-height:1px;"> </div>
+
+<table border="0" cellspacing="0" cellpadding="2" width="600">
+<tr>
+<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td>
+</tr>
+<tr>
+<td><p>This Agreement provides terms and conditions for license grant for use
+ of the software that is distributed with this Agreement ("Software")
+ from Brother Industries, Ltd. ("Brother") to recipients thereof
+ ("You").</p>
+ <table width="100%" height="60" border="1" bordercolor="#000099">
+ <tr>
+ <td bordercolor="#000099"><strong>Note:</strong><br>
+ Please click on "I Accept" while holding down "Shift" or
+ right click on "I Accept" and select "Save Target As,,," from
+ the menu.</td>
+ </tr>
+ </table>
+ <ol>
+ <li>The Software is comprised of the following software modules:<br>
+ <br>
+ (1) Certain software modules that is the subject of GNU GENERAL PUBLIC
+ LICENSE ("GPL Modules"), and
+ <br>
+ (2) Other software modules ("Non-GPL Modules")
+ <br>
+ <br>
+ You may distinguish each of GPL Modules by downloading source files
+ of the Software as Brother separately makes available and reading such
+ files.<br>
+ </li>
+ <li>Your use of all GPL Modules shall be subject to the terms and conditions
+ of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2").
+ Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You
+ shall use GPL Modules in accordance with the terms and conditions of GPLv2.
+ Your use of GPL Modules shall be deemed
+ as your agreement to the terms and conditions of GPLv2.<br>
+ </li>
+ <li>You have the right to use all Non-GPL Modules only in accordance with
+ the following terms and conditions. Your use of Non-GPL Modules shall be
+ deemed as your agreement to the following terms and conditions:
+ <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no
+ case this Agreement shall be construed to assign or otherwise transfer
+ from Brother to you any copyrights or other intellectual property rights
+ to whole or any part of Non-GPL Modules.</p>
+ <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute
+ (via Internet or in any other manner) Non-GPL Modules. Brother further
+ grants you a non-exclusive license to modify, alter, translate or otherwise
+ prepare derivative works of Non-GPL Modules and to reproduce and/or distribute
+ (via Internet or in any other manner) such modification, alteration,
+ translation or other derivative works of Non-GPL Modules.</p>
+ <p>(3) When you distribute (via Internet or in any other manner) Non-GPL
+ Modules or any modification, alteration, translation or other derivative
+ works thereof under the license granted in accordance with subparagraph
+ 3(2) above, you must expressly grant any and all recipient thereof the
+ license equivalent to this Agreement which applies to Non-GPL Modules.</p>
+ <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS
+ IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY,
+ MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p>
+ <p>(5) To the extent allowed by applicable laws, Brother shall have no
+ liability in contract, tort (including negligence or breach of statutory
+ duty) or otherwise for any interruption of use, loss of data, or for
+ any indirect, incidental, punitive or consequential loss or damage, or
+ for any loss of profit, revenue, data, goodwill or anticipated savings
+ that arises under, out of, or in contemplation of this Agreement or otherwise
+ arises due to any error, inaccuracy or defect in Non-GPL Modules even
+ if Brother has been advised of the possibility of such loss or damage.</p>
+ <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers
+ sole discretion. Brother does not have any obligation to distribute or
+ disclose Non-GPL Modules in source code form. In no case shall this Agreement
+ be deemed as Brothers express or implied agreement to disclose source
+ code of Non-GPL Modules.</p>
+ </li>
+ </ol></td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
new file mode 100644
index 00000000000000..09b116bdcc7cab
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
@@ -0,0 +1,17 @@
+Source: package maintainer
+Upstream: no
+Reason: There's no "lp" user on Void Linux
+
+--- a/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
++++ b/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
+@@ -34,9 +34,8 @@ case "$2" in
+ if [ ! -d $SPOOLER_NAME ]; then
+ mkdir -p $SPOOLER_NAME
+ fi
+- chown lp $SPOOLER_NAME
+ chgrp lp $SPOOLER_NAME
+- chmod 700 $SPOOLER_NAME
++ chmod 770 $SPOOLER_NAME
+
+ if [ "$3" = "USB" ]; then
+ DEVICE_IF=/dev/usb/lp0
diff --git a/srcpkgs/brother-dcp8410-lpr/template b/srcpkgs/brother-dcp8410-lpr/template
new file mode 100644
index 00000000000000..b27e571f69af13
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/template
@@ -0,0 +1,45 @@
+# Template file for 'brother-dcp8410-lpr'
+pkgname=brother-dcp8410-lpr
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="ghostscript"
+short_desc="LPR driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:EULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103239/dcpl8410cdwlpr-${version}-0.i386.deb"
+checksum="1e97cd530e7b6162bf436d16e94098e524b438fdecf0a8044c5e07efa9300080"
+repository="nonfree"
+conf_files="/opt/brother/Printers/dcpl8410cdw/inf/brdcpl8410cdwrc"
+nopie=yes
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/lpd 755
+
+ vcopy opt/brother/Printers/dcpl8410cdw/inf opt/brother/Printers/dcpl8410cdw
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/filter_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd
+
+ # Copy the executables based on architecture type
+ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+ _arch="x86_64"
+ elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+ _arch="i686"
+ else
+ _arch="unknown"
+ fi
+ for bin in brdcpl8410cdwfilter brprintconf_dcpl8410cdw; do
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/${_arch}/${bin} \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd/
+ done
+
+ vmkdir usr/bin 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ ${DESTDIR}/usr/bin/brprintconf_dcpl8410cdw
+
+ vlicense ${FILESDIR}/agree.html LICENSE.html
+
+ vdoc "${FILESDIR}/README.voidlinux"
+}
From 6e682e6486657280ce4ab74c7505e51c7889da86 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:50 +0200
Subject: [PATCH 2/2] New package: brother-dcp8410-cups-1.5.0
---
srcpkgs/brother-dcp8410-cups/INSTALL | 6 +
srcpkgs/brother-dcp8410-cups/REMOVE | 5 +
.../files/README.voidlinux | 29 ++
srcpkgs/brother-dcp8410-cups/files/agree.html | 248 ++++++++++++++++++
.../files/cupswrapperdcpl8410cdw.void | 152 +++++++++++
srcpkgs/brother-dcp8410-cups/template | 39 +++
6 files changed, 479 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-cups/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-cups/REMOVE
create mode 100644 srcpkgs/brother-dcp8410-cups/files/README.voidlinux
create mode 100644 srcpkgs/brother-dcp8410-cups/files/agree.html
create mode 100755 srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
create mode 100644 srcpkgs/brother-dcp8410-cups/template
diff --git a/srcpkgs/brother-dcp8410-cups/INSTALL b/srcpkgs/brother-dcp8410-cups/INSTALL
new file mode 100644
index 00000000000000..3f342471bd0f92
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/INSTALL
@@ -0,0 +1,6 @@
+case "${ACTION}" in
+post)
+ [ -d /var/service/cupsd ] && sv restart cupsd
+ ;;
+esac
+
diff --git a/srcpkgs/brother-dcp8410-cups/REMOVE b/srcpkgs/brother-dcp8410-cups/REMOVE
new file mode 100644
index 00000000000000..1515570c7f7835
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/REMOVE
@@ -0,0 +1,5 @@
+case ${ACTION} in
+post)
+ [ -d /var/service/cupsd ] && sv restart cupsd
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-cups/files/README.voidlinux b/srcpkgs/brother-dcp8410-cups/files/README.voidlinux
new file mode 100644
index 00000000000000..6de3bf2a5af10b
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/README.voidlinux
@@ -0,0 +1,29 @@
+A few tips for managing your printer
+------------------------------------
+
+Check the PPD is in place:
+$ lpinfo -m | grep 8410
+ Brother/brother_dcpl8410cdw_printer_en.ppd Brother DCP-L8410CDW CUPS
+
+Scan the network/usb/etc for the printer:
+$ lpinfo -v
+ ...
+ network lpd://BRWD0123456789A/BINARY_P1
+For network connections, sometimes you have to execute above couple of
+times.
+
+Add the printer:
+# lpadmin -p mybrother \
+ -L "Valhalla" \
+ -D "The Almighty Printer" \
+ -E \
+ -v lpd://BRWD0123456789A/BINARY_P1 \
+ -P /usr/share/cups/model/Brother/brother_dcpl8410cdw_printer_en.ppd
+
+Later, it can be removed with:
+# lpadmin -x mybrother
+
+There's also a "cupswrapperdcpl8410cdw.void" script installed in:
+ /opt/brother/Printers/dcpl8410cdw/cupswrapper/
+But if you follow the previous tips, there's no need running it.
+Nonetheless, pass "-h" to it to list the commands.
diff --git a/srcpkgs/brother-dcp8410-cups/files/agree.html b/srcpkgs/brother-dcp8410-cups/files/agree.html
new file mode 100644
index 00000000000000..577f6b82035fa8
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/agree.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>End-User License Agreement for Brother Software</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
+<link rel="stylesheet" href="/library/websites/www.com/globalheader/css/template_agreement.css" type="text/css" media="all">
+<script type="text/javascript" src="/library/websites/www.com/globalheader/js/template.js" language="JavaScript"></script>
+
+<style type="text/css">
+<!--
+body { font-size: 100%}
+.main { font-size: 100%}
+.sm { font-size: 90%}
+-->
+</style>
+</head>
+
+<body>
+
+<!-- begin #header -->
+<table border="0" cellpadding="0" cellspacing="0" id="header" summary="Global header">
+<tr>
+<td><img height="1" width="16" alt="" src="/library/websites/www.com/jp/globalheader/images/spacer.gif"></td>
+<td>
+
+<table border="0" cellpadding="0" cellspacing="0" summary="">
+<tr>
+<td id="brotherLogo">
+<a href="/index.htm" target="_top"><img height="40" width="106" alt="brother at your side" src="/library/websites/www.com/globalheader/images/head_brotherlogo.gif"></a>
+</td>
+<td><img height="1" width="200" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+<td id="formArea">
+<!-- SelectCountry -->
+<div id="country">
+<form name="form1" id="form1">
+<select name="select_country" class="countryTxt">
+<option value="http://www.brother.com/index.htm" selected>Global Site</option>
+<option></option>
+<optgroup label="North/ South/ Central America">
+<option value="http://www.brother.com.ar/">Argentina - Español</option>
+<option value="http://www.brother.com.br/">Brasil - Português</option>
+<option value="http://www.brother.ca/en/index.asp">Canada - English</option>
+<option value="http://www.brother.ca/fr/index.asp">Canada - Français</option>
+<option value="http://www.brother-usa.com/caribbean/">Caribbean Countries - English</option>
+<option value="http://www.brother.cl/">Chile - Español</option>
+<option value="http://www.brother-usa.com/latinamerica/">Latin America - Español</option>
+<option value="http://www.brother.com.mx/">México - Español</option>
+<option value="http://www.brother-usa.com/">U.S.A. - English</option>
+<option></option>
+</optgroup>
+<optgroup label="Europe">
+<option value="http://www.brother.eu/">Brother Europe</option>
+<option value="http://www.brother.at/?lang=en">Austria - English</option>
+<option value="http://www.brother.at/?lang=de">Österreich - Deutsch</option>
+<option value="http://www.brother.be/?&lang=fr">Belgique - Français</option>
+<option value="http://www.brother.be/?&lang=nl">Belgique - Nederlands</option>
+<option value="http://www.brother.bg/">БЪлгария - БЪлгаски</option>
+<option value="http://www.brother.cz/">Česká republika - česky</option>
+<option value="http://www.brother.dk/">Danmark - Dansk</option>
+<option value="http://www.brother.de/">Deutschland - Deutsch</option>
+<option value="http://www.brother.es/">España - Español</option>
+<option value="http://www.brother.fi/">Finland -Suomi</option>
+<option value="http://www.brother.fr/">France - Français</option>
+<option value="http://www.brother.ie/">Ireland - English</option>
+<option value="http://www.brother.it/">Italia - Italiano</option>
+<option value="http://www.brother.hu/">Magyarország - Magyar</option>
+<option value="http://www.brother.nl/">Nederland - Nederlands</option>
+<option value="http://www.brother.no/">Norge - Norsk</option>
+<option value="http://www.brother.pl/">Polska - Polski</option>
+<option value="http://www.brother.pt/">Portugal - Português</option>
+<option value="http://www.brother.ru/">Россия - Pусский</option>
+<option value="http://www.brother.com.ro/">România - Românã</option>
+<option value="http://www.brother.ch/?&lang=de">Schweiz - Deutsch</option>
+<option value="http://www.brother.ch/?&lang=fr">Suisse - Français</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.se/">Sverige - Svenska</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.co.uk/cms.cfm/lang/en">United Kingdom</option>
+<option value="http://www.brother-ism.com/">--Industrial Sewing Machines</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option></option>
+</optgroup>
+<optgroup label="Middle East/ Africa">
+<option value="http://www.brother.ae/">Bahrain - English</option>
+<option value="http://www.brother.ae/">Egypt - English</option>
+<option value="http://www.brother.ae/">Ethiopia - English</option>
+<option value="http://www.brother.ae/">Iran - English</option>
+<option value="http://www.brother.ae/">Iraq - English</option>
+<option value="http://www.brother.ae/">Jordan - English</option>
+<option value="http://www.brother.ae/">Kenya - English</option>
+<option value="http://www.brother.ae/">Kuwait - English</option>
+<option value="http://www.brother.ae/">Lebanon - English</option>
+<option value="http://www.brother.ae/">Libya - English</option>
+<option value="http://www.brother.ae/">Mauritius - English</option>
+<option value="http://www.brother.ae/">Nigeria - English</option>
+<option value="http://www.brother.ae/">Oman - English</option>
+<option value="http://www.brother.ae/">Qatar - English</option>
+<option value="http://www.brother.ae/">Saudi Arabia - English</option>
+<option value="http://www.brother.co.za/">South Africa - English</option>
+<option value="http://www.brother.ae/">Syria - English</option>
+<option value="http://www.brother.ae/">Tanzania - English</option>
+<option value="http://www.brother.com.tr/">Türkiye - Türkçe</option>
+<option value="http://www.brother.ae/">Uganda - English</option>
+<option value="http://www.brother.ae/">United Arab Emirates - English</option>
+<option value="http://www.brother.ae/">Yemen - English</option>
+<option value="http://www.brother.com/europe/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/mea/index.htm">--Contact List</option>
+<option></option>
+</optgroup>
+<optgroup label="Asia/ Oceania">
+<option value="http://www.brother.com.au/">Australia - English</option>
+<option value="http://www.brother.ae/">Bangladesh - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+-<option value="http://www.brother-cn.net/">China - Chinese</option>
+<option value="http://www.brother.com.hk/en/home.html">> Hong Kong - English</option>
+<option value="http://www.brother.com.hk/tc/home.html">> Hong Kong - Chinese</option>
+<option value="http://www.brother.in/">India - English</option>
+<option value="http://www.brother.com.sg/">Indonesia - English</option>
+<option value="http://www.brother.co.jp/">Japan - Japanese</option>
+<option value="http://www.brother.com.my/">Malaysia - English</option>
+<option value="http://www.brother.ae/">Nepal - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.co.nz/">New Zealand - English</option>
+<option value="http://www.brother.ae/">Pakistan - English</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.ph/">Philippines - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Singapore - English</option>
+-<option value="http://www.brother.co.th/">Thailand - Thai</option>
+<option value="http://www.brother.com.sg/"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com.sg/">Vietnam - English</option>
+<option value="http://www.brother.com.hk/en/product/product_list.html?category=19"> > Industrial Sewing Machines</option>
+<option value="http://www.brother.com/as_oc/machine/index.htm">--Machine Tools</option>
+<option value="http://www.brother.com/as_oc/contact/asiapacific/index.htm">--Contact List</option>
+</optgroup>
+</select><a href="javascript:;"><img height="19" onClick="jumpCountry(form1.select_country);return false;" width="21" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif"></a>
+</form>
+</div>
+<!-- SelectCountry -->
+
+
+<!-- SiteSearch -->
+<div id="search">
+<form name="gs" method="GET" action="http://search2.brother.co.jp/search?">
+<input name="q" type="text" value="Search" onfocus="if(this.value == this.defaultValue) this.value=''" onblur="if(this.value == '') this.value=this.defaultValue" class="searchTxt"><input type="image" value="" alt="Go" src="/library/websites/www.com/globalheader/images/head_btn.gif">
+<input type="hidden" name="sort" value="date:D:L:d1">
+<input type="hidden" name="output" value="xml_no_dtd">
+<input type="hidden" name="oe" value="UTF-8"><input type="hidden" name="ie" value="UTF-8">
+<input type="hidden" name="client" value="fe_www_com">
+<input type="hidden" name="proxystylesheet" value="fe_www_com">
+<input type="hidden" name="site" value="col_www_com_cominf_sol">
+ </div>
+ </form>
+</div>
+<!-- SiteSearch -->
+</td>
+</tr>
+</table>
+
+</td>
+<td><img height="1" width="17" alt="" src="/library/websites/www.com/globalheader/images/spacer.gif"></td>
+</tr>
+
+
+</table>
+<!-- end #header -->
+
+<div style="line-height:1px;"> </div>
+
+<table border="0" cellspacing="0" cellpadding="2" width="600">
+<tr>
+<td bgcolor="#333333"><b><span style="color:#FFFFFF;">License Agreement</span></b></td>
+</tr>
+<tr>
+<td><p>This Agreement provides terms and conditions for license grant for use
+ of the software that is distributed with this Agreement ("Software")
+ from Brother Industries, Ltd. ("Brother") to recipients thereof
+ ("You").</p>
+ <table width="100%" height="60" border="1" bordercolor="#000099">
+ <tr>
+ <td bordercolor="#000099"><strong>Note:</strong><br>
+ Please click on "I Accept" while holding down "Shift" or
+ right click on "I Accept" and select "Save Target As,,," from
+ the menu.</td>
+ </tr>
+ </table>
+ <ol>
+ <li>The Software is comprised of the following software modules:<br>
+ <br>
+ (1) Certain software modules that is the subject of GNU GENERAL PUBLIC
+ LICENSE ("GPL Modules"), and
+ <br>
+ (2) Other software modules ("Non-GPL Modules")
+ <br>
+ <br>
+ You may distinguish each of GPL Modules by downloading source files
+ of the Software as Brother separately makes available and reading such
+ files.<br>
+ </li>
+ <li>Your use of all GPL Modules shall be subject to the terms and conditions
+ of GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ("GPLv2").
+ Please see <a href="http://www.brother.com/agreement/English_gpl/agree.html" target="_blank">http://www.brother.com/agreement/English_gpl/agree.html</a>. You
+ shall use GPL Modules in accordance with the terms and conditions of GPLv2.
+ Your use of GPL Modules shall be deemed
+ as your agreement to the terms and conditions of GPLv2.<br>
+ </li>
+ <li>You have the right to use all Non-GPL Modules only in accordance with
+ the following terms and conditions. Your use of Non-GPL Modules shall be
+ deemed as your agreement to the following terms and conditions:
+ <p>(1) Brother retains any and all copyrights to Non-GPL Modules. In no
+ case this Agreement shall be construed to assign or otherwise transfer
+ from Brother to you any copyrights or other intellectual property rights
+ to whole or any part of Non-GPL Modules.</p>
+ <p>(2) Brother grants you a non-exclusive license to reproduce and/or distribute
+ (via Internet or in any other manner) Non-GPL Modules. Brother further
+ grants you a non-exclusive license to modify, alter, translate or otherwise
+ prepare derivative works of Non-GPL Modules and to reproduce and/or distribute
+ (via Internet or in any other manner) such modification, alteration,
+ translation or other derivative works of Non-GPL Modules.</p>
+ <p>(3) When you distribute (via Internet or in any other manner) Non-GPL
+ Modules or any modification, alteration, translation or other derivative
+ works thereof under the license granted in accordance with subparagraph
+ 3(2) above, you must expressly grant any and all recipient thereof the
+ license equivalent to this Agreement which applies to Non-GPL Modules.</p>
+ <p>(4) The license of Non-GPL Modules from Brother hereunder is granted "AS
+ IS. BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO NON-GPL MODULES,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY,
+ MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. </p>
+ <p>(5) To the extent allowed by applicable laws, Brother shall have no
+ liability in contract, tort (including negligence or breach of statutory
+ duty) or otherwise for any interruption of use, loss of data, or for
+ any indirect, incidental, punitive or consequential loss or damage, or
+ for any loss of profit, revenue, data, goodwill or anticipated savings
+ that arises under, out of, or in contemplation of this Agreement or otherwise
+ arises due to any error, inaccuracy or defect in Non-GPL Modules even
+ if Brother has been advised of the possibility of such loss or damage.</p>
+ <p>(6) The form in which Non-GPL Modules is distributed is subject to Brothers
+ sole discretion. Brother does not have any obligation to distribute or
+ disclose Non-GPL Modules in source code form. In no case shall this Agreement
+ be deemed as Brothers express or implied agreement to disclose source
+ code of Non-GPL Modules.</p>
+ </li>
+ </ol></td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
new file mode 100755
index 00000000000000..5ec8b25520e1ad
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/cupswrapperdcpl8410cdw.void
@@ -0,0 +1,152 @@
+#! /bin/sh
+#
+# Brother Print filter
+# Copyright (C) 2005-2016 Brother. Industries, Ltd.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# This is trimmed down and tailored for brother-dcpl8410cdw-cupswrapper
+# package of Void Linux
+
+printer_model="dcpl8410cdw"
+printer_name="DCPL8410CDW" # uppercase of $printer_model
+device_name="DCP-L8410CDW" # $printer_name with a hyphen after {MFC,DCP,HL}
+inst_path="/opt/brother/Printers/${printer_model}"
+lpdwrapper="$inst_path/cupswrapper/brother_lpdwrapper_${printer_model}"
+ppd_file_name=/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+brotherlpdwrapper=/usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+
+if [ -d "/usr/share/cups/model" ]
+then
+ mkdir -p /usr/share/cups/model/Brother
+fi
+
+# Eliminate
+if [ "$1" = '-e' ]
+then
+ lpadmin -x ${printer_name}
+ rm -f "$ppd_file"
+ rm -f "$brotherlpdwrapper"
+ rm -f "$lpdwrapper"
+ sv restart cupsd
+ exit 0
+fi
+
+# Restart
+if [ "$1" = "-r" ]
+then
+ lpadmin -x ${printer_name}
+ sv restart cupsd
+ exit 0
+fi
+
+if [ "$1" = "help" ] || [ "$1" = "-h" ]
+then
+ echo 'option -h : help'
+ echo ' -i : install'
+ echo ' -e : uninstall'
+ echo ' -r : remove printer'
+ exit 0
+fi
+
+#
+# The rest is "install"
+#
+
+if [ -e "$inst_path/lpd/filter_${printer_model}" ]
+then
+ :
+else
+ echo "ERROR : Brother LPD filter is not installed."
+fi
+rm -f $ppd_file_name
+
+src_ppd="$inst_path/cupswrapper/brother_${printer_model}_printer_en.ppd"
+if [ -e "$src_ppd" ]
+then
+ cp "$src_ppd" $ppd_file_name
+fi
+chmod 644 $ppd_file_name
+
+#
+# check /usr/lib/cups/filter
+#
+if [ -d /usr/lib/cups/filter ]
+then
+ rm -f $brotherlpdwrapper
+ ln -s $lpdwrapper $brotherlpdwrapper
+fi
+
+sv restart cupsd
+
+sleep 2s
+
+uris=$(lpinfo -v)
+
+for uri in $uris
+do
+ URI=$(echo $uri | grep ${device_name} | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+done
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep ${device_name} )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep -i Brother | grep usb )
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ for uri in $uris
+ do
+ URI=$(echo $uri | grep usb)
+ if [ "$URI" != '' ]
+ then
+ break;
+ fi
+ done
+fi
+
+if [ "$URI" = '' ]
+then
+ URI="usb://dev/usb/lp0"
+fi
+
+echo lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name
+
+exit 0
diff --git a/srcpkgs/brother-dcp8410-cups/template b/srcpkgs/brother-dcp8410-cups/template
new file mode 100644
index 00000000000000..bc37f8566e5633
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/template
@@ -0,0 +1,39 @@
+# Template file for 'brother-dcp8410-cups'
+pkgname=brother-dcp8410-cups
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="brother-dcp8410-lpr cups cups-filters"
+short_desc="CUPS wrapper driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:EULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103248/dcpl8410cdwcupswrapper-${version}-0.i386.deb"
+checksum="b9deb04a6b8f7dd800e04cd90dcd3fa6129214bf36d63649b1710915fd8b549a"
+repository="nonfree"
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/cupswrapper 755
+
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall ${FILESDIR}/cupswrapperdcpl8410cdw.void \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+
+ # Copy the PPD file to its rightful place
+ vmkdir usr/share/cups/model/Brother 755
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 usr/share/cups/model/Brother
+
+ # Create a link to lpdwrapper in CUPS filter directory
+ vmkdir usr/lib/cups/filter 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ ${DESTDIR}/usr/lib/cups/filter/brother_lpdwrapper_dcpl8410cdw
+
+ vlicense ${FILESDIR}/agree.html LICENSE.html
+
+ vdoc "${FILESDIR}/README.voidlinux"
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (4 preceding siblings ...)
2024-08-05 7:56 ` shahab-vahedi
@ 2024-08-10 19:57 ` shahab-vahedi
2024-08-17 6:39 ` shahab-vahedi
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-10 19:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 153 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2282261856
Comment:
Ping!
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (5 preceding siblings ...)
2024-08-10 19:57 ` shahab-vahedi
@ 2024-08-17 6:39 ` shahab-vahedi
2024-08-25 13:39 ` shahab-vahedi
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-17 6:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2294697003
Comment:
Ping^2!
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (6 preceding siblings ...)
2024-08-17 6:39 ` shahab-vahedi
@ 2024-08-25 13:39 ` shahab-vahedi
2024-08-31 17:56 ` shahab-vahedi
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-25 13:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2308847310
Comment:
Ping^3!
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (7 preceding siblings ...)
2024-08-25 13:39 ` shahab-vahedi
@ 2024-08-31 17:56 ` shahab-vahedi
2024-09-09 7:41 ` shahab-vahedi
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-08-31 17:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2322993442
Comment:
Ping^4!
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (8 preceding siblings ...)
2024-08-31 17:56 ` shahab-vahedi
@ 2024-09-09 7:41 ` shahab-vahedi
2024-10-24 19:34 ` shahab-vahedi
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-09-09 7:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2337362603
Comment:
Could someone take a look at these? I've been using them for a month and see no surprises.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (9 preceding siblings ...)
2024-09-09 7:41 ` shahab-vahedi
@ 2024-10-24 19:34 ` shahab-vahedi
2024-10-24 19:35 ` shahab-vahedi
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-10-24 19:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2436193837
Comment:
> I'm not inclined to accept these packages. At best, this ought to be considered for inclusion as a restricted package
I can add `restricted=yes` to the `template`. HOWEVER, if the community doesn't want this package, then I keep it to myself. I just wanted to share it with other Void users to save them some time.
> The EULAs and wrapper script should not be vendored...
For the EULA, my point of reference was the [agree.html](https://github.com/void-linux/void-packages/commits/master/srcpkgs/brother-brscan4/files/agree.html) already existing in `bother-brscan4` package.
Regarding the _wrapper script_, If you're referring to `cupswrapperdcpl8410cdw.void`, it's a trimmed down version of the original script in the `*.deb` file to suit a Void Linux system. The alternative would be to have the original one installed and apply a _patch_ on top of it. For ease of maintenance, I chose the former approach. For the record, the [brother-dcp197c-cupswarpper](https://github.com/void-linux/void-packages/blob/master/srcpkgs/brother-dcp197c-cupswrapper/files/cupswrapper.void), as it is in `master` branch of 24-Oct-2024, was my inspiration.
> ...Fetch them from the deb archive or the web at build time.
I find nothing in the `*.deb` file. As for the _web_, I neither am sure where that would be nor have I the will to locate it. Maybe I should just remove the `agree.html`.
> The INSTALL and REMOVE scripts are inappropriate and should be removed.
> Our packages don't restart users' services just by virtue of installation or removal.
> Users can restart their own services when appropriate.
This was a mimic of the `*.deb` package itself, but sure, I can remove them. Keep in mind, one of them, `brother-dcp8410-lpr/INSTALL`, is creating a directory and has nothing to do with the services.
I appreciate that someone has finally taken a peek at this. Whatever the outcome of this discussion will be, it will inherently be the same for my other [PR](https://github.com/void-linux/void-packages/pull/51636) which upgrades (and fixes) the (broken) existing package of [brother-brscan4](https://github.com/void-linux/void-packages/commits/master/srcpkgs/brother-brscan4/).
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (10 preceding siblings ...)
2024-10-24 19:34 ` shahab-vahedi
@ 2024-10-24 19:35 ` shahab-vahedi
2024-10-25 13:26 ` ahesford
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-10-24 19:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2350 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2436193837
Comment:
> I'm not inclined to accept these packages. At best, this ought to be considered for inclusion as a restricted package
I can add `restricted=yes` to the `template`. HOWEVER, if the community doesn't want this package, then I keep it to myself. I just wanted to share it with other Void users to save them some time.
> The EULAs and wrapper script should not be vendored...
For the EULA, my point of reference was the [agree.html](https://github.com/void-linux/void-packages/commits/master/srcpkgs/brother-brscan4/files/agree.html) already existing in `bother-brscan4` package.
Regarding the _wrapper script_, If you're referring to `cupswrapperdcpl8410cdw.void`, it's a trimmed down version of the original script in the `*.deb` file to suit a Void Linux system. The alternative would be to have the original one installed and apply a _patch_ on top of it. For ease of maintenance, I chose the former approach. For the record, the [brother-dcp197c-cupswarpper](https://github.com/void-linux/void-packages/blob/master/srcpkgs/brother-dcp197c-cupswrapper/files/cupswrapper.void), as it is in `master` branch of 24-Oct-2024, was my inspiration.
> ...Fetch them from the deb archive or the web at build time.
I find nothing in the `*.deb` file. As for the _web_, I neither am sure where that would be nor have I the will to locate it. Maybe I should just remove the `agree.html`.
> The INSTALL and REMOVE scripts are inappropriate and should be removed.
> Our packages don't restart users' services just by virtue of installation or removal.
> Users can restart their own services when appropriate.
This was a mimic of the `*.deb` package itself, but sure, I can remove them. Keep in mind, one of them, `brother-dcp8410-lpr/INSTALL`, is creating a directory and has nothing to do with the services.
I appreciate that someone has finally taken a peek at this. Whatever the outcome of this discussion will be, it will inherently be the same for my other [PR](https://github.com/void-linux/void-packages/pull/51636) which upgrades (and fixes) the (broken) existing package of [brother-brscan4](https://github.com/void-linux/void-packages/commits/master/srcpkgs/brother-brscan4/).
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (11 preceding siblings ...)
2024-10-24 19:35 ` shahab-vahedi
@ 2024-10-25 13:26 ` ahesford
2024-10-25 17:29 ` shahab-vahedi
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: ahesford @ 2024-10-25 13:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2437778492
Comment:
Vendoring the wrapper script entirely just obscures the changes you made, which makes it harder to maintain as the upstream version drifts over time. It also makes your changes harder to review, because we can't see if the patch is appropriate. Use the version from the deb archive and include a patch that makes the necessary changes for the Void package.
We provide a `make_dirs` variable to allow directories to me made during package installation. That should be preferred over a custom `INSTALL` script to do the same.
If the `brother-brscan4` package venders a EULA, it is doing the wrong thing. The license should be captured at package build time because it is subject to change between the moment you fetched a copy and the moment the package fetched distfiles and built a package. If it isn't in the deb archive, you can grab it at build time from wherever you got it in the first place.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (12 preceding siblings ...)
2024-10-25 13:26 ` ahesford
@ 2024-10-25 17:29 ` shahab-vahedi
2024-10-28 18:49 ` shahab-vahedi
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-10-25 17:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2438407569
Comment:
> Vendoring the wrapper script entirely just obscures the changes you made, which makes it harder to maintain as the upstream version drifts over time. It also makes your changes harder to review, because we can't see if the patch is appropriate. Use the version from the deb archive and include a patch that makes the necessary changes for the Void package.
Ack.
> We provide a `make_dirs` variable to allow directories to me made during package installation. That should be preferred over a custom `INSTALL` script to do the same.
Ack.
> If the `brother-brscan4` package venders a EULA, it is doing the wrong thing. The license should be captured at package build time because it is subject to change between the moment you fetched a copy and the moment the package fetched distfiles and built a package. If it isn't in the deb archive, you can grab it at build time from wherever you got it in the first place.
Could you name a package that already does something like that? so I can make myself familiar with the whole picture/mechanism.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (13 preceding siblings ...)
2024-10-25 17:29 ` shahab-vahedi
@ 2024-10-28 18:49 ` shahab-vahedi
2024-10-28 20:52 ` [PR PATCH] [Updated] " shahab-vahedi
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-10-28 18:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2442371168
Comment:
> > If the `brother-brscan4` package venders a EULA, it is doing the wrong thing. The license should be captured at package build time because it is subject to change between the moment you fetched a copy and the moment the package fetched distfiles and built a package. If it isn't in the deb archive, you can grab it at build time from wherever you got it in the first place.
>
> Could you name a package that already does something like that? so I can make myself familiar with the whole picture/mechanism.
The `post_extract()` in `brother-brscan3` package does that exactly.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PR PATCH] [Updated] Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (14 preceding siblings ...)
2024-10-28 18:49 ` shahab-vahedi
@ 2024-10-28 20:52 ` shahab-vahedi
2024-10-28 20:58 ` shahab-vahedi
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-10-28 20:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
There is an updated pull request by shahab-vahedi against master on the void-packages repository
https://github.com/shahab-vahedi/void-packages brother
https://github.com/void-linux/void-packages/pull/51608
Add Printer Support: Brother DCP-L8410CDW
The LPR drivers and CUPS wrappers from Debian packages provided on [Brother's Support page](https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu).
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, `x86_64-glibc`
A patch file from https://github.com/void-linux/void-packages/pull/51608.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-51608.patch --]
[-- Type: text/x-diff, Size: 21012 bytes --]
From c6991916f077e68100e0c3b5d4d116f057d12d18 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:21 +0200
Subject: [PATCH 1/2] New package: brother-dcp8410-lpr-1.5.0
---
srcpkgs/brother-dcp8410-lpr/INSTALL | 5 ++
srcpkgs/brother-dcp8410-lpr/REMOVE | 5 ++
.../patches/fix-setup-script.patch | 17 +++++
srcpkgs/brother-dcp8410-lpr/template | 64 +++++++++++++++++++
4 files changed, 91 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-lpr/INSTALL
create mode 100644 srcpkgs/brother-dcp8410-lpr/REMOVE
create mode 100644 srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
create mode 100644 srcpkgs/brother-dcp8410-lpr/template
diff --git a/srcpkgs/brother-dcp8410-lpr/INSTALL b/srcpkgs/brother-dcp8410-lpr/INSTALL
new file mode 100644
index 00000000000000..59006d3d33ef9b
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/INSTALL
@@ -0,0 +1,5 @@
+case "${ACTION}" in
+post)
+ opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -i
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/REMOVE b/srcpkgs/brother-dcp8410-lpr/REMOVE
new file mode 100644
index 00000000000000..c4de5eb1ebab79
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/REMOVE
@@ -0,0 +1,5 @@
+case "${ACTION}" in
+pre)
+ opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -e
+ ;;
+esac
diff --git a/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
new file mode 100644
index 00000000000000..09b116bdcc7cab
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/patches/fix-setup-script.patch
@@ -0,0 +1,17 @@
+Source: package maintainer
+Upstream: no
+Reason: There's no "lp" user on Void Linux
+
+--- a/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
++++ b/opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij
+@@ -34,9 +34,8 @@ case "$2" in
+ if [ ! -d $SPOOLER_NAME ]; then
+ mkdir -p $SPOOLER_NAME
+ fi
+- chown lp $SPOOLER_NAME
+ chgrp lp $SPOOLER_NAME
+- chmod 700 $SPOOLER_NAME
++ chmod 770 $SPOOLER_NAME
+
+ if [ "$3" = "USB" ]; then
+ DEVICE_IF=/dev/usb/lp0
diff --git a/srcpkgs/brother-dcp8410-lpr/template b/srcpkgs/brother-dcp8410-lpr/template
new file mode 100644
index 00000000000000..7c7ec9d099af7d
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-lpr/template
@@ -0,0 +1,64 @@
+# Template file for 'brother-dcp8410-lpr'
+pkgname=brother-dcp8410-lpr
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+hostmakedepends="curl"
+depends="ghostscript"
+short_desc="LPR driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:BrotherEULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103239/dcpl8410cdwlpr-${version}-0.i386.deb"
+checksum="1e97cd530e7b6162bf436d16e94098e524b438fdecf0a8044c5e07efa9300080"
+repository="nonfree"
+conf_files="/opt/brother/Printers/dcpl8410cdw/inf/brdcpl8410cdwrc"
+nopie=yes
+nodebug=yes
+_license_checksum=4ab8b9269a74377ee85458cc4dfbacfbf6d26665426572fe16f7102af214bd3c
+
+# Copied from brother-brscan3/template
+post_extract() {
+ curl -sk https://support.brother.com/g/s/agreement/English_lpr/agree.html | \
+ sed -n \
+ -e 's,</\?p>,,' \
+ -e 's/\"/"/g' \
+ -e 's, \?^M,,' \
+ -e 's,^[ \t]\+,,' \
+ -e '14,18p' \
+ -e '28,45p' \
+ > LICENSE
+
+ filesum="$(xbps-digest LICENSE)"
+ if [ "$filesum" != "$_license_checksum" ]; then
+ msg_error "SHA256 mismatch for LICENSE:\n$filesum\n"
+ fi
+}
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/lpd 755
+
+ vcopy opt/brother/Printers/dcpl8410cdw/inf opt/brother/Printers/dcpl8410cdw
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/filter_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd
+
+ # Copy the executables based on architecture type
+ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+ _arch="x86_64"
+ elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
+ _arch="i686"
+ else
+ _arch="unknown"
+ fi
+ for bin in brdcpl8410cdwfilter brprintconf_dcpl8410cdw; do
+ vinstall opt/brother/Printers/dcpl8410cdw/lpd/${_arch}/${bin} \
+ 755 opt/brother/Printers/dcpl8410cdw/lpd/
+ done
+
+ vmkdir usr/bin 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw \
+ ${DESTDIR}/usr/bin/brprintconf_dcpl8410cdw
+
+ vlicense LICENSE
+}
From bdd0808d949b7dcc78e4519773115ac9c9bf6eb4 Mon Sep 17 00:00:00 2001
From: Shahab Vahedi <list+void@vahedi.org>
Date: Fri, 2 Aug 2024 16:41:50 +0200
Subject: [PATCH 2/2] New package: brother-dcp8410-cups-1.5.0
---
.../files/README.maintainer | 29 ++
.../patches/adapt-wrapper-script.patch | 328 ++++++++++++++++++
srcpkgs/brother-dcp8410-cups/template | 58 ++++
3 files changed, 415 insertions(+)
create mode 100644 srcpkgs/brother-dcp8410-cups/files/README.maintainer
create mode 100644 srcpkgs/brother-dcp8410-cups/patches/adapt-wrapper-script.patch
create mode 100644 srcpkgs/brother-dcp8410-cups/template
diff --git a/srcpkgs/brother-dcp8410-cups/files/README.maintainer b/srcpkgs/brother-dcp8410-cups/files/README.maintainer
new file mode 100644
index 00000000000000..64e4edb55b28d9
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/files/README.maintainer
@@ -0,0 +1,29 @@
+A few tips for managing your printer
+------------------------------------
+
+Check the PPD is in place:
+$ lpinfo -m | grep 8410
+ Brother/brother_dcpl8410cdw_printer_en.ppd Brother DCP-L8410CDW CUPS
+
+Scan the network/usb/etc for the printer:
+$ lpinfo -v
+ ...
+ network lpd://BRWD0123456789A/BINARY_P1
+For network connections, sometimes you have to execute above couple of
+times.
+
+Add the printer:
+# lpadmin -p mybrother \
+ -L "Valhalla" \
+ -D "The Almighty Printer" \
+ -E \
+ -v lpd://BRWD0123456789A/BINARY_P1 \
+ -P /usr/share/cups/model/Brother/brother_dcpl8410cdw_printer_en.ppd
+
+Later, it can be removed with:
+# lpadmin -x mybrother
+
+There's also a patched "cupswrapperdcpl8410cdw" script installed in:
+ /opt/brother/Printers/dcpl8410cdw/cupswrapper/
+But if you follow the previous tips, there's no need running it.
+Nonetheless, pass "-h" to it to list its commands.
diff --git a/srcpkgs/brother-dcp8410-cups/patches/adapt-wrapper-script.patch b/srcpkgs/brother-dcp8410-cups/patches/adapt-wrapper-script.patch
new file mode 100644
index 00000000000000..2d12d8d2bc7b0b
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/patches/adapt-wrapper-script.patch
@@ -0,0 +1,328 @@
+Source: package maintainer
+Upstream: no
+Reason: Adapt the script for a Void Linux system and remove the dead-code
+
+--- a/opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw
++++ b/opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw
+@@ -18,52 +18,35 @@
+ # Place, Suite 330, Boston, MA 02111-1307 USA
+ #
+
+-printer_model=""dcpl8410cdw""
+-printer_name=`echo $printer_model | tr '[a-z]' '[A-Z]'`
+-device_name=`echo $printer_name | eval sed -e 's/MFC/MFC-/' -e 's/DCP/DCP-/' -e 's/HL/HL-/' -e 's/FAX/FAX-/'`
+-pcfilename=`echo $printer_name | tr -d '[A-Z]'`
+-device_model="Printers"
+-tmp_filter=/var/tmp/brother_lpdwrapper_${printer_model}
+-ldpwrapper=/opt/brother/${device_model}/${printer_model}/cupswrapper/brother_lpdwrapper_${printer_model}
++# This is trimmed down and tailored for brother-dcpl8410cdw-cupswrapper
++# package of Void Linux
+
+-if [ -d "/usr/share/cups/model" ]; then
+- mkdir -p /usr/share/cups/model/Brother
+-else
+- mkdir -p /usr/share/ppd/Brother
+-fi
++printer_model="dcpl8410cdw"
++printer_name="DCPL8410CDW" # uppercase of $printer_model
++device_name="DCP-L8410CDW" # $printer_name with a hyphen after {MFC,DCP,HL}
++inst_path="/opt/brother/Printers/${printer_model}"
++lpdwrapper="$inst_path/cupswrapper/brother_lpdwrapper_${printer_model}"
++ppd_file_name=/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
++brotherlpdwrapper=/usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+
+-if [ -d "/usr/share/ppd" ]; then
+- mkdir -p /usr/share/ppd/Brother
+-else
++if [ -d "/usr/share/cups/model" ]; then
+ mkdir -p /usr/share/cups/model/Brother
+ fi
+
+-
+-
++# Eliminate
+ if [ "$1" = '-e' ]; then
+ lpadmin -x ${printer_name}
+- rm -f /usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+- rm -f /usr/share/ppd/Brother/brother_${printer_model}_printer_en.ppd
+- rm -f /usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+- rm -f /usr/lib64/cups/filter/brother_lpdwrapper_${printer_model}
+- rm -f /opt/brother/${device_model}/${printer_model}/cupswrapper/brother_lpdwrapper_${printer_model}
+-# rm -f /usr/local/Brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1
+-if [ -e /etc/init.d/cups ]; then
+- /etc/init.d/cups restart
+-elif [ -e /etc/init.d/cupsys ]; then
+- /etc/init.d/cupsys restart
+-fi
+-# /etc/init.d/cups restart
++ rm -f "$ppd_file_name"
++ rm -f "$brotherlpdwrapper"
++ rm -f "$lpdwrapper"
++ sv restart cupsd
+ exit 0
+ fi
++
++# Restart
+ if [ "$1" = "-r" ]; then
+ lpadmin -x ${printer_name}
+-if [ -e /etc/init.d/cups ]; then
+- /etc/init.d/cups restart
+-elif [ -e /etc/init.d/cupsys ]; then
+- /etc/init.d/cupsys restart
+-fi
+-# /etc/init.d/cups restart
++ sv restart cupsd
+ exit 0
+ fi
+ if [ "$1" = "help" ] || [ "$1" = "-h" ]; then
+@@ -73,237 +56,33 @@ if [ "$1" = "help" ] || [ "$1" = "-h" ];
+ echo ' -r : remove printer'
+ exit 0
+ fi
+-#mkdir -p /usr/local/Brother/${device_model}/${printer_model}/filter
+-#mkdir -p /usr/lib/cups/filter
+
+-if [ -e "/opt/brother/${device_model}/${printer_model}/lpd/filter_${printer_model}" ]; then
+- :
+-else
+- echo "ERROR : Brother LPD filter is not installed."
+-fi
+-rm -f /usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+-if [ -d "/usr/share/cups/model" ]; then
+- ppd_file_name=/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd
+-else
+- ppd_file_name=/usr/share/ppd/Brother/brother_${printer_model}_printer_en.ppd
+-fi
+-
+-if [ -e "/opt/brother/${device_model}/${printer_model}/cupswrapper/brother_${printer_model}_printer_en.ppd" ]; then
+-cp "/opt/brother/${device_model}/${printer_model}/cupswrapper/brother_${printer_model}_printer_en.ppd" $ppd_file_name
+-fi
+-
+-chmod 644 $ppd_file_name
+-
+-if [ -d /usr/share/ppd ]
+-then
+-if [ -d /usr/share/cups/model ]
+-then
+- cp $ppd_file_name /usr/share/ppd/Brother/brother_${printer_model}_printer_en.ppd
+- chmod 644 /usr/share/ppd/Brother/brother_${printer_model}_printer_en.ppd
+-fi
+-fi
+-
+-#
+-# create temporary CUPS Filter
+-#
+-
+-cat <<!ENDOFWFILTER! >$tmp_filter
+-#! /bin/sh
+ #
+-# Copyright (C) 2005-2016 Brother. Industries, Ltd.
+-# Ver1.10
+-
+-# This program is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by the Free
+-# Software Foundation; either version 2 of the License, or (at your option)
+-# any later version.
+-#
+-# This program is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+-# more details.
+-#
+-# You should have received a copy of the GNU General Public License along with
+-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+-# Place, Suite 330, Boston, MA 02111-1307 USA
++# The rest is "install"
+ #
+
+-LOGFILE="/dev/null"
+-LOGLEVEL="1"
+-LOGCLEVEL="7"
+-DEBUG=0
+-NUPENABLE=1
+-LOG_LATESTONLY=1
+-
+-
+-touch /tmp/${printer_model}_latest_print_info
+-chmod 600 -R /tmp/${printer_model}_latest_print_info
+-
+-errorcode=0
+-
+-if [ \$DEBUG != 0 ]; then
+- LOGFILE=/tmp/br_cupsfilter_debug_log
+-fi
+-
+-PPDC=\`printenv | grep "PPD="\`
+-PPDC=\`echo \$PPDC | sed -e 's/PPD=//'\`
+-
+-if [ "\$PPDC" = "" ]; then
+- PPDC="/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd"
+-fi
+-
+-
+-if [ \$LOGFILE != "/dev/null" ]; then
+- if [ \$LOG_LATESTONLY == "1" ]; then
+- rm -f \$LOGFILE
+- date >\$LOGFILE
+- else
+- if [ -e \$LOGFILE ]; then
+- date >>\$LOGFILE
+- else
+- date >\$LOGFILE
+- fi
+- fi
+- echo "arg0 = \$0" >>\$LOGFILE
+- echo "arg1 = \$1" >>\$LOGFILE
+- echo "arg2 = \$2" >>\$LOGFILE
+- echo "arg3 = \$3" >>\$LOGFILE
+- echo "arg4 = \$4" >>\$LOGFILE
+- echo "arg5 = \$5" >>\$LOGFILE
+- echo "arg6 = \$6" >>\$LOGFILE
+- echo "PPD = \$PPD" >>\$LOGFILE
+-fi
+-
+-cp /opt/brother/Printers/${printer_model}/inf/br${printer_model}rc /tmp/br${printer_model}rc_\$$
+-chmod 777 -R /tmp/br${printer_model}rc_\$$
+-export BRPRINTERRCFILE=/tmp/br${printer_model}rc_\$$
+-
+-INPUT_TEMP_PS=\`mktemp /tmp/br_input_ps.XXXXXX\`
+-
+-nup="cat"
+-if [ "\`echo \$5 | grep 'Nup='\`" != '' ] && [ \$NUPENABLE != 0 ]; then
+-
+- if [ "\`echo \$5 | grep 'Nup=64'\`" != '' ]; then
+- nup="psnup -64"
+- elif [ "\`echo \$5 | grep 'Nup=32'\`" != '' ]; then
+- nup="psnup -32"
+- elif [ "\`echo \$5 | grep 'Nup=25'\`" != '' ]; then
+- nup="psnup -25"
+- elif [ "\`echo \$5 | grep 'Nup=16'\`" != '' ]; then
+- nup="psnup -16"
+- elif [ "\`echo \$5 | grep 'Nup=8'\`" != '' ]; then
+- nup="psnup -8"
+- elif [ "\`echo \$5 | grep 'Nup=6'\`" != '' ]; then
+- nup="psnup -6"
+- elif [ "\`echo \$5 | grep 'Nup=4'\`" != '' ]; then
+- nup="psnup -4"
+- elif [ "\`echo \$5 | grep 'Nup=2'\`" != '' ]; then
+- nup="psnup -2"
+- elif [ "\`echo \$5 | grep 'Nup=1'\`" != '' ]; then
+- nup="cat"
+- fi
+- echo "NUP=\$nup" >>\$LOGFILE
+- if [ -e /usr/bin/psnup ]; then
+- if [ \$# -ge 7 ]; then
+- cat \$6 | \$nup > \$INPUT_TEMP_PS
+- else
+- cat | \$nup > \$INPUT_TEMP_PS
+- fi
+- else
+- if [ \$# -ge 7 ]; then
+- cp \$6 \$INPUT_TEMP_PS
+- else
+- cat > \$INPUT_TEMP_PS
+- fi
+- fi
+-else
+- if [ \$# -ge 7 ]; then
+- cp \$6 \$INPUT_TEMP_PS
+- else
+- cat > \$INPUT_TEMP_PS
+- fi
+-fi
+-if [ -e "/opt/brother/${device_model}/${printer_model}/lpd/filter${printer_model}" ]; then
+- :
++if [ -e "$inst_path/lpd/filter_${printer_model}" ]; then
++ :
+ else
+- echo "ERROR: /opt/brother/${device_model}/${printer_model}/lpd/filter${printer_model} does not exist" >>\$LOGFILE
+- echo "ERROR: /opt/brother/${device_model}/${printer_model}/lpd/filter${printer_model} does not exist" >>/tmp/${printer_model}_latest_print_info
+- errorcode=30
+- exit
++ echo "ERROR : Brother LPD filter is not installed."
+ fi
++rm -f $ppd_file_name
+
+-CUPSOPTION=\`echo "\$5 Copies=1" | sed -e 's/BrMirror=OFF/MirrorPrint=OFF/' -e 's/BrMirror=ON/MirrorPrint=ON/' -e 's/BrChain/Chain/' -e 's/BrBrightness/Brightness/' -e 's/BrContrast/Contrast/' -e 's/BrHalfCut/HalfCut/' -e 's/BrAutoTapeCut/AutoCut/' -e 's/BrHalftonePattern/Halftone/' -e 's/Binary/Binary/' -e 's/Dither/Dither/' -e 's/ErrorDiffusion/ErrorDiffusion/' -e 's/BrSheets/Sheets/' -e 's/multiple-document-handling/Collate/' -e 's/separate-documents-collated-copies/ON/' -e 's/separate-documents-uncollated-copies/OFF/'\`
+-#if [ -e "/opt/brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1" ]; then
+-
+-# if [ \$DEBUG = 0 ]; then
+-# /opt/brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1 ${printer_name} \$PPDC 0 "\$CUPSOPTION" #"${printer_model}" \$BRPRINTERRCFILE>> /dev/null
+-# else
+-# /opt/brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1 ${printer_name} \$PPDC \$LOGCLEVEL "\$CUPSOPTION" #"${printer_model}" \$BRPRINTERRCFILE>>\$LOGFILE
+-# fi
+-#fi
+-
+-if [ \$DEBUG -lt 10 ]; then
+- cat \$INPUT_TEMP_PS | /opt/brother/${device_model}/${printer_model}/lpd/filter${printer_model}
+- echo br${printer_model}rc_\$$ > /tmp/${printer_model}_latest_print_info
+- cat /tmp/br${printer_model}rc_\$$ >> /tmp/${printer_model}_latest_print_info
+- rm -f /tmp/br${printer_model}rc_\$$
+-
+- if [ \$LOGLEVEL -gt 2 ]; then
+- if [ \$LOGFILE != "/dev/null" ]; then
+- echo "" >>\$LOGFILE
+- echo " ------PostScript Data-------" >>\$LOGFILE
+- cat \$INPUT_TEMP_PS >>\$LOGFILE
+- fi
+- fi
++src_ppd="$inst_path/cupswrapper/brother_${printer_model}_printer_en.ppd"
++if [ -e "$src_ppd" ]; then
++ cp "$src_ppd" $ppd_file_name
+ fi
+-rm -f \$INPUT_TEMP_PS
+-
+-exit $errorcode
+-
+-!ENDOFWFILTER!
+-
+-chmod 755 $tmp_filter
++chmod 644 $ppd_file_name
+
+ #
+-# check /usr/lib/cups/filter
++# check /usr/lib/cups/filter
+ #
+ if [ -d /usr/lib/cups/filter ]; then
+- brotherlpdwrapper=/usr/lib/cups/filter/brother_lpdwrapper_${printer_model}
+- rm -f $brotherlpdwrapper
+- #cp $tmp_filter $brotherlpdwrapper
+- ln -s $ldpwrapper $brotherlpdwrapper
+-fi
+-
+-#
+-# check /usr/lib64/cups/filter
+-#
+-if [ -e /usr/lib64/cups/filter ]; then
+- brotherlpdwrapper64=/usr/lib64/cups/filter/brother_lpdwrapper_${printer_model}
+- rm -f $brotherlpdwrapper64
+- #cp $tmp_filter $brotherlpdwrapper64
+- ln -s $ldpwrapper $brotherlpdwrapper64
++ rm -f $brotherlpdwrapper
++ ln -s $lpdwrapper $brotherlpdwrapper
+ fi
+
+-#
+-# remove temporary script file
+-#
+-rm -f $tmp_filter
+-
+-#chmod a+w /opt/brother/${device_model}/${printer_model}/inf/br${printer_model}rc
+-#chmod a+w /opt/brother/${device_model}/${printer_model}/inf
+-if [ -e /etc/init.d/lpd ]; then
+- /etc/init.d/lpd stop
+-fi
+-if [ -e /etc/init.d/lprng ]; then
+- /etc/init.d/lprng stop
+-fi
+-
+-
+-if [ -e /etc/init.d/cups ]; then
+- /etc/init.d/cups restart
+-elif [ -e /etc/init.d/cupsys ]; then
+- /etc/init.d/cupsys restart
+-fi
++sv restart cupsd
+
+ sleep 2s
+
diff --git a/srcpkgs/brother-dcp8410-cups/template b/srcpkgs/brother-dcp8410-cups/template
new file mode 100644
index 00000000000000..3c040ba1eb860c
--- /dev/null
+++ b/srcpkgs/brother-dcp8410-cups/template
@@ -0,0 +1,58 @@
+# Template file for 'brother-dcp8410-cups'
+pkgname=brother-dcp8410-cups
+version=1.5.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+hostmakedepends="curl"
+depends="brother-dcp8410-lpr cups cups-filters"
+short_desc="CUPS wrapper driver for the Brother DCP-L8410CDW machines"
+maintainer="Shahab Vahedi <list+void@vahedi.org>"
+license="custom:BrotherEULA"
+homepage="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
+distfiles="https://download.brother.com/welcome/dlf103248/dcpl8410cdwcupswrapper-${version}-0.i386.deb"
+checksum="b9deb04a6b8f7dd800e04cd90dcd3fa6129214bf36d63649b1710915fd8b549a"
+repository="nonfree"
+_license_checksum=4ab8b9269a74377ee85458cc4dfbacfbf6d26665426572fe16f7102af214bd3c
+
+# Copied from brother-brscan3/template
+post_extract() {
+ curl -sk https://support.brother.com/g/s/agreement/English_lpr/agree.html | \
+ sed -n \
+ -e 's,</\?p>,,' \
+ -e 's/\"/"/g' \
+ -e 's, \?^M,,' \
+ -e 's,^[ \t]\+,,' \
+ -e '14,18p' \
+ -e '28,45p' \
+ > LICENSE
+
+ filesum="$(xbps-digest LICENSE)"
+ if [ "$filesum" != "$_license_checksum" ]; then
+ msg_error "SHA256 mismatch for LICENSE:\n$filesum\n"
+ fi
+}
+
+do_install() {
+ vmkdir opt/brother/Printers/dcpl8410cdw/cupswrapper 755
+
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/cupswrapperdcpl8410cdw \
+ 755 opt/brother/Printers/dcpl8410cdw/cupswrapper
+
+ # Copy the PPD file to its rightful place
+ vmkdir usr/share/cups/model/Brother 755
+ vinstall opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_dcpl8410cdw_printer_en.ppd \
+ 644 usr/share/cups/model/Brother
+
+ # Create a link to lpdwrapper in CUPS filter directory
+ vmkdir usr/lib/cups/filter 755
+ ln -sf /opt/brother/Printers/dcpl8410cdw/cupswrapper/brother_lpdwrapper_dcpl8410cdw \
+ ${DESTDIR}/usr/lib/cups/filter/brother_lpdwrapper_dcpl8410cdw
+
+ vlicense LICENSE
+ vdoc "${FILESDIR}/README.maintainer"
+}
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (15 preceding siblings ...)
2024-10-28 20:52 ` [PR PATCH] [Updated] " shahab-vahedi
@ 2024-10-28 20:58 ` shahab-vahedi
2024-10-29 12:59 ` ahesford
2025-01-28 1:57 ` github-actions
18 siblings, 0 replies; 20+ messages in thread
From: shahab-vahedi @ 2024-10-28 20:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2442615313
Comment:
@ahesford
ChangeLog for the new changes:
brother-dcp8410-lpr
-------------------
- Removed `README.voidlinux`
As a consequence, `INSTALL` and `REMOVE` scripts are added to
perform the actions mentioned in there.
- Added a mechanism to get an up-to-date ToS from vendor's website.
Also verify if the checksum of the agreement has remained the same.
- Did NOT mark the package as restricted, because ToS allows redistribution.
brother-dcp8410-cups
--------------------
- Removed `INSTALL` and `REMOVE` scripts
- Renamed `README.void` to `README.maintainer`
I really hate to see this doc go away. It is not documented at
the vendor website. I've gathered those notes while studying the
wrapper script.
- Replaced the `cupswrapperdcpl8410cdw.void` script with a patch
The patch is 328 lines while the drop-in script was only 152 lines.
I believe it is easier to wrap one's head around the drop-in wrapper
script (pun intended) rather than going through the 300+ lines of patch.
Specially that the upstream package hasn't been updated for years, there
isn't virtually any maintenance work to update the drop-in wrapper.
- Added a mechanism to get an up-to-date ToS from vendor's website.
Also verify if the checksum of the agreement has remained the same.
- Did NOT mark the package as restricted, because ToS allows redistribution.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (16 preceding siblings ...)
2024-10-28 20:58 ` shahab-vahedi
@ 2024-10-29 12:59 ` ahesford
2025-01-28 1:57 ` github-actions
18 siblings, 0 replies; 20+ messages in thread
From: ahesford @ 2024-10-29 12:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2444149512
Comment:
I think you misinterpreted my comments:
- Marking the package restricted is a precondition for consideration, without consideration for terms of service that may allow redistribution. It should be restricted because the build process is fragile. A precompiled deb offered by a corporate sponsor may disappear at any time, or may break and be unfixable becuase of other Void updates. We do not need to accept the possibility that officially repacking this software may break our repository at an inopportune moment.
- The `README.maintainer` does not belong in our repository. As I noted, users are expected to familiarize themselves with the maintenance of printers in CUPS should they wish to use it. Void is not a repository for general-purpose documentation.
- The INSTALL and REMOVE scripts remain inappropriate. Void does not alter general system configuration just by virtue of package installation or removal. Removing or adding printers when this package is installed or removed is not appropriate; users may wish to install or remove packages without rewriting printcap. This is especially true because the `-lpr` package is a dependency of the `-cups` package, but CUPS tends to own `/etc/printcap`; other packages shouldn't be modifying that file at all.
In addition:
- In the `-lpr` package, why are you rearranging the executable structure? If the package installs executables in `x86_64` and `i686` subdirectories, you should leave them where they are, but remove the unnecessary arch for each of the `i686` and `x86_64` packages.
- The wrapper script in `-cups` is poorly written (it doesn't even spell `lpdwrapper` correctly) and isn't really suitable for Void at all. The script should **never** copy files into the `/usr/share` or `/usr/lib*` trees, because those are owned by the package manager. The attempt to start, stop or restart services is also poorly conceived. The Void template should just symlink the PPD file(s) as appropriate, so that the package manager can manage those links.
- There is no need for `curl` or fetching the license file at runtime; you can just add the EULA URL to the `distfiles` array in each case, using the following construct:
```sh
distfiles="<regular-distfile>
https://support.brother.com/g/s/agreement/English_lpr/agree.html>eula-${version}.html"
skip_extraction="eula-${version}.html"
post_extract() {
sed -n -e <...> "${XBPS_SRCDISTDIR}/${pkgname}-${version}/eula-${version}.html" > LICENSE
}
```
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Add Printer Support: Brother DCP-L8410CDW
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
` (17 preceding siblings ...)
2024-10-29 12:59 ` ahesford
@ 2025-01-28 1:57 ` github-actions
18 siblings, 0 replies; 20+ messages in thread
From: github-actions @ 2025-01-28 1:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/51608#issuecomment-2617527507
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2025-01-28 1:57 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-02 14:58 [PR PATCH] Add Printer Support: Brother DCP-L8410CDW shahab-vahedi
2024-08-02 16:37 ` [PR PATCH] [Updated] " shahab-vahedi
2024-08-04 22:04 ` shahab-vahedi
2024-08-05 7:39 ` shahab-vahedi
2024-08-05 7:53 ` shahab-vahedi
2024-08-05 7:56 ` shahab-vahedi
2024-08-10 19:57 ` shahab-vahedi
2024-08-17 6:39 ` shahab-vahedi
2024-08-25 13:39 ` shahab-vahedi
2024-08-31 17:56 ` shahab-vahedi
2024-09-09 7:41 ` shahab-vahedi
2024-10-24 19:34 ` shahab-vahedi
2024-10-24 19:35 ` shahab-vahedi
2024-10-25 13:26 ` ahesford
2024-10-25 17:29 ` shahab-vahedi
2024-10-28 18:49 ` shahab-vahedi
2024-10-28 20:52 ` [PR PATCH] [Updated] " shahab-vahedi
2024-10-28 20:58 ` shahab-vahedi
2024-10-29 12:59 ` ahesford
2025-01-28 1:57 ` github-actions
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).