Github messages for voidlinux
 help / color / mirror / Atom feed
From: CtrlC-Root <CtrlC-Root@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] New package: brother-brscan5-1.2.12
Date: Sat, 03 Jun 2023 03:40:05 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44235@inbox.vuxu.org> (raw)

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

             reply	other threads:[~2023-06-03  1:40 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-03  1:40 CtrlC-Root [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44235@inbox.vuxu.org \
    --to=ctrlc-root@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).