From 28e5391c2bdd6b0c766d2444e37511465bdb1046 Mon Sep 17 00:00:00 2001 From: onekk Date: Wed, 23 Apr 2014 20:26:17 +0200 Subject: [PATCH 1/2] brother-brscan: new package correct commit --- srcpkgs/brother-brscan3/INSTALL | 7 +++ srcpkgs/brother-brscan3/REMOVE | 3 ++ .../files/60-brother-brscan3.rules | 5 +++ srcpkgs/brother-brscan3/template | 43 +++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 srcpkgs/brother-brscan3/INSTALL create mode 100644 srcpkgs/brother-brscan3/REMOVE create mode 100644 srcpkgs/brother-brscan3/files/60-brother-brscan3.rules create mode 100644 srcpkgs/brother-brscan3/template diff --git a/srcpkgs/brother-brscan3/INSTALL b/srcpkgs/brother-brscan3/INSTALL new file mode 100644 index 00000000000..aeb907fa984 --- /dev/null +++ b/srcpkgs/brother-brscan3/INSTALL @@ -0,0 +1,7 @@ +case "${ACTION}" in + post) + ln -sf /opt/Brother /usr/local/Brother + # add brother 3 to /etc/sane.d/dll.conf + opt/Brother/sane/setupSaneScan3 -i + ;; +esac diff --git a/srcpkgs/brother-brscan3/REMOVE b/srcpkgs/brother-brscan3/REMOVE new file mode 100644 index 00000000000..b344209ce42 --- /dev/null +++ b/srcpkgs/brother-brscan3/REMOVE @@ -0,0 +1,3 @@ +case ${ACTION} in + purge) rm usr/local/Brother;; +esac diff --git a/srcpkgs/brother-brscan3/files/60-brother-brscan3.rules b/srcpkgs/brother-brscan3/files/60-brother-brscan3.rules new file mode 100644 index 00000000000..08873369d88 --- /dev/null +++ b/srcpkgs/brother-brscan3/files/60-brother-brscan3.rules @@ -0,0 +1,5 @@ +# This file use the libsane_matched routine in 53-sane.rules + +# For Brother Brscan3 +ATTR{idVendor}=="04f9", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes" + diff --git a/srcpkgs/brother-brscan3/template b/srcpkgs/brother-brscan3/template new file mode 100644 index 00000000000..7feadd7be14 --- /dev/null +++ b/srcpkgs/brother-brscan3/template @@ -0,0 +1,43 @@ +# Template file for 'brother-brscan3' +pkgname=brother-brscan3 +version=0.2.11 +revision=1 +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" +only_for_archs="i686 x86_64" +depends="brother-dcp197c-lpr brother-dcp197c-cupswrapper cups sane" +create_wksrc=yes + +if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then + distfiles="http://download.brother.com/welcome/dlf006642/brscan3-${version}-5.amd64.deb" + checksum="cce23bd9481f0fb3856e6c1fecdb65d7b21d1efb74e1741ef6185fa952319beb" + debpkgid="5.amd64" +elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then + distfiles="http://download.brother.com/welcome/dlf006641/brscan3-${version}-4.i386.deb" + checksum="b8" + debpkgid="4.i386" +fi + + +do_extract() { + ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/brscan3-${version}-${debpkgid}.deb + cd ${wrksrc} + tar xzpvf data.tar.gz +} + +do_install(){ + mkdir -p ${DESTDIR} + # dlls and symlink (correctly put in /usr/lib) + cd ${wrksrc} + vinstall ./usr/lib64/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/lib64/libbrscandec3.so.1.0.0 755 usr/lib + ln -sf /usr/lib64/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so.1 + ln -sf /usr/lib64/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so + vmkdir /opt/Brother + vcopy "./usr/local/Brother/*" /opt/Brother/ + vinstall ${FILESDIR}/60-brother-brscan3.rules 644 usr/lib/udev/rules.d +} From f14f2e8d1f9b5ce403324d4b939bfaa93f0c1a2a Mon Sep 17 00:00:00 2001 From: onekk Date: Thu, 24 Apr 2014 12:21:51 +0200 Subject: [PATCH 2/2] brother-brscan3: modified according the suggestions --- srcpkgs/brother-brscan3/template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/brother-brscan3/template b/srcpkgs/brother-brscan3/template index 7feadd7be14..2db3dd3ffed 100644 --- a/srcpkgs/brother-brscan3/template +++ b/srcpkgs/brother-brscan3/template @@ -7,7 +7,8 @@ homepage="http://support.brother.com/g/b/index.aspx" license="GPL-2" short_desc=" Scanner driver for the brother DCP-197C printer/scanner" only_for_archs="i686 x86_64" -depends="brother-dcp197c-lpr brother-dcp197c-cupswrapper cups sane" +makedepends="brother-dcp197c-lpr brother-dcp197c-cupswrapper cups sane" +depends="${makedepends}" create_wksrc=yes if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then @@ -16,7 +17,7 @@ if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then debpkgid="5.amd64" elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then distfiles="http://download.brother.com/welcome/dlf006641/brscan3-${version}-4.i386.deb" - checksum="b8" + checksum="3d2c8aace27a694c0984c6a1913fb2ebbd6cfd7a46bcdce3d54ae3693009d835" debpkgid="4.i386" fi