Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: brother-brscan5-1.2.12
@ 2023-06-03  1:40 CtrlC-Root
  2023-06-03  2:10 ` [PR REVIEW] " abenson
                   ` (39 more replies)
  0 siblings, 40 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03  1:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

There is a new pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.12
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 10778 bytes --]

From 1b0f3336ce6fff973b16b1794c2beb387e183be5 Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH 1/3] Add initial brother-brscan5 package based on similar
 brother-brscan4.

---
 srcpkgs/brother-brscan5/INSTALL     |  9 ++++
 srcpkgs/brother-brscan5/INSTALL.msg |  2 +
 srcpkgs/brother-brscan5/REMOVE      | 10 ++++
 srcpkgs/brother-brscan5/template    | 76 +++++++++++++++++++++++++++++
 4 files changed, 97 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/INSTALL.msg
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 000000000000..2e917d6143b7
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/INSTALL.msg b/srcpkgs/brother-brscan5/INSTALL.msg
new file mode 100644
index 000000000000..e83ad9d6e31b
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL.msg
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 000000000000..648ee0680275
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,10 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_TEMPFILE=`mktemp sane_dll_conf_XXXXXXXXXXX`
+	_SANE_CONF='/etc/sane.d/dll.conf'
+
+	( cat ${_SANE_CONF} | sed -e '/brother5/d' > ${_TEMPFILE} ) && cat ${_TEMPFILE} > ${_SANE_CONF}
+	rm ${_TEMPFILE}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 000000000000..6e54954d6472
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,76 @@
+# Template file for 'brother-brscan4'
+pkgname=brother-brscan5
+version=1.2.12
+revision=0
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/etc/opt/brother/scanner/brscan5/brscan5.ini
+ /etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+# EULA?
+#distfiles="https://support.brother.com/g/s/agreement/English_lpr/agree.html>LICENSE.html"
+#checksum="194f2a3b820f6533e7abbce7fdb727a1434a6e07f1851be696e40771e7a884ea"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="b40ef093be58d298e4429d8c5d4b7ecb48db58b64a5a01c203c9325c14997b47"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="7e98f36494e4145c9192067519fe8a0b105eb54ec9ba8ce6474bfc2882f07e67"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+    # based heavily on
+    # brother-brscan4 void package: https://github.com/void-linux/void-packages/tree/master/srcpkgs/brother-brscan4
+    # brother-brscan5 AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brscan5
+
+    # install libraries
+    vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+    ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+    ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+    for library in $_pkg_libraries; do
+	    vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+	    ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	    ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+    done
+
+    # install udev rules
+    pushd opt/brother/scanner/brscan5/udev-rules
+    sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+    vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+    popd
+
+    # install configuration files
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
+
+    vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	# install the licenses
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	# install config helper
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}

From 089e72fea5ecd0f692a1410c8235126db3194cda Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 21:31:53 -0400
Subject: [PATCH 2/3] Document hard-coded paths with comment.

---
 srcpkgs/brother-brscan5/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
index 6e54954d6472..099ca9f72f8e 100644
--- a/srcpkgs/brother-brscan5/template
+++ b/srcpkgs/brother-brscan5/template
@@ -37,7 +37,7 @@ else
 fi
 
 do_install() {
-    # based heavily on
+    # based heavily on:
     # brother-brscan4 void package: https://github.com/void-linux/void-packages/tree/master/srcpkgs/brother-brscan4
     # brother-brscan5 AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brscan5
 
@@ -59,6 +59,7 @@ do_install() {
     popd
 
     # install configuration files
+    # note: these locations are hard-coded in libsane-brother5.so
 	vmkdir etc/opt/brother/scanner/brscan5 755
 	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
 	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
@@ -66,7 +67,7 @@ do_install() {
     vmkdir opt/brother/scanner/brscan5 755
 	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
 
-	# install the licenses
+	# install licenses
 	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
 	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
 	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.

From 7efeae73c5e60a170a3673f085a4fa8db4007884 Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 21:39:12 -0400
Subject: [PATCH 3/3] Apply xlint feedback.

---
 srcpkgs/brother-brscan5/template | 44 ++++++++++++++++----------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
index 099ca9f72f8e..9466e7be4226 100644
--- a/srcpkgs/brother-brscan5/template
+++ b/srcpkgs/brother-brscan5/template
@@ -1,7 +1,7 @@
-# Template file for 'brother-brscan4'
+# Template file for 'brother-brscan5'
 pkgname=brother-brscan5
 version=1.2.12
-revision=0
+revision=1
 archs="i686 x86_64"
 depends="sane libusb-compat"
 short_desc="SANE scanner driver for brscan5-compatible printers"
@@ -37,34 +37,34 @@ else
 fi
 
 do_install() {
-    # based heavily on:
-    # brother-brscan4 void package: https://github.com/void-linux/void-packages/tree/master/srcpkgs/brother-brscan4
-    # brother-brscan5 AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brscan5
+	# based heavily on:
+	# brother-brscan4 void package: https://github.com/void-linux/void-packages/tree/master/srcpkgs/brother-brscan4
+	# brother-brscan5 AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brscan5
 
-    # install libraries
-    vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
-    ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
-    ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	# install libraries
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
 
-    for library in $_pkg_libraries; do
-	    vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
-	    ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
-	    ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
-    done
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
 
-    # install udev rules
-    pushd opt/brother/scanner/brscan5/udev-rules
-    sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
-    vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
-    popd
+	# install udev rules
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
 
-    # install configuration files
-    # note: these locations are hard-coded in libsane-brother5.so
+	# install configuration files
+	# note: these locations are hard-coded in libsane-brother5.so
 	vmkdir etc/opt/brother/scanner/brscan5 755
 	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
 	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
 
-    vmkdir opt/brother/scanner/brscan5 755
+	vmkdir opt/brother/scanner/brscan5 755
 	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
 
 	# install licenses

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
@ 2023-06-03  2:10 ` abenson
  2023-06-03  2:11 ` abenson
                   ` (38 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: abenson @ 2023-06-03  2:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New review comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215127987

Comment:
Is there no other way to do this? It can't go into a different file?

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
  2023-06-03  2:10 ` [PR REVIEW] " abenson
@ 2023-06-03  2:11 ` abenson
  2023-06-03  2:12 ` abenson
                   ` (37 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: abenson @ 2023-06-03  2:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 236 bytes --]

New review comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215130280

Comment:
This could be simplified with `-i`. 

`sed -i -e '/brother5/d' /etc/sane.d/dll.conf`


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
  2023-06-03  2:10 ` [PR REVIEW] " abenson
  2023-06-03  2:11 ` abenson
@ 2023-06-03  2:12 ` abenson
  2023-06-03  2:16 ` CtrlC-Root
                   ` (36 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: abenson @ 2023-06-03  2:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

New review comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215130714

Comment:
These commented lines should be removed.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (2 preceding siblings ...)
  2023-06-03  2:12 ` abenson
@ 2023-06-03  2:16 ` CtrlC-Root
  2023-06-03  2:16 ` abenson
                   ` (35 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03  2:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 430 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215131157

Comment:
I copied the behavior of the Void brother-brscan4 package here. Personally I think a `/etc/sane.d/dll.d/` directory would be better, and this is what the Arch packages do, but I think we'd have to modify the sane packages to support this out of the box.

Is there a better way?

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (3 preceding siblings ...)
  2023-06-03  2:16 ` CtrlC-Root
@ 2023-06-03  2:16 ` abenson
  2023-06-03  2:17 ` [PR PATCH] [Updated] " CtrlC-Root
                   ` (34 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: abenson @ 2023-06-03  2:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

New comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1574571378

Comment:
[Squash all the commits](https://www.git-tower.com/learn/git/faq/git-squash) into a single commit. The title of this PR is a good example of what the subject for the commit should be.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (4 preceding siblings ...)
  2023-06-03  2:16 ` abenson
@ 2023-06-03  2:17 ` CtrlC-Root
  2023-06-03  2:17 ` [PR REVIEW] " CtrlC-Root
                   ` (33 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03  2:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.12
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 5241 bytes --]

From a3569d5f4785f05312a2b795497b5adeb9ccbf30 Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] Add initial brother-brscan5 package based on similar
 brother-brscan4.

---
 srcpkgs/brother-brscan5/INSTALL     |  9 ++++
 srcpkgs/brother-brscan5/INSTALL.msg |  2 +
 srcpkgs/brother-brscan5/REMOVE      | 10 ++++
 srcpkgs/brother-brscan5/template    | 73 +++++++++++++++++++++++++++++
 4 files changed, 94 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/INSTALL.msg
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 000000000000..2e917d6143b7
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/INSTALL.msg b/srcpkgs/brother-brscan5/INSTALL.msg
new file mode 100644
index 000000000000..e83ad9d6e31b
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL.msg
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 000000000000..648ee0680275
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,10 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_TEMPFILE=`mktemp sane_dll_conf_XXXXXXXXXXX`
+	_SANE_CONF='/etc/sane.d/dll.conf'
+
+	( cat ${_SANE_CONF} | sed -e '/brother5/d' > ${_TEMPFILE} ) && cat ${_TEMPFILE} > ${_SANE_CONF}
+	rm ${_TEMPFILE}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 000000000000..9fade4cd858d
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,73 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.12
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/etc/opt/brother/scanner/brscan5/brscan5.ini
+ /etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="b40ef093be58d298e4429d8c5d4b7ecb48db58b64a5a01c203c9325c14997b47"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="7e98f36494e4145c9192067519fe8a0b105eb54ec9ba8ce6474bfc2882f07e67"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	# based heavily on:
+	# brother-brscan4 void package: https://github.com/void-linux/void-packages/tree/master/srcpkgs/brother-brscan4
+	# brother-brscan5 AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brscan5
+
+	# install libraries
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	# install udev rules
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# install configuration files
+	# note: these locations are hard-coded in libsane-brother5.so
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	# install licenses
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	# install config helper
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (5 preceding siblings ...)
  2023-06-03  2:17 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2023-06-03  2:17 ` CtrlC-Root
  2023-06-03  2:18 ` CtrlC-Root
                   ` (32 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03  2:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215131309

Comment:
Done, good call.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (6 preceding siblings ...)
  2023-06-03  2:17 ` [PR REVIEW] " CtrlC-Root
@ 2023-06-03  2:18 ` CtrlC-Root
  2023-06-03  2:19 ` [PR PATCH] [Updated] " CtrlC-Root
                   ` (31 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03  2:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215131366

Comment:
Again I copied the brother-brscan4 package here. I have no particular preference so I'm happy to use `-i` here if you think it's better.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (7 preceding siblings ...)
  2023-06-03  2:18 ` CtrlC-Root
@ 2023-06-03  2:19 ` CtrlC-Root
  2023-06-03  2:19 ` CtrlC-Root
                   ` (30 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03  2:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.12
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 5206 bytes --]

From 1d8f15498b0573cc197729c8295daac6c8fa473a Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] New package: brother-brscan5-1.2.12

---
 srcpkgs/brother-brscan5/INSTALL     |  9 ++++
 srcpkgs/brother-brscan5/INSTALL.msg |  2 +
 srcpkgs/brother-brscan5/REMOVE      | 10 ++++
 srcpkgs/brother-brscan5/template    | 73 +++++++++++++++++++++++++++++
 4 files changed, 94 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/INSTALL.msg
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 000000000000..2e917d6143b7
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/INSTALL.msg b/srcpkgs/brother-brscan5/INSTALL.msg
new file mode 100644
index 000000000000..e83ad9d6e31b
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL.msg
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 000000000000..648ee0680275
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,10 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_TEMPFILE=`mktemp sane_dll_conf_XXXXXXXXXXX`
+	_SANE_CONF='/etc/sane.d/dll.conf'
+
+	( cat ${_SANE_CONF} | sed -e '/brother5/d' > ${_TEMPFILE} ) && cat ${_TEMPFILE} > ${_SANE_CONF}
+	rm ${_TEMPFILE}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 000000000000..9fade4cd858d
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,73 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.12
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/etc/opt/brother/scanner/brscan5/brscan5.ini
+ /etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="b40ef093be58d298e4429d8c5d4b7ecb48db58b64a5a01c203c9325c14997b47"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="7e98f36494e4145c9192067519fe8a0b105eb54ec9ba8ce6474bfc2882f07e67"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	# based heavily on:
+	# brother-brscan4 void package: https://github.com/void-linux/void-packages/tree/master/srcpkgs/brother-brscan4
+	# brother-brscan5 AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brscan5
+
+	# install libraries
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	# install udev rules
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# install configuration files
+	# note: these locations are hard-coded in libsane-brother5.so
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	# install licenses
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	# install config helper
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (8 preceding siblings ...)
  2023-06-03  2:19 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2023-06-03  2:19 ` CtrlC-Root
  2023-06-03  2:20 ` [PR REVIEW] " abenson
                   ` (29 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03  2:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1574572052

Comment:
> [Squash all the commits](https://www.git-tower.com/learn/git/faq/git-squash) into a single commit. The title of this PR is a good example of what the subject for the commit should be.

Done as well.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (9 preceding siblings ...)
  2023-06-03  2:19 ` CtrlC-Root
@ 2023-06-03  2:20 ` abenson
  2023-06-03  4:29 ` classabbyamp
                   ` (28 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: abenson @ 2023-06-03  2:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 190 bytes --]

New review comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215131646

Comment:
It saves having to bother with a tempfile.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (10 preceding siblings ...)
  2023-06-03  2:20 ` [PR REVIEW] " abenson
@ 2023-06-03  4:29 ` classabbyamp
  2023-06-03 13:15 ` [PR PATCH] [Updated] " CtrlC-Root
                   ` (27 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: classabbyamp @ 2023-06-03  4:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215199526

Comment:
almost all of these comments are self-explanatory and not necessary

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (11 preceding siblings ...)
  2023-06-03  4:29 ` classabbyamp
@ 2023-06-03 13:15 ` CtrlC-Root
  2023-06-03 13:15 ` [PR REVIEW] " CtrlC-Root
                   ` (26 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03 13:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.12
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 5206 bytes --]

From d7e6eb31bb5a982258db8784eebdf9f4d3f29350 Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] New package: brother-brscan5-1.2.12

---
 srcpkgs/brother-brscan5/INSTALL     |  9 ++++
 srcpkgs/brother-brscan5/INSTALL.msg |  2 +
 srcpkgs/brother-brscan5/REMOVE      | 10 ++++
 srcpkgs/brother-brscan5/template    | 73 +++++++++++++++++++++++++++++
 4 files changed, 94 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/INSTALL.msg
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 000000000000..2e917d6143b7
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/INSTALL.msg b/srcpkgs/brother-brscan5/INSTALL.msg
new file mode 100644
index 000000000000..e83ad9d6e31b
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL.msg
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 000000000000..648ee0680275
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,10 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_TEMPFILE=`mktemp sane_dll_conf_XXXXXXXXXXX`
+	_SANE_CONF='/etc/sane.d/dll.conf'
+
+	( cat ${_SANE_CONF} | sed -e '/brother5/d' > ${_TEMPFILE} ) && cat ${_TEMPFILE} > ${_SANE_CONF}
+	rm ${_TEMPFILE}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 000000000000..9fade4cd858d
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,73 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.12
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/etc/opt/brother/scanner/brscan5/brscan5.ini
+ /etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="b40ef093be58d298e4429d8c5d4b7ecb48db58b64a5a01c203c9325c14997b47"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="7e98f36494e4145c9192067519fe8a0b105eb54ec9ba8ce6474bfc2882f07e67"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	# based heavily on:
+	# brother-brscan4 void package: https://github.com/void-linux/void-packages/tree/master/srcpkgs/brother-brscan4
+	# brother-brscan5 AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brscan5
+
+	# install libraries
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	# install udev rules
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# install configuration files
+	# note: these locations are hard-coded in libsane-brother5.so
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	# install licenses
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	# install config helper
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (12 preceding siblings ...)
  2023-06-03 13:15 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2023-06-03 13:15 ` CtrlC-Root
  2023-06-03 13:15 ` CtrlC-Root
                   ` (25 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03 13:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215518027

Comment:
Ok, done.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (13 preceding siblings ...)
  2023-06-03 13:15 ` [PR REVIEW] " CtrlC-Root
@ 2023-06-03 13:15 ` CtrlC-Root
  2023-06-03 13:17 ` CtrlC-Root
                   ` (24 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03 13:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215518062

Comment:
Ok, removed.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (14 preceding siblings ...)
  2023-06-03 13:15 ` CtrlC-Root
@ 2023-06-03 13:17 ` CtrlC-Root
  2023-06-03 13:17 ` [PR PATCH] [Updated] " CtrlC-Root
                   ` (23 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03 13:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215518243

Comment:
Given `brother-brscan3` and `brother-brscan4` both manage entries in `/etc/sane.d/dll.conf` and that we'd likely have to modify other packages in order to change this behavior (i.e. `sane`) I think we should keep it as is.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (15 preceding siblings ...)
  2023-06-03 13:17 ` CtrlC-Root
@ 2023-06-03 13:17 ` CtrlC-Root
  2023-06-03 13:24 ` [PR REVIEW] " classabbyamp
                   ` (22 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03 13:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.12
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 4971 bytes --]

From aa01538bf361c56cf94d2e2c6e0f30c6d13e168c Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] New package: brother-brscan5-1.2.12

---
 srcpkgs/brother-brscan5/INSTALL     |  9 ++++
 srcpkgs/brother-brscan5/INSTALL.msg |  2 +
 srcpkgs/brother-brscan5/REMOVE      |  7 +++
 srcpkgs/brother-brscan5/template    | 68 +++++++++++++++++++++++++++++
 4 files changed, 86 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/INSTALL.msg
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 000000000000..2e917d6143b7
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/INSTALL.msg b/srcpkgs/brother-brscan5/INSTALL.msg
new file mode 100644
index 000000000000..e83ad9d6e31b
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL.msg
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 000000000000..b762f8954ee6
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,7 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+    sed -i -e '/brother5/d' ${_SANE_CONF}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 000000000000..e0f59a54c0af
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,68 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.12
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/etc/opt/brother/scanner/brscan5/brscan5.ini
+ /etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="b40ef093be58d298e4429d8c5d4b7ecb48db58b64a5a01c203c9325c14997b47"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="7e98f36494e4145c9192067519fe8a0b105eb54ec9ba8ce6474bfc2882f07e67"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	# based heavily on:
+	# brother-brscan4 void package: https://github.com/void-linux/void-packages/tree/master/srcpkgs/brother-brscan4
+	# brother-brscan5 AUR package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=brscan5
+
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# note: configuration file locations are hard-coded in libsane-brother5.so
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (16 preceding siblings ...)
  2023-06-03 13:17 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2023-06-03 13:24 ` classabbyamp
  2023-06-03 13:26 ` [PR PATCH] [Updated] " CtrlC-Root
                   ` (21 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: classabbyamp @ 2023-06-03 13:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215521929

Comment:
```suggestion
```


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (17 preceding siblings ...)
  2023-06-03 13:24 ` [PR REVIEW] " classabbyamp
@ 2023-06-03 13:26 ` CtrlC-Root
  2023-06-03 13:26 ` [PR REVIEW] " CtrlC-Root
                   ` (20 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03 13:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.12
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 4738 bytes --]

From c94cd521803ab7d2eaa26086891677aba2d8d9f1 Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] New package: brother-brscan5-1.2.12

---
 srcpkgs/brother-brscan5/INSTALL     |  9 ++++
 srcpkgs/brother-brscan5/INSTALL.msg |  2 +
 srcpkgs/brother-brscan5/REMOVE      |  7 ++++
 srcpkgs/brother-brscan5/template    | 64 +++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/INSTALL.msg
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 000000000000..2e917d6143b7
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/INSTALL.msg b/srcpkgs/brother-brscan5/INSTALL.msg
new file mode 100644
index 000000000000..e83ad9d6e31b
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL.msg
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 000000000000..b762f8954ee6
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,7 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+    sed -i -e '/brother5/d' ${_SANE_CONF}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 000000000000..171c0206bb90
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,64 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.12
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/etc/opt/brother/scanner/brscan5/brscan5.ini
+ /etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="b40ef093be58d298e4429d8c5d4b7ecb48db58b64a5a01c203c9325c14997b47"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="7e98f36494e4145c9192067519fe8a0b105eb54ec9ba8ce6474bfc2882f07e67"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# note: configuration file locations are hard-coded in libsane-brother5.so
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (18 preceding siblings ...)
  2023-06-03 13:26 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2023-06-03 13:26 ` CtrlC-Root
  2023-06-06 17:33 ` CtrlC-Root
                   ` (19 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-03 13:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1215525294

Comment:
Ok, dropped those as well.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (19 preceding siblings ...)
  2023-06-03 13:26 ` [PR REVIEW] " CtrlC-Root
@ 2023-06-06 17:33 ` CtrlC-Root
  2023-08-25 16:54 ` CtrlC-Root
                   ` (18 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-06-06 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1579186071

Comment:
@abenson @classabbyamp What can I do next, if anything, to help get this PR merged?

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (20 preceding siblings ...)
  2023-06-06 17:33 ` CtrlC-Root
@ 2023-08-25 16:54 ` CtrlC-Root
  2023-08-27 14:35 ` DerAndereJohannes
                   ` (17 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-08-25 16:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1693666367

Comment:
Would it be possible to merge this?

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (21 preceding siblings ...)
  2023-08-25 16:54 ` CtrlC-Root
@ 2023-08-27 14:35 ` DerAndereJohannes
  2023-08-27 14:42 ` DerAndereJohannes
                   ` (16 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: DerAndereJohannes @ 2023-08-27 14:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]

New comment by DerAndereJohannes on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1694684318

Comment:
Thanks for working on this package. 

Just tried this package from my machine (x86, glibc). All the scanning functionality over network seems to be working fine. The only thing I was not able to get working is the -q option under the `brsaneconfig5` executable with the following error code: `sh: 1: /opt/brother/scanner/brscan5/brscan_cnetconfig: not found`. 

It seems the package from the brother website includes more binary executables such as `brscan_cnetconfig` and `brscan_gnetconfig` (is this one for gtk?). These probably just have to live in the opt folder too `/opt/brother/scanner/brscan5/<binary>` as it is coded into `brsaneconfig5`.  Then again, trying this out and copying these files does clear the error, but for some strange reason my working device does not then show when executing `brsaneconfig5 -q`.

I think this is because the command is looking at the brsanenetdevice.cfg, again, in the `/opt/brother/scanner/brscan5` folder rather than in `/etc/opt` ... Perhaps keeping all the files that are under `/etc/opt/...` in `/opt/...` and creating symlinks from the `/etc/opt` location afterwards would be the most elegant solution here?

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (22 preceding siblings ...)
  2023-08-27 14:35 ` DerAndereJohannes
@ 2023-08-27 14:42 ` DerAndereJohannes
  2023-08-27 15:03 ` CtrlC-Root
                   ` (15 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: DerAndereJohannes @ 2023-08-27 14:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]

New comment by DerAndereJohannes on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1694684318

Comment:
Thanks for working on this package. 

Just tried this package from my machine (x86, glibc). All the scanning functionality over network seems to be working fine. The only thing I was not able to get working is the -q option under the `brsaneconfig5` executable with the following error code: `sh: 1: /opt/brother/scanner/brscan5/brscan_cnetconfig: not found`. 

It seems the package from the brother website includes more binary executables such as `brscan_cnetconfig` and `brscan_gnetconfig` (is this one for gtk?). These probably just have to live in the opt folder too `/opt/brother/scanner/brscan5/<binary>` as it is coded into `brsaneconfig5`.  Then again, trying this out and copying these files does clear the error, but for some strange reason my working device does not then show when executing `brsaneconfig5 -q`.

I think this is because the command is looking at the brsanenetdevice.cfg, again, in the `/opt/brother/scanner/brscan5` folder rather than in `/etc/opt` ... Perhaps keeping all the files that are under `/etc/opt/...` in `/opt/...` and creating symlinks to the `/etc/opt` location afterwards would be the most elegant solution here?

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (23 preceding siblings ...)
  2023-08-27 14:42 ` DerAndereJohannes
@ 2023-08-27 15:03 ` CtrlC-Root
  2023-08-27 18:56 ` DerAndereJohannes
                   ` (14 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-08-27 15:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1694690529

Comment:
> Thanks for working on this package.
> 
> Just tried this package from my machine (x86, glibc). All the scanning functionality over network seems to be working fine. The only thing I was not able to get working is the -q option under the `brsaneconfig5` executable with the following error code: `sh: 1: /opt/brother/scanner/brscan5/brscan_cnetconfig: not found`.
> 
> It seems the package from the brother website includes more binary executables such as `brscan_cnetconfig` and `brscan_gnetconfig` (is this one for gtk?). These probably just have to live in the opt folder too `/opt/brother/scanner/brscan5/<binary>` as it is coded into `brsaneconfig5`. Then again, trying this out and copying these files does clear the error, but for some strange reason my working device does not then show when executing `brsaneconfig5 -q`.

Thank you for testing this and giving me detailed notes on what's not working. This will be helpful to further improve it.

> I think this is because the command is looking at the brsanenetdevice.cfg, again, in the `/opt/brother/scanner/brscan5` folder rather than in `/etc/opt` ... Perhaps keeping all the files that are under `/etc/opt/...` in `/opt/...` and creating symlinks to the `/etc/opt` location afterwards would be the most elegant solution here?

I'll try this approach and see how it goes. I don't have a network scanner to test with though so I'll need help to verify that works completely. I can at least make sure the commands you pointed out work without errors.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (24 preceding siblings ...)
  2023-08-27 15:03 ` CtrlC-Root
@ 2023-08-27 18:56 ` DerAndereJohannes
  2023-08-28 19:43 ` [PR PATCH] [Updated] " CtrlC-Root
                   ` (13 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: DerAndereJohannes @ 2023-08-27 18:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3804 bytes --]

New comment by DerAndereJohannes on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1694736834

Comment:
I had some time this evening. I went ahead to where the `brsaneconfig5 -q` command works correctly now (which completes it). It turns out that it uses avahi and that it also required the `brsaneconfig5` file to be present in the `/opt/...` folder tree... Technically avahi is not strictly necessary for the functioning of the package, so im not sure if it should be depends or as an optional addition.  I saw that there was also a new version available of the brother-brscan5 software (I am not sure if this would mean that the PR would have to change name). Below you can see my diff. It would be awesome to know if this looks any good. With this though, the network portion of this package should be sorted.

```
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
index 171c0206bb..bc56e19e51 100644
--- a/srcpkgs/brother-brscan5/template
+++ b/srcpkgs/brother-brscan5/template
@@ -1,17 +1,17 @@
 # Template file for 'brother-brscan5'
 pkgname=brother-brscan5
-version=1.2.12
+version=1.2.13
 revision=1
 archs="i686 x86_64"
-depends="sane libusb-compat"
+depends="sane libusb-compat avahi"
 short_desc="SANE scanner driver for brscan5-compatible printers"
 maintainer="Alexandru Barbur <alex@ctrlc.name>"
 license="custom:EULA"
 homepage="https://support.brother.com/"
 repository="nonfree"
 nopie=yes
-conf_files="/etc/opt/brother/scanner/brscan5/brscan5.ini
- /etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+conf_files="/opt/brother/scanner/brscan5/brscan5.ini
+ /opt/brother/scanner/brscan5/brsanenetdevice.cfg
  /opt/brother/scanner/brscan5/models/*.ini"
 
 _sane_library="libsane-brother5.so.1.0.7"
@@ -23,12 +23,12 @@ _pkg_libraries="libLxBsScanCoreApi.so.3.2.0
 if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
 	_rpmpkgid="0.x86_64"
 	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
-	checksum="b40ef093be58d298e4429d8c5d4b7ecb48db58b64a5a01c203c9325c14997b47"
+	checksum="572d24efc23de14933cb15f8c8be20575af07d7aff32c3ddf0633bacffe9e098"
 	_rpmlibdir="usr/lib64"
 else
 	_rpmpkgid="0.i386"
 	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
-	checksum="7e98f36494e4145c9192067519fe8a0b105eb54ec9ba8ce6474bfc2882f07e67"
+	checksum="4cdca918fb7f994fc1e081a3a709db8f5b4420406d26aa04a6effc941e468fc2"
 	_rpmlibdir="usr/lib"
 fi
 
@@ -49,9 +49,16 @@ do_install() {
 	popd
 
 	# note: configuration file locations are hard-coded in libsane-brother5.so
+	vinstall opt/brother/scanner/brscan5/brsaneconfig5 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_cnetconfig 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_gnetconfig 755 opt/brother/scanner/brscan5
+
 	vmkdir etc/opt/brother/scanner/brscan5 755
-	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
-	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
+	ln -sf /opt/brother/scanner/brscan5/brscan5.ini ${DESTDIR}/etc/opt/brother/scanner/brscan5/brscan5.ini
+	ln -sf /opt/brother/scanner/brscan5/brsanenetdevice.cfg ${DESTDIR}/etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+	ln -sf /opt/brother/scanner/brscan5/models ${DESTDIR}/etc/opt/brother/scanner/brscan5/models
 
 	vmkdir opt/brother/scanner/brscan5 755
 	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
```

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.12
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (25 preceding siblings ...)
  2023-08-27 18:56 ` DerAndereJohannes
@ 2023-08-28 19:43 ` CtrlC-Root
  2023-08-28 19:44 ` New package: brother-brscan5-1.2.13 CtrlC-Root
                   ` (12 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-08-28 19:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.12
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 5315 bytes --]

From db032530293e52e6c6dda6cbd965c5ddeb11fd5a Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] New package: brother-brscan5-1.2.13

---
 srcpkgs/brother-brscan5/INSTALL     |  9 ++++
 srcpkgs/brother-brscan5/INSTALL.msg |  2 +
 srcpkgs/brother-brscan5/REMOVE      |  7 +++
 srcpkgs/brother-brscan5/template    | 71 +++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/INSTALL.msg
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 0000000000000..2e917d6143b7d
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/INSTALL.msg b/srcpkgs/brother-brscan5/INSTALL.msg
new file mode 100644
index 0000000000000..e83ad9d6e31b1
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL.msg
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 0000000000000..b762f8954ee68
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,7 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+    sed -i -e '/brother5/d' ${_SANE_CONF}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 0000000000000..b7170e61d11a8
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,71 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.13
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/opt/brother/scanner/brscan5/brscan5.ini
+ /opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="572d24efc23de14933cb15f8c8be20575af07d7aff32c3ddf0633bacffe9e098"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="4cdca918fb7f994fc1e081a3a709db8f5b4420406d26aa04a6effc941e468fc2"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# note: configuration file locations are hard-coded in libsane-brother5.so
+	vinstall opt/brother/scanner/brscan5/brsaneconfig5 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_cnetconfig 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_gnetconfig 755 opt/brother/scanner/brscan5
+
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	ln -sf /opt/brother/scanner/brscan5/brscan5.ini ${DESTDIR}/etc/opt/brother/scanner/brscan5/brscan5.ini
+	ln -sf /opt/brother/scanner/brscan5/brsanenetdevice.cfg ${DESTDIR}/etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+	ln -sf /opt/brother/scanner/brscan5/models ${DESTDIR}/etc/opt/brother/scanner/brscan5/models
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (26 preceding siblings ...)
  2023-08-28 19:43 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2023-08-28 19:44 ` CtrlC-Root
  2023-08-28 19:44 ` CtrlC-Root
                   ` (11 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-08-28 19:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 4019 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1696284731

Comment:
> I had some time this evening. I went ahead to where the `brsaneconfig5 -q` command works correctly now (which completes it). It turns out that it uses avahi and that it also required the `brsaneconfig5` file to be present in the `/opt/...` folder tree... Technically avahi is not strictly necessary for the functioning of the package, so im not sure if it should be depends or as an optional addition. I saw that there was also a new version available of the brother-brscan5 software (I am not sure if this would mean that the PR would have to change name). Below you can see my diff. It would be awesome to know if this looks any good. With this though, the network portion of this package should be sorted.
> 
> ```
> diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
> index 171c0206bb..bc56e19e51 100644
> --- a/srcpkgs/brother-brscan5/template
> +++ b/srcpkgs/brother-brscan5/template
> @@ -1,17 +1,17 @@
>  # Template file for 'brother-brscan5'
>  pkgname=brother-brscan5
> -version=1.2.12
> +version=1.2.13
>  revision=1
>  archs="i686 x86_64"
> -depends="sane libusb-compat"
> +depends="sane libusb-compat avahi"
>  short_desc="SANE scanner driver for brscan5-compatible printers"
>  maintainer="Alexandru Barbur <alex@ctrlc.name>"
>  license="custom:EULA"
>  homepage="https://support.brother.com/"
>  repository="nonfree"
>  nopie=yes
> -conf_files="/etc/opt/brother/scanner/brscan5/brscan5.ini
> - /etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
> +conf_files="/opt/brother/scanner/brscan5/brscan5.ini
> + /opt/brother/scanner/brscan5/brsanenetdevice.cfg
>   /opt/brother/scanner/brscan5/models/*.ini"
>  
>  _sane_library="libsane-brother5.so.1.0.7"
> @@ -23,12 +23,12 @@ _pkg_libraries="libLxBsScanCoreApi.so.3.2.0
>  if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
>  	_rpmpkgid="0.x86_64"
>  	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
> -	checksum="b40ef093be58d298e4429d8c5d4b7ecb48db58b64a5a01c203c9325c14997b47"
> +	checksum="572d24efc23de14933cb15f8c8be20575af07d7aff32c3ddf0633bacffe9e098"
>  	_rpmlibdir="usr/lib64"
>  else
>  	_rpmpkgid="0.i386"
>  	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
> -	checksum="7e98f36494e4145c9192067519fe8a0b105eb54ec9ba8ce6474bfc2882f07e67"
> +	checksum="4cdca918fb7f994fc1e081a3a709db8f5b4420406d26aa04a6effc941e468fc2"
>  	_rpmlibdir="usr/lib"
>  fi
>  
> @@ -49,9 +49,16 @@ do_install() {
>  	popd
>  
>  	# note: configuration file locations are hard-coded in libsane-brother5.so
> +	vinstall opt/brother/scanner/brscan5/brsaneconfig5 755 opt/brother/scanner/brscan5
> +	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 opt/brother/scanner/brscan5
> +	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 opt/brother/scanner/brscan5
> +	vinstall opt/brother/scanner/brscan5/brscan_cnetconfig 755 opt/brother/scanner/brscan5
> +	vinstall opt/brother/scanner/brscan5/brscan_gnetconfig 755 opt/brother/scanner/brscan5
> +
>  	vmkdir etc/opt/brother/scanner/brscan5 755
> -	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 etc/opt/brother/scanner/brscan5
> -	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 etc/opt/brother/scanner/brscan5
> +	ln -sf /opt/brother/scanner/brscan5/brscan5.ini ${DESTDIR}/etc/opt/brother/scanner/brscan5/brscan5.ini
> +	ln -sf /opt/brother/scanner/brscan5/brsanenetdevice.cfg ${DESTDIR}/etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
> +	ln -sf /opt/brother/scanner/brscan5/models ${DESTDIR}/etc/opt/brother/scanner/brscan5/models
>  
>  	vmkdir opt/brother/scanner/brscan5 755
>  	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
> ```

Well I applied your changes and verified this still works with the Brother ADS-1200 I have.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (27 preceding siblings ...)
  2023-08-28 19:44 ` New package: brother-brscan5-1.2.13 CtrlC-Root
@ 2023-08-28 19:44 ` CtrlC-Root
  2023-08-28 19:46 ` CtrlC-Root
                   ` (10 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-08-28 19:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1696284731

Comment:
> I had some time this evening. I went ahead to where the `brsaneconfig5 -q` command works correctly now (which completes it). It turns out that it uses avahi and that it also required the `brsaneconfig5` file to be present in the `/opt/...` folder tree... Technically avahi is not strictly necessary for the functioning of the package, so im not sure if it should be depends or as an optional addition. I saw that there was also a new version available of the brother-brscan5 software (I am not sure if this would mean that the PR would have to change name). Below you can see my diff. It would be awesome to know if this looks any good. With this though, the network portion of this package should be sorted.

Well I applied your changes and verified this still works with the Brother ADS-1200 I have. Thank you so much for helping improve this!

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (28 preceding siblings ...)
  2023-08-28 19:44 ` CtrlC-Root
@ 2023-08-28 19:46 ` CtrlC-Root
  2023-10-16 22:07 ` [PR PATCH] [Updated] " CtrlC-Root
                   ` (9 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-08-28 19:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1696291753

Comment:
Hmm, that lint step seems to have failed due to a network issue. I ran `xlint` locally against the template file and it reports no issues.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (29 preceding siblings ...)
  2023-08-28 19:46 ` CtrlC-Root
@ 2023-10-16 22:07 ` CtrlC-Root
  2023-10-16 22:21 ` CtrlC-Root
                   ` (8 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-10-16 22:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.13
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 5315 bytes --]

From 35c4dd96508d65918e79166b402ab779866378b6 Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] New package: brother-brscan5-1.2.13

---
 srcpkgs/brother-brscan5/INSTALL     |  9 ++++
 srcpkgs/brother-brscan5/INSTALL.msg |  2 +
 srcpkgs/brother-brscan5/REMOVE      |  7 +++
 srcpkgs/brother-brscan5/template    | 71 +++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/INSTALL.msg
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 0000000000000..2e917d6143b7d
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/INSTALL.msg b/srcpkgs/brother-brscan5/INSTALL.msg
new file mode 100644
index 0000000000000..e83ad9d6e31b1
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL.msg
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 0000000000000..b762f8954ee68
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,7 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+    sed -i -e '/brother5/d' ${_SANE_CONF}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 0000000000000..b7170e61d11a8
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,71 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.13
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/opt/brother/scanner/brscan5/brscan5.ini
+ /opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="572d24efc23de14933cb15f8c8be20575af07d7aff32c3ddf0633bacffe9e098"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="4cdca918fb7f994fc1e081a3a709db8f5b4420406d26aa04a6effc941e468fc2"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# note: configuration file locations are hard-coded in libsane-brother5.so
+	vinstall opt/brother/scanner/brscan5/brsaneconfig5 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_cnetconfig 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_gnetconfig 755 opt/brother/scanner/brscan5
+
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	ln -sf /opt/brother/scanner/brscan5/brscan5.ini ${DESTDIR}/etc/opt/brother/scanner/brscan5/brscan5.ini
+	ln -sf /opt/brother/scanner/brscan5/brsanenetdevice.cfg ${DESTDIR}/etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+	ln -sf /opt/brother/scanner/brscan5/models ${DESTDIR}/etc/opt/brother/scanner/brscan5/models
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (30 preceding siblings ...)
  2023-10-16 22:07 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2023-10-16 22:21 ` CtrlC-Root
  2024-01-15  1:48 ` github-actions
                   ` (7 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2023-10-16 22:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 174 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1765364343

Comment:
Any blockers to merging this?

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (31 preceding siblings ...)
  2023-10-16 22:21 ` CtrlC-Root
@ 2024-01-15  1:48 ` github-actions
  2024-01-15 17:30 ` CtrlC-Root
                   ` (6 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: github-actions @ 2024-01-15  1:48 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/44235#issuecomment-1891178411

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] 41+ messages in thread

* Re: New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (32 preceding siblings ...)
  2024-01-15  1:48 ` github-actions
@ 2024-01-15 17:30 ` CtrlC-Root
  2024-01-16 23:22 ` [PR REVIEW] " classabbyamp
                   ` (5 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2024-01-15 17:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

New comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#issuecomment-1892559776

Comment:
Still using this package daily. Not sure what I can do to try and get it merged but open to any suggestions or feedback.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (33 preceding siblings ...)
  2024-01-15 17:30 ` CtrlC-Root
@ 2024-01-16 23:22 ` classabbyamp
  2024-01-17  1:17 ` [PR PATCH] [Updated] " CtrlC-Root
                   ` (4 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: classabbyamp @ 2024-01-16 23:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1454194011

Comment:
make this `files/README.voidlinux` and use `vdoc` to install it

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (34 preceding siblings ...)
  2024-01-16 23:22 ` [PR REVIEW] " classabbyamp
@ 2024-01-17  1:17 ` CtrlC-Root
  2024-01-17  1:17 ` [PR REVIEW] " CtrlC-Root
                   ` (3 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2024-01-17  1:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.13
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

EDIT: Someone else tested part of the network functionality (see https://github.com/void-linux/void-packages/pull/44235#issuecomment-1694736834).

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 5451 bytes --]

From a6f99d6370f8a5f2b94f571b232b024d165151b7 Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] New package: brother-brscan5-1.2.13

---
 srcpkgs/brother-brscan5/INSTALL               |  9 +++
 srcpkgs/brother-brscan5/REMOVE                |  7 ++
 .../brother-brscan5/files/README.voidlinux    |  2 +
 srcpkgs/brother-brscan5/template              | 75 +++++++++++++++++++
 4 files changed, 93 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/files/README.voidlinux
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 0000000000000..2e917d6143b7d
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 0000000000000..b762f8954ee68
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,7 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+    sed -i -e '/brother5/d' ${_SANE_CONF}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/files/README.voidlinux b/srcpkgs/brother-brscan5/files/README.voidlinux
new file mode 100644
index 0000000000000..e83ad9d6e31b1
--- /dev/null
+++ b/srcpkgs/brother-brscan5/files/README.voidlinux
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 0000000000000..e74109b2068d2
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,75 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.13
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/opt/brother/scanner/brscan5/brscan5.ini
+ /opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="572d24efc23de14933cb15f8c8be20575af07d7aff32c3ddf0633bacffe9e098"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="4cdca918fb7f994fc1e081a3a709db8f5b4420406d26aa04a6effc941e468fc2"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# note: configuration file locations are hard-coded in libsane-brother5.so
+	vinstall opt/brother/scanner/brscan5/brsaneconfig5 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_cnetconfig 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_gnetconfig 755 opt/brother/scanner/brscan5
+
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	ln -sf /opt/brother/scanner/brscan5/brscan5.ini ${DESTDIR}/etc/opt/brother/scanner/brscan5/brscan5.ini
+	ln -sf /opt/brother/scanner/brscan5/brsanenetdevice.cfg ${DESTDIR}/etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+	ln -sf /opt/brother/scanner/brscan5/models ${DESTDIR}/etc/opt/brother/scanner/brscan5/models
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}
+
+post_install() {
+    vdoc "${FILESDIR}/README.voidlinux"
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (35 preceding siblings ...)
  2024-01-17  1:17 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2024-01-17  1:17 ` CtrlC-Root
  2024-01-17  1:18 ` CtrlC-Root
                   ` (2 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2024-01-17  1:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1454301188

Comment:
Done.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR REVIEW] New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (36 preceding siblings ...)
  2024-01-17  1:17 ` [PR REVIEW] " CtrlC-Root
@ 2024-01-17  1:18 ` CtrlC-Root
  2024-01-17  1:20 ` [PR PATCH] [Updated] " CtrlC-Root
  2024-01-17  1:42 ` [PR PATCH] [Merged]: " classabbyamp
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2024-01-17  1:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

New review comment by CtrlC-Root on void-packages repository

https://github.com/void-linux/void-packages/pull/44235#discussion_r1454301797

Comment:
Wasn't sure if I should do this in `post_install`, which is how many other packages do it, but those don't have a `do_install` section which this one does. I ended up putting it in `do_install` which is hopefully the right one haha. If not I can move it quickly.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Updated] New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (37 preceding siblings ...)
  2024-01-17  1:18 ` CtrlC-Root
@ 2024-01-17  1:20 ` CtrlC-Root
  2024-01-17  1:42 ` [PR PATCH] [Merged]: " classabbyamp
  39 siblings, 0 replies; 41+ messages in thread
From: CtrlC-Root @ 2024-01-17  1:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

There is an updated pull request by CtrlC-Root against master on the void-packages repository

https://github.com/CtrlC-Root/void-packages brother-brscan5
https://github.com/void-linux/void-packages/pull/44235

New package: brother-brscan5-1.2.13
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

EDIT: Someone else tested part of the network functionality (see https://github.com/void-linux/void-packages/pull/44235#issuecomment-1694736834).

#### 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

A patch file from https://github.com/void-linux/void-packages/pull/44235.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-brother-brscan5-44235.patch --]
[-- Type: text/x-diff, Size: 5448 bytes --]

From 5ae146fe11d44e38b8af8fcd8ce6be53fd06bd50 Mon Sep 17 00:00:00 2001
From: Alexandru Barbur <alex@ctrlc.name>
Date: Fri, 2 Jun 2023 19:57:38 -0400
Subject: [PATCH] New package: brother-brscan5-1.2.13

---
 srcpkgs/brother-brscan5/INSTALL               |  9 +++
 srcpkgs/brother-brscan5/REMOVE                |  7 ++
 .../brother-brscan5/files/README.voidlinux    |  2 +
 srcpkgs/brother-brscan5/template              | 75 +++++++++++++++++++
 4 files changed, 93 insertions(+)
 create mode 100644 srcpkgs/brother-brscan5/INSTALL
 create mode 100644 srcpkgs/brother-brscan5/REMOVE
 create mode 100644 srcpkgs/brother-brscan5/files/README.voidlinux
 create mode 100644 srcpkgs/brother-brscan5/template

diff --git a/srcpkgs/brother-brscan5/INSTALL b/srcpkgs/brother-brscan5/INSTALL
new file mode 100644
index 0000000000000..2e917d6143b7d
--- /dev/null
+++ b/srcpkgs/brother-brscan5/INSTALL
@@ -0,0 +1,9 @@
+case "${ACTION}" in
+    post)
+	# Add brother driver to sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+	if [ "$(grep brother5 ${_SANE_CONF})" = '' ]; then
+		echo brother5 >> ${_SANE_CONF}
+	fi;
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/REMOVE b/srcpkgs/brother-brscan5/REMOVE
new file mode 100644
index 0000000000000..b762f8954ee68
--- /dev/null
+++ b/srcpkgs/brother-brscan5/REMOVE
@@ -0,0 +1,7 @@
+case "${ACTION}" in
+    pre)
+	# remove brother driver from sane configuration
+	_SANE_CONF='/etc/sane.d/dll.conf'
+    sed -i -e '/brother5/d' ${_SANE_CONF}
+    ;;
+esac
diff --git a/srcpkgs/brother-brscan5/files/README.voidlinux b/srcpkgs/brother-brscan5/files/README.voidlinux
new file mode 100644
index 0000000000000..e83ad9d6e31b1
--- /dev/null
+++ b/srcpkgs/brother-brscan5/files/README.voidlinux
@@ -0,0 +1,2 @@
+In order to access networked scanners and multifunctionals, the SANE backend
+must be configured using 'brsaneconfig5'.
diff --git a/srcpkgs/brother-brscan5/template b/srcpkgs/brother-brscan5/template
new file mode 100644
index 0000000000000..7e057e07b44d7
--- /dev/null
+++ b/srcpkgs/brother-brscan5/template
@@ -0,0 +1,75 @@
+# Template file for 'brother-brscan5'
+pkgname=brother-brscan5
+version=1.2.13
+revision=1
+archs="i686 x86_64"
+depends="sane libusb-compat"
+short_desc="SANE scanner driver for brscan5-compatible printers"
+maintainer="Alexandru Barbur <alex@ctrlc.name>"
+license="custom:EULA"
+homepage="https://support.brother.com/"
+repository="nonfree"
+nopie=yes
+conf_files="/opt/brother/scanner/brscan5/brscan5.ini
+ /opt/brother/scanner/brscan5/brsanenetdevice.cfg
+ /opt/brother/scanner/brscan5/models/*.ini"
+
+_sane_library="libsane-brother5.so.1.0.7"
+_pkg_libraries="libLxBsScanCoreApi.so.3.2.0
+ libLxBsNetDevAccs.so.1.0.0
+ libLxBsDeviceAccs.so.1.0.0
+ libLxBsUsbDevAccs.so.1.0.0"
+
+if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
+	_rpmpkgid="0.x86_64"
+	distfiles="https://download.brother.com/welcome/dlf104036/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="572d24efc23de14933cb15f8c8be20575af07d7aff32c3ddf0633bacffe9e098"
+	_rpmlibdir="usr/lib64"
+else
+	_rpmpkgid="0.i386"
+	distfiles="https://download.brother.com/welcome/dlf104035/brscan5-${version}-${_rpmpkgid}.rpm"
+	checksum="4cdca918fb7f994fc1e081a3a709db8f5b4420406d26aa04a6effc941e468fc2"
+	_rpmlibdir="usr/lib"
+fi
+
+do_install() {
+	vinstall opt/brother/scanner/brscan5/${_sane_library} 755 usr/lib/sane
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]$//')
+	ln -sf /usr/lib/sane/${_sane_library} ${DESTDIR}/usr/lib/sane/$(echo ${_sane_library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+
+	for library in $_pkg_libraries; do
+		vinstall opt/brother/scanner/brscan5/${library} 755 usr/lib
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]$//')
+		ln -sf /usr/lib/${library} ${DESTDIR}/usr/lib/$(echo ${library} | sed -e 's/\.[0-9]\.[0-9]\.[0-9]$//')
+	done
+
+	pushd opt/brother/scanner/brscan5/udev-rules
+	sed '/SYSFS/d' NN-brother-mfp-brscan5-1.0.2-2.rules > 40-brother-mfp-brscan5-1.0.2-2.rules
+	vinstall 40-brother-mfp-brscan5-1.0.2-2.rules 644 usr/lib/udev/rules.d
+	popd
+
+	# note: configuration file locations are hard-coded in libsane-brother5.so
+	vinstall opt/brother/scanner/brscan5/brsaneconfig5 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan5.ini 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brsanenetdevice.cfg 644 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_cnetconfig 755 opt/brother/scanner/brscan5
+	vinstall opt/brother/scanner/brscan5/brscan_gnetconfig 755 opt/brother/scanner/brscan5
+
+	vmkdir etc/opt/brother/scanner/brscan5 755
+	ln -sf /opt/brother/scanner/brscan5/brscan5.ini ${DESTDIR}/etc/opt/brother/scanner/brscan5/brscan5.ini
+	ln -sf /opt/brother/scanner/brscan5/brsanenetdevice.cfg ${DESTDIR}/etc/opt/brother/scanner/brscan5/brsanenetdevice.cfg
+	ln -sf /opt/brother/scanner/brscan5/models ${DESTDIR}/etc/opt/brother/scanner/brscan5/models
+
+	vmkdir opt/brother/scanner/brscan5 755
+	vcopy opt/brother/scanner/brscan5/models opt/brother/scanner/brscan5
+
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_ENG.txt
+	vlicense opt/brother/scanner/brscan5/doc/LICENSE_JPN.txt
+	vlicense opt/brother/scanner/brscan5/doc/readme.txt # Independent JPEG blurb.
+
+	vbin opt/brother/scanner/brscan5/brsaneconfig5
+}
+
+post_install() {
+	vdoc "${FILESDIR}/README.voidlinux"
+}

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [PR PATCH] [Merged]: New package: brother-brscan5-1.2.13
  2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
                   ` (38 preceding siblings ...)
  2024-01-17  1:20 ` [PR PATCH] [Updated] " CtrlC-Root
@ 2024-01-17  1:42 ` classabbyamp
  39 siblings, 0 replies; 41+ messages in thread
From: classabbyamp @ 2024-01-17  1:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

There's a merged pull request on the void-packages repository

New package: brother-brscan5-1.2.13
https://github.com/void-linux/void-packages/pull/44235

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

Using a Brother ADS-1200 scanner over USB. I did not test the `brsaneconfig5` utility nor IP scanning.

EDIT: Someone else tested part of the network functionality (see https://github.com/void-linux/void-packages/pull/44235#issuecomment-1694736834).

#### 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

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2024-01-17  1:42 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-03  1:40 [PR PATCH] New package: brother-brscan5-1.2.12 CtrlC-Root
2023-06-03  2:10 ` [PR REVIEW] " abenson
2023-06-03  2:11 ` abenson
2023-06-03  2:12 ` abenson
2023-06-03  2:16 ` CtrlC-Root
2023-06-03  2:16 ` abenson
2023-06-03  2:17 ` [PR PATCH] [Updated] " CtrlC-Root
2023-06-03  2:17 ` [PR REVIEW] " CtrlC-Root
2023-06-03  2:18 ` CtrlC-Root
2023-06-03  2:19 ` [PR PATCH] [Updated] " CtrlC-Root
2023-06-03  2:19 ` CtrlC-Root
2023-06-03  2:20 ` [PR REVIEW] " abenson
2023-06-03  4:29 ` classabbyamp
2023-06-03 13:15 ` [PR PATCH] [Updated] " CtrlC-Root
2023-06-03 13:15 ` [PR REVIEW] " CtrlC-Root
2023-06-03 13:15 ` CtrlC-Root
2023-06-03 13:17 ` CtrlC-Root
2023-06-03 13:17 ` [PR PATCH] [Updated] " CtrlC-Root
2023-06-03 13:24 ` [PR REVIEW] " classabbyamp
2023-06-03 13:26 ` [PR PATCH] [Updated] " CtrlC-Root
2023-06-03 13:26 ` [PR REVIEW] " CtrlC-Root
2023-06-06 17:33 ` CtrlC-Root
2023-08-25 16:54 ` CtrlC-Root
2023-08-27 14:35 ` DerAndereJohannes
2023-08-27 14:42 ` DerAndereJohannes
2023-08-27 15:03 ` CtrlC-Root
2023-08-27 18:56 ` DerAndereJohannes
2023-08-28 19:43 ` [PR PATCH] [Updated] " CtrlC-Root
2023-08-28 19:44 ` New package: brother-brscan5-1.2.13 CtrlC-Root
2023-08-28 19:44 ` CtrlC-Root
2023-08-28 19:46 ` CtrlC-Root
2023-10-16 22:07 ` [PR PATCH] [Updated] " CtrlC-Root
2023-10-16 22:21 ` CtrlC-Root
2024-01-15  1:48 ` github-actions
2024-01-15 17:30 ` CtrlC-Root
2024-01-16 23:22 ` [PR REVIEW] " classabbyamp
2024-01-17  1:17 ` [PR PATCH] [Updated] " CtrlC-Root
2024-01-17  1:17 ` [PR REVIEW] " CtrlC-Root
2024-01-17  1:18 ` CtrlC-Root
2024-01-17  1:20 ` [PR PATCH] [Updated] " CtrlC-Root
2024-01-17  1:42 ` [PR PATCH] [Merged]: " classabbyamp

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).