summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphaël Doursenaud2015-07-05 17:58:03 +0200
committerRaphaël Doursenaud2015-07-05 17:58:03 +0200
commitf84572eeb420c20fb7a5ccc8caba6c019e33f2da (patch)
tree296f3d33908e32c75d2dee810f37c9b69c95c5f8
downloadaur-f84572eeb420c20fb7a5ccc8caba6c019e33f2da.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD44
-rw-r--r--brother-mfc7320-cups.install20
-rw-r--r--brother-mfc7320-cups.patch130
4 files changed, 215 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bb6fe8b0ca2f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = brother-mfc7320-cups
+ pkgdesc = Brother MFC-7320 CUPS printer driver
+ pkgver = 2.0.2
+ pkgrel = 5
+ url = http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-7320
+ install = brother-mfc7320-cups.install
+ arch = i686
+ arch = x86_64
+ groups = brother-mfc7320
+ license = custom:Brother
+ license = GPL
+ makedepends = rpmextract
+ depends = cups
+ depends = brother-mfc7320-lpr
+ source = brother-mfc7320-cups.patch
+ source = http://download.brother.com/welcome/dlf006226/cupswrapperMFC7320-2.0.2-1.i386.rpm
+ md5sums = 307d2f7872d7a7ce72ef1d4b8856ccfb
+ md5sums = 2af7dcc7ad8e35e05a8f868d4c9803ad
+
+pkgname = brother-mfc7320-cups
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f88c26a66acd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Raphaël Doursenaud <rdoursenaud@free.fr>
+
+pkgname=brother-mfc7320-cups
+pkgver=2.0.2
+pkgrel=5
+_pkgrel=1
+pkgdesc="Brother MFC-7320 CUPS printer driver"
+url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-7320"
+license=('custom:Brother' 'GPL')
+groups=('brother-mfc7320')
+depends=('cups' 'brother-mfc7320-lpr')
+makedepends=('rpmextract')
+install="brother-mfc7320-cups.install"
+arch=('i686' 'x86_64')
+
+if test "$CARCH" == x86_64; then
+ depends+=('lib32-glibc')
+fi
+
+source=(
+ brother-mfc7320-cups.patch
+ http://download.brother.com/welcome/dlf006226/cupswrapperMFC7320-$pkgver-$_pkgrel.i386.rpm
+)
+
+md5sums=('307d2f7872d7a7ce72ef1d4b8856ccfb'
+ '2af7dcc7ad8e35e05a8f868d4c9803ad')
+
+prepare()
+{
+ cd "$srcdir"
+ for n in *.rpm; do
+ rpmextract.sh "$n"
+ done
+
+ cd "$srcdir/usr/"
+ patch -p2 < ../brother-mfc7320-cups.patch
+}
+
+package()
+{
+ mkdir -p "$pkgdir/usr/share/brother"
+ cp -R "$srcdir/usr/local/Brother/cupswrapper" "$pkgdir/usr/share/brother"
+}
+
diff --git a/brother-mfc7320-cups.install b/brother-mfc7320-cups.install
new file mode 100644
index 000000000000..8f3ddb96bd8b
--- /dev/null
+++ b/brother-mfc7320-cups.install
@@ -0,0 +1,20 @@
+MODEL=MFC7320
+
+post_install() {
+ /usr/share/brother/cupswrapper/cupswrapperMFC7320-2.0.2 -i&
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ /usr/share/brother/cupswrapper/cupswrapperMFC7320-2.0.2 -e
+}
+
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/brother-mfc7320-cups.patch b/brother-mfc7320-cups.patch
new file mode 100644
index 000000000000..ee546945271b
--- /dev/null
+++ b/brother-mfc7320-cups.patch
@@ -0,0 +1,130 @@
+diff -Nurp orig/usr/local/Brother/cupswrapper/cupswrapperMFC7320-2.0.2 arch/usr/local/Brother/cupswrapper/cupswrapperMFC7320-2.0.2
+--- orig/usr/local/Brother/cupswrapper/cupswrapperMFC7320-2.0.2 2008-01-25 03:29:48.000000000 +0100
++++ arch/usr/local/Brother/cupswrapper/cupswrapperMFC7320-2.0.2 2013-03-24 16:26:59.028971284 +0100
+@@ -22,27 +22,17 @@ if [ "$1" = '-e' ]; then
+ lpadmin -x MFC7320
+ rm -f /usr/share/cups/model/MFC7320.ppd
+ rm -f /usr/lib/cups/filter/brlpdwrapperMFC7320
+- rm -f /usr/lib64/cups/filter/brlpdwrapperMFC7320
+- rm -f /usr/local/Brother/cupswrapper/brcupsconfig3
++ rm -f /usr/lib32/cups/filter/brlpdwrapperMFC7320
++ rm -f /usr/share/brother/cupswrapper/brcupsconfig3
+ if [ -f /usr/share/ppd/MFC7320.ppd ];then
+ rm -f /usr/share/ppd/MFC7320.ppd
+ fi
+- if [ -e /etc/init.d/cups ]; then
+- /etc/init.d/cups restart
+- fi
+- if [ -e /etc/init.d/cupsys ]; then
+- /etc/init.d/cupsys restart
+- fi
++ systemctl restart org.cups.cupsd.service
+ exit 0
+ fi
+ if [ "$1" = "-r" ]; then
+ lpadmin -x MFC7320
+- if [ -e /etc/init.d/cups ]; then
+- /etc/init.d/cups restart
+- fi
+- if [ -e /etc/init.d/cupsys ]; then
+- /etc/init.d/cupsys restart
+- fi
++ systemctl restart org.cups.cupsd.service
+ exit 0
+ fi
+ if [ "$1" = "help" ] || [ "$1" = "-h" ]; then
+@@ -54,7 +44,7 @@ if [ "$1" = "help" ] || [ "$1" = "-h" ];
+ fi
+ mkdir -p /usr/lib/cups/filter
+
+-if [ -e "/usr/local/Brother/lpd/filterMFC7320" ]; then
++if [ -e "/usr/share/brother/lpd/filterMFC7320" ]; then
+ :
+ else
+ echo "ERROR : Brother LPD filter is not installed."
+@@ -340,14 +330,14 @@ if [ -e '/usr/share/ppd' ];then
+ fi
+
+ brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperMFC7320
+-brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperMFC7320
++brotherlpdwrapper32=/usr/lib32/cups/filter/brlpdwrapperMFC7320
+ rm -f $brotherlpdwrapper
+
+
+ cat <<!ENDOFWFILTER! >$brotherlpdwrapper
+ #! /bin/sh
+ #
+-# Brother Print filter >> $brotherlpdwrapper
++# Brother Print filter
+ # Copyright (C) 2005 Brother. Industries, Ltd.
+ # Ver1.00
+
+@@ -473,25 +463,25 @@ else
+ fi
+
+
+-if [ -e "/usr/local/Brother/lpd/filter\$PRINTER" ]; then
++if [ -e "/usr/share/brother/lpd/filter\$PRINTER" ]; then
+ :
+ else
+- echo "ERROR: /usr/local/Brother/lpd/filter\$PRINTER does not exist" >>\$LOGFILE
++ echo "ERROR: /usr/share/brother/lpd/filter\$PRINTER does not exist" >>\$LOGFILE
+ errorcode=30
+ exit $errorcode
+ fi
+
+-if [ -e "/usr/local/Brother/cupswrapper/brcupsconfig3" ]; then
++if [ -e "/usr/share/brother/cupswrapper/brcupsconfig3" ]; then
+ if [ \$DEBUG = 0 ]; then
+- /usr/local/Brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD 0 "\$options" >> /dev/null
++ /usr/share/brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD 0 "\$options" >> /dev/null
+ else
+- /usr/local/Brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD \$LOGCLEVEL "\$options" >>\$LOGFILE
++ /usr/share/brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD \$LOGCLEVEL "\$options" >>\$LOGFILE
+ fi
+ fi
+
+
+ if [ \$DEBUG -le 2 ]; then
+- cat \$INPUT_TEMP_PS | /usr/local/Brother/lpd/filter\$PRINTER
++ cat \$INPUT_TEMP_PS | /usr/share/brother/lpd/filter\$PRINTER
+ fi
+
+ if [ \$DEBUG -ge 2 ]; then
+@@ -509,24 +499,13 @@ exit \$errorcode
+
+
+ chmod 755 $brotherlpdwrapper
+-if [ -e /usr/lib64/cups/filter ]; then
+- cp $brotherlpdwrapper $brotherlpdwrapper64
++if [ -e /usr/lib32/cups/filter ]; then
++ cp $brotherlpdwrapper $brotherlpdwrapper32
+ fi
+
+-chmod a+w /usr/local/Brother/inf/brMFC7320rc
+-chmod a+w /usr/local/Brother/inf
+-if [ -e /etc/init.d/lpd ]; then
+- /etc/init.d/lpd stop
+-fi
+-if [ -e /etc/init.d/lprng ]; then
+- /etc/init.d/lprng stop
+-fi
+- if [ -e /etc/init.d/cups ]; then
+- /etc/init.d/cups restart
+- fi
+- if [ -e /etc/init.d/cupsys ]; then
+- /etc/init.d/cupsys restart
+- fi
++chmod a+w /usr/share/brother/inf/brMFC7320rc
++chmod a+w /usr/share/brother/inf
++systemctl restart org.cups.cupsd.service
+ sleep 2s
+ port2=`lpinfo -v | grep -i 'usb://Brother/MFC-7320' | head -1`
+ if [ "$port2" = '' ];then
+@@ -537,4 +516,5 @@ if [ "$port" = '' ];then
+ port=usb:/dev/usb/lp0
+ fi
+ lpadmin -p MFC7320 -E -v $port -P /usr/share/cups/model/MFC7320.ppd
+- exit 0
++exit 0
++