From 5d2e4e0834300837ad6790faafb9e4c6b9f62d94 Mon Sep 17 00:00:00 2001 From: Andrea D'Amore 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 " -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 " +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, \+,,' \ + -e 's/\"/"/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 }