diff options
author | Raphaël Doursenaud | 2015-07-05 17:58:09 +0200 |
---|---|---|
committer | Raphaël Doursenaud | 2015-07-05 17:58:09 +0200 |
commit | 196248ac6802f8f14fe95e578b9626f612b47624 (patch) | |
tree | b9b2a69bf96a9d75aaed45b89ca54d034961113a | |
download | aur-196248ac6802f8f14fe95e578b9626f612b47624.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | brother-mfc7320-lpr.install | 29 | ||||
-rw-r--r-- | brother-mfc7320-lpr.patch | 54 |
4 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a39de460125f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = brother-mfc7320-lpr + pkgdesc = Brother MFC-7320 LPR printer driver + pkgver = 2.0.2 + pkgrel = 4 + url = http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-7320 + install = brother-mfc7320-lpr.install + arch = i686 + arch = x86_64 + groups = brother-mfc7320 + license = custom:Brother + license = GPL + makedepends = rpmextract + depends = ghostscript + depends = psutils + source = brother-mfc7320-lpr.patch + source = http://download.brother.com/welcome/dlf006224/brmfc7320lpr-2.0.2-1.i386.rpm + md5sums = 920e044d410f5a5b728330757d522dbf + md5sums = 928a98e474421e72cf31d279424ca7fe + +pkgname = brother-mfc7320-lpr + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a20110ca1f88 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Raphaël Doursenaud <rdoursenaud@free.fr> + +pkgname=brother-mfc7320-lpr +pkgver=2.0.2 +pkgrel=4 +_pkgrel=1 +pkgdesc="Brother MFC-7320 LPR 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=('ghostscript' 'psutils') +makedepends=('rpmextract') +install="brother-mfc7320-lpr.install" +arch=('i686' 'x86_64') + +if test "$CARCH" == x86_64; then + depends+=('lib32-glibc') +fi + +source=( + brother-mfc7320-lpr.patch + http://download.brother.com/welcome/dlf006224/brmfc7320lpr-$pkgver-$_pkgrel.i386.rpm +) + +md5sums=('920e044d410f5a5b728330757d522dbf' + '928a98e474421e72cf31d279424ca7fe') + +prepare() +{ + cd "$srcdir" + for n in *.rpm; do + rpmextract.sh "$n" + done + + cd "$srcdir/usr/" + patch -p2 < ../brother-mfc7320-lpr.patch +} + +package() +{ + mkdir -p "$pkgdir/usr" + cp -R "$srcdir/usr/bin" "$pkgdir/usr/bin" + cp -R "$srcdir/usr/lib" "$pkgdir/usr/lib" + mkdir -p "$pkgdir/usr/share/brother" + cp -R "$srcdir/usr/local/Brother/inf" "$pkgdir/usr/share/brother" + cp -R "$srcdir/usr/local/Brother/lpd" "$pkgdir/usr/share/brother" + cp -R "$srcdir/var" "$pkgdir" +} + diff --git a/brother-mfc7320-lpr.install b/brother-mfc7320-lpr.install new file mode 100644 index 000000000000..fec018c3ab21 --- /dev/null +++ b/brother-mfc7320-lpr.install @@ -0,0 +1,29 @@ +MODEL=MFC7320 + +post_install() { + /usr/share/brother/inf/setupPrintcap $MODEL -i USB + /usr/share/brother/inf/braddprinter -i $MODEL + if [ -d /usr/lib32 ];then + ln -s /usr/lib/libbrcomplpr2.so /usr/lib32/libbrcomplpr2.so + fi +} + +post_upgrade() { + /bin/true +} + +pre_remove() { + /usr/share/brother/inf/setupPrintcap $MODEL -e USB + /usr/share/brother/inf/braddprinter -e $MODEL + rm -fR /var/spool/lpd/$MODEL/* + if [ -d /usr/lib32 ];then + rm -f /usr/lib32/libbrcomplpr2.so + fi +} + + +op=$1 +shift + +$op "$@" + diff --git a/brother-mfc7320-lpr.patch b/brother-mfc7320-lpr.patch new file mode 100644 index 000000000000..f0f9884c4059 --- /dev/null +++ b/brother-mfc7320-lpr.patch @@ -0,0 +1,54 @@ +diff -Nurp orig/usr/local/Brother/inf/brMFC7320func arch/usr/local/Brother/inf/brMFC7320func +--- orig/usr/local/Brother/inf/brMFC7320func 2008-01-25 03:29:39.000000000 +0100 ++++ arch/usr/local/Brother/inf/brMFC7320func 2013-03-24 15:48:07.930231805 +0100 +@@ -24,3 +24,5 @@ Copies={"1-999"} + Sleep={PrinterDefault,"1-99"} + Toner Save Mode={ON,OFF} + ++[psconvert2] ++pstops=/usr/bin/pstops +diff -Nurp orig/usr/local/Brother/inf/setupPrintcap arch/usr/local/Brother/inf/setupPrintcap +--- orig/usr/local/Brother/inf/setupPrintcap 2008-01-25 03:29:39.000000000 +0100 ++++ arch/usr/local/Brother/inf/setupPrintcap 2013-03-24 16:01:38.558718458 +0100 +@@ -32,7 +32,7 @@ case "$2" in + if [ ! -d $SPOOLER_NAME ]; then + mkdir $SPOOLER_NAME + fi +- chown lp $SPOOLER_NAME ++ chown root $SPOOLER_NAME + chgrp lp $SPOOLER_NAME + chmod 700 $SPOOLER_NAME + +@@ -46,7 +46,7 @@ ${BRPRINTER_NAME}:\\ + :sd=/var/spool/lpd/$BRPRINTER_NAME:\\ + :sh:\\ + :lp=$DEVICE_IF:\\ +- :if=/usr/local/Brother/lpd/filter$BRPRINTER_NAME: ++ :if=/usr/share/brother/lpd/filter$BRPRINTER_NAME: + EOF + ;; + -e) +diff -Nurp orig/usr/local/Brother/lpd/filterMFC7320 arch/usr/local/Brother/lpd/filterMFC7320 +--- orig/usr/local/Brother/lpd/filterMFC7320 2008-01-25 03:29:39.000000000 +0100 ++++ arch/usr/local/Brother/lpd/filterMFC7320 2013-03-24 15:42:21.750493330 +0100 +@@ -21,7 +21,7 @@ + PRINTER="MFC7320" + PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g') + +-BR_PRT_PATH=/usr/local/Brother ++BR_PRT_PATH=/usr/share/brother + RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | eval sed 's/PRINTER/"$PRINTER_TMP"/'` + PAPER_INF=$BR_PRT_PATH/inf/paperinf + PSCONV=$BR_PRT_PATH/lpd/psconvert2 +diff -Nurp orig/usr/local/Brother/lpd/psconvert2 arch/usr/local/Brother/lpd/psconvert2 +--- orig/usr/local/Brother/lpd/psconvert2 2008-01-25 03:29:39.000000000 +0100 ++++ arch/usr/local/Brother/lpd/psconvert2 2013-03-24 15:34:44.838794851 +0100 +@@ -45,7 +45,7 @@ PRINTABLEAREA=`sed -n '/PrintableArea/p' + PRINTABLEAREA=`echo $PRINTABLEAREA | sed -e 's/ //g' -e 's/PrintableArea=//'` + + #--- +-PSTOPS='/usr/sbin/pstops' ++PSTOPS='/usr/bin/pstops' + if ! [ -f $PSTOPS ];then + PSTOPS=`grep 'pstops=' $FUNC_FILE | head -1 | sed s/'pstops='//` + fi |