Github messages for voidlinux
 help / color / mirror / Atom feed
From: anddam <anddam@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Update brother-brscan3 package
Date: Mon, 15 Feb 2021 13:38:13 +0100	[thread overview]
Message-ID: <20210215123813.xgD9aFNUmf9Ibe58GlEmOmyTU4iVyGx0rSoimS1BT-8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22998@inbox.vuxu.org>

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

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

https://github.com/anddam/void-packages feature-update-brother-brscan3
https://github.com/void-linux/void-packages/pull/22998

Update brother-brscan3 package
Bump version to latest available binary blob from manufacturer.
Drop building debug package, libs are stripped at the source.
Make description like brscan4 package, since this package targets for
multiple Brother devices.
Avoid repetitions when assembling distfiles URL.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-feature-update-brother-brscan3-22998.patch --]
[-- Type: text/x-diff, Size: 4584 bytes --]

From 5d2e4e0834300837ad6790faafb9e4c6b9f62d94 Mon Sep 17 00:00:00 2001
From: Andrea D'Amore <a@d-amo.re>
Date: Wed, 17 Jun 2020 08:24:44 +0200
Subject: [PATCH] brother-brscan3: update to 0.2.13

Add license from website.
Detab template.
Drop building debug package, libs are stripped at the source.
Mimic description from package brother-brscan4 since this package
targets multiple Brother devices.
---
 srcpkgs/brother-brscan3/template | 79 ++++++++++++++++++++------------
 1 file changed, 50 insertions(+), 29 deletions(-)

diff --git a/srcpkgs/brother-brscan3/template b/srcpkgs/brother-brscan3/template
index 92e5759446b..c5c4140af7b 100644
--- a/srcpkgs/brother-brscan3/template
+++ b/srcpkgs/brother-brscan3/template
@@ -1,44 +1,65 @@
 # Template file for 'brother-brscan3'
 pkgname=brother-brscan3
-version=0.2.11
-revision=6
-maintainer="Carlo Dormeletti <carloDOTdormelettiATaliceDOTit>"
-homepage="http://support.brother.com/g/b/index.aspx"
-license="GPL-2"
-short_desc="Scanner driver for the brother DCP-197C printer/scanner"
+version=0.2.13
+revision=1
 archs="i686 x86_64"
-makedepends="sane-devel"
-depends="sane"
 create_wrksrc=yes
+hostmakedepends="tar"
+makedepends="sane-devel curl"
+depends="sane"
+short_desc="SANE scanner driver for brscan3-compatible Brother scanners"
+maintainer="Carlo Dormeletti <carlo.dormeletti@alice.it.invalid>"
+license="custom:BrotherEULA"
+homepage="http://support.brother.com/g/b/index.aspx"
 nopie=yes
+nodebug=yes
+_license_checksum=53162967e920109983b25060f478cca5d7a82967096d6c6e10a1b6a059f7ff17
+
 
 if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
-	distfiles="http://download.brother.com/welcome/dlf006642/brscan3-${version}-5.amd64.deb"
-	checksum="cce23bd9481f0fb3856e6c1fecdb65d7b21d1efb74e1741ef6185fa952319beb"
-	debpkgid="5.amd64"
-	mylibdir="lib64"
+    debpkgid="1.amd64"
+    distfiles="http://download.brother.com/welcome/dlf006642/brscan3-${version}-${debpkgid}.deb"
+    checksum="446adf531bf39032892e9504ce34b7bf889e0f8628c0732cebb3b83fafb327b8"
+    mylibdir="lib64"
 elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
-	distfiles="http://download.brother.com/welcome/dlf006641/brscan3-${version}-4.i386.deb"
-	checksum="3d2c8aace27a694c0984c6a1913fb2ebbd6cfd7a46bcdce3d54ae3693009d835"
-	debpkgid="4.i386"
-	mylibdir="lib"
+    debpkgid="1.i386"
+    distfiles="http://download.brother.com/welcome/dlf006641/brscan3-${version}-${debpkgid}.deb"
+    checksum="ad06665cac32035893f614d9305dabf73145af454f1aeb6b8b7c7fa2700fe2e6"
+    mylibdir="lib"
 fi
 
 do_extract() {
-	ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/brscan3-${version}-${debpkgid}.deb
-	cd ${wrksrc}
-	bsdtar xzpvf data.tar.gz
+    ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/brscan3-${version}-${debpkgid}.deb
+    cd ${wrksrc}
+    bsdtar xzpvf data.tar.gz
 }
 
 do_install() {
-	# dlls and symlink (correctly put in /usr/lib)
-	cd ${wrksrc}
-	vinstall ./usr/${mylibdir}/sane/libsane-brother3.so.1.0.7 755 usr/lib/sane
-	ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so.1
-	ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so
-	vinstall ./usr/${mylibdir}/libbrscandec3.so.1.0.0 755 usr/lib
-	ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so.1
-	ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so
-	vmkdir /opt/Brother
-	vcopy "./usr/local/Brother/*" /opt/Brother/
+    # dlls and symlink (correctly put in /usr/lib)
+    cd ${wrksrc}
+    vinstall ./usr/${mylibdir}/sane/libsane-brother3.so.1.0.7 755 usr/lib/sane
+    ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so.1
+    ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so
+    vinstall ./usr/${mylibdir}/libbrscandec3.so.1.0.0 755 usr/lib
+    ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so.1
+    ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so
+    vmkdir /opt/Brother
+    vcopy "./usr/local/Brother/*" /opt/Brother/
+    vlicense LICENSE
+}
+
+post_extract() {
+    curl -sk https://support.brother.com/g/s/agreement/English_lpr/agree.html | \
+        sed -n \
+            -e 's,        \+</\?p>,,' \
+            -e 's/\&quot;/"/g' \
+            -e $'s,\t,    ,g' \
+            -e 's,^M,,' \
+            -e '14,18p' -e '28,45p' \
+        > LICENSE
+
+    filesum="$(xbps-digest LICENSE)"
+    if [ "$filesum" != "$_license_checksum" ]; then
+        msg_error "SHA256 mismatch for LICENSE:\n$filesum\n"
+    fi
 }

  parent reply	other threads:[~2021-02-15 12:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22998@inbox.vuxu.org>
2021-02-15  4:54 ` ericonr
2021-02-15 12:38 ` anddam [this message]
2021-02-15 13:05 ` [PR PATCH] [Updated] " anddam
2021-02-15 13:39 ` anddam
2021-02-15 18:04 ` Chocimier
2021-02-16 15:31 ` onekk
2021-02-16 16:14 ` ericonr
2021-04-03  3:06 ` [PR PATCH] [Closed]: " ericonr

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=20210215123813.xgD9aFNUmf9Ibe58GlEmOmyTU4iVyGx0rSoimS1BT-8@z \
    --to=anddam@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).