summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCebtenzzre2018-11-29 21:51:27 -0500
committerCebtenzzre2018-11-29 21:51:27 -0500
commit01a57cdab131a2609b1a2d317583ac52b4d22fc5 (patch)
treec92448d5510e0851769b2b67496073c884ce037a
parent2d6d413af1c08c34eaa878b943221beb92113c38 (diff)
downloadaur-01a57cdab131a2609b1a2d317583ac52b4d22fc5.tar.gz
Complete rewrite
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD63
-rw-r--r--brother-mfc-9340cdw.install11
-rw-r--r--lpr-license.txt11
4 files changed, 63 insertions, 46 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 161be90bbc6..0082dc6783f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,23 @@
pkgbase = brother-mfc-9340cdw
pkgdesc = LPR and CUPS driver for the Brother MFC-9340CDW
- pkgver = 1.1.4
- pkgrel = 1
+ pkgver = 1.1.2_1
+ pkgrel = 2
url = http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html
install = brother-mfc-9340cdw.install
arch = i686
arch = x86_64
- license = unknown
- depends = tcsh
- depends = deb2targz
- depends = perl
+ license = custom:Brother commercial license
+ license = GPL2
+ depends = cups
+ depends = ghostscript
depends = a2ps
- depends = lib32-libcups
- source = http://download.brother.com/welcome/dlf007027/mfc9340cdwlpr-1.1.2-1.i386.deb
- source = http://download.brother.com/welcome/dlf007029/mfc9340cdwcupswrapper-1.1.4-0.i386.deb
- sha256sums = 0591020f391dd904680e2a3beb9664e404cac144d5848f7091c9246b44bc8dfe
- sha256sums = 7ba2bd88eec76e7f278a220e1a8e32a3f4404280723c299bcdc4613b2bbb9c36
+ source = http://www.brother.com/pub/bsc/linux/dlf/mfc9340cdwlpr-1.1.2-1.i386.rpm
+ source = https://download.brother.com/welcome/dlf007028/mfc9340cdwcupswrapper-1.1.4-0.i386.rpm
+ source = lpr-license.txt
+ sha256sums = f0ef7debe2ce49624c9fed63f5338267195430577afe1e97bdfb14bb35a325b1
+ sha256sums = 4290e37fa83cf2ad31e83fdf1a44e22fd7df4149fbda994bc930f201c1457e05
+ sha256sums = 9d85a8aafdaac8fac80e04234ad2acf5642bbf0b91ee582d2a89519a55f6dd67
+ depends_x86_64 = lib32-glibc
pkgname = brother-mfc-9340cdw
diff --git a/PKGBUILD b/PKGBUILD
index db2cfb6db8d..9e32cec365d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,42 @@
# Submitter: voidptr <aur at voidptr dot net>
# Contributor: Andrew Hacking <ahacking at gmail>
# Maintainer: Tom Wasiluk <tomasz at wasil dot uk>
+# Co-maintainer: Cebtenzzre <cebtenzzre (at) gmail (dot) com>
-model="9340cdw"
-pkgname="brother-mfc-$model"
-pkgver="1.1.4"
-pkgrel=1
-_cupswrapper_verstr="1.1.4-0"
-_lpr_verstr="1.1.2-1"
-pkgdesc="LPR and CUPS driver for the Brother MFC-9340CDW"
-url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
-arch=('i686' 'x86_64')
-license=('unknown')
-install="brother-mfc-${model}.install"
-depends=('tcsh' 'deb2targz' 'perl' 'a2ps' 'lib32-libcups')
+_model='9340cdw'
+pkgname=brother-mfc-${_model}
+pkgver=1.1.2_1
+pkgrel=2
+_cupswrapper_ver='1.1.4-0'
+pkgdesc='LPR and CUPS driver for the Brother MFC-9340CDW'
+url='http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html'
+arch=(i686 x86_64)
+license=('custom:Brother commercial license' GPL2)
+install=brother-mfc-${_model}.install
+depends=(cups ghostscript a2ps)
+depends_x86_64=(lib32-glibc)
-source=("http://download.brother.com/welcome/dlf007027/mfc${model}lpr-${_lpr_verstr}.i386.deb"
- "http://download.brother.com/welcome/dlf007029/mfc${model}cupswrapper-${_cupswrapper_verstr}.i386.deb")
-sha256sums=('0591020f391dd904680e2a3beb9664e404cac144d5848f7091c9246b44bc8dfe'
- '7ba2bd88eec76e7f278a220e1a8e32a3f4404280723c299bcdc4613b2bbb9c36')
+source=("http://www.brother.com/pub/bsc/linux/dlf/mfc${_model}lpr-${pkgver//_/-}.i386.rpm"
+ "https://download.brother.com/welcome/dlf007028/mfc9340cdwcupswrapper-${_cupswrapper_ver}.i386.rpm"
+ 'lpr-license.txt')
+sha256sums=('f0ef7debe2ce49624c9fed63f5338267195430577afe1e97bdfb14bb35a325b1'
+ '4290e37fa83cf2ad31e83fdf1a44e22fd7df4149fbda994bc930f201c1457e05'
+ '9d85a8aafdaac8fac80e04234ad2acf5642bbf0b91ee582d2a89519a55f6dd67')
+
+prepare() {
+ install -d usr/share/cups/model usr/lib/cups/filter
+ wrapper=opt/brother/Printers/mfc${_model}/cupswrapper/cupswrappermfc${_model}
+ perl -i -0777spe 's/^sleep(?s:.)*//gm;s#/(usr|opt)#$srcdir/$1#g;s#/model/Brother#/model#g;s/^lpadmin//gm' -- -srcdir="$srcdir" "$wrapper"
+ ./"$wrapper"
+ rm "$wrapper"
+ perl -i -spe 's/$srcdir//' -- -srcdir="$srcdir" usr/lib/cups/filter/*lpdwrapper*
+
+ rm opt/brother/Printers/mfc${_model}/cupswrapper/brother_mfc9340cdw_printer_en.ppd
+ # /etc/printcap is managed by cups
+ rm opt/brother/Printers/mfc9340cdw/inf/setupPrintcap*
+}
package() {
- deb2targz *.deb >/dev/null || return 1
- rm -f *.deb || return 1
- cd $srcdir || return 1
- [ -d "mfc${model}" ] || (mkdir mfc${model} || return 1)
- for i in *.tar.gz;do tar xfz $i -C mfc${model};done || return 1
- cd mfc${model} || return 1
- cd opt/brother/Printers/mfc${model} || return 1
- perl -i -pe 's#/etc/init.d#/etc/rc.d#g' ./cupswrapper/cupswrappermfc${model} || return 1
- perl -i -pe 's#printcap\.local#printcap#g' $srcdir/mfc${model}/opt/brother/Printers/mfc${model}/inf/setupPrintcapij || return 1
- cp -rf $srcdir/mfc${model}/usr/ $pkgdir/ || return 1
- cp -rf $srcdir/mfc${model}/opt/ $pkgdir/ || return 1
-} \ No newline at end of file
+ cp -R usr/ opt/ "${pkgdir}/"
+ install -Dm644 lpr-license.txt "${pkgdir}/usr/share/licenses/${pkgname}/lpr-license.txt"
+}
diff --git a/brother-mfc-9340cdw.install b/brother-mfc-9340cdw.install
index e9578ed3ca0..39e68edbc63 100644
--- a/brother-mfc-9340cdw.install
+++ b/brother-mfc-9340cdw.install
@@ -1,12 +1,9 @@
post_install() {
- post_upgrade;
+ post_upgrade;
}
post_upgrade() {
- /opt/brother/Printers/mfc9340cdw/cupswrapper/cupswrappermfc9340cdw >/dev/null
- if [ "$?" -eq 0 ]; then
- printf "\033[1m\033[32m\x3d\x3d\x3e\033\1330m Done. The printer should be visible now via the CUPS-webinterface (http://localhost:631)\n"
- else
- printf "\033[1m\032[32m\x3d\x3d\x3e\033\1330m Something went wrong...\n"
- fi
+ echo "Restart CUPS to load the new files"
+ echo "You can now register your new printer using the web interface at:"
+ echo " http://localhost:631/"
}
diff --git a/lpr-license.txt b/lpr-license.txt
new file mode 100644
index 00000000000..0d32eb1475c
--- /dev/null
+++ b/lpr-license.txt
@@ -0,0 +1,11 @@
+This Agreement provides terms and conditions for license grant from Brother Industries, Ltd ("Broher"). Brother, who owns all copyrights to the software that is distributed with this Agreement ("Software") to recipients thereof ("User"), for use of the Software. User shall have the right to use the Software only in accordance with the terms and conditions of this Agreement. Any use by User of the Software shall be deemed as its agreement hereto.
+Note:
+Please click on "I Accept" while holding down "Shift" or right click on "I Accept" and select "Save Target As,,," from the menu.
+
+Brother retains any and all copyrights to the Software. In no case this Agreement shall be construed to assign or otherwise transfer from Brother to User any copyrights or other intellectual property rights to whole or any part of the Software.
+
+Brother grants User a non-exclusive license: to reproduce and/or distribute (via Internet or in any other manner) the Software. Further, Brother grants User a non-exclusive license to modify, alter, translate or otherwise prepare derivative works of the Software and to reproduce and distribute (via Internet or in any other manner) such modification, alteration, translation or other derivative works for any purpose.
+
+The license of the Software from Brother hereunder is granted "AS IS." BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO THE SOFTWARE, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY, MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT.
+Brother shall have no liability in contract, tort (including negligence or breach of statutory duty) or otherwise for any interruption of use, loss of data, or for any indirect, incidental, punitive or consequential loss or damage, or for any loss of profit, revenue, data, goodwill or anticipated savings that arises under, out of, or in contemplation of this Agreement or otherwise arises due to any error, inaccuracy or defect in the Software even if Brother has been advised of the possibility of such loss or damage.
+Further, Brother shall have no liability to disclose and/or distribute the source cord of the Software to User under any circumstances. In no case shall the above license by Brother to modify, alter, translate or otherwise prepare derivative works of the Software be construed as Brother's implied agreement or undertakings to disclose and/or distribute the source cord of the Software. \ No newline at end of file