summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew2016-01-23 16:59:37 -0800
committerandrew2016-01-23 17:00:47 -0800
commitaf182664ff90096cebcafed0f12b949736f35586 (patch)
tree7621a8df11d6ff4a9ead10e6f8e3c3c2f36cb956
parent6fac1b8cbfcde0e77a702054e315285386612417 (diff)
downloadaur-af182664ff90096cebcafed0f12b949736f35586.tar.gz
Release 2: Fixed printing paths
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD19
-rw-r--r--brother-hl-l2380dw.install34
-rw-r--r--brother_lpdwrapper_HLL2380DW.diff19
4 files changed, 37 insertions, 42 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 386dd750689d..10dea9f4153d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,19 @@
+# Generated by mksrcinfo v8
+# Sun Jan 24 01:00:05 UTC 2016
pkgbase = brother-hl-l2380dw
pkgdesc = Brother HL-L2380DW CUPS driver
pkgver = 3.2.0
- pkgrel = 1
+ pkgrel = 2
url = http://www.brother.com
- install = brother-hl-l2380dw.install
arch = i686
arch = x86_64
license = GPL
source = http://download.brother.com/welcome/dlf101770/hll2380dwcupswrapper-3.2.0-1.i386.rpm
source = http://download.brother.com/welcome/dlf101769/hll2380dwlpr-3.2.0-1.i386.rpm
+ source = brother_lpdwrapper_HLL2380DW.diff
sha256sums = a4e51f131e4cb7e9337af161e4be275c1a2628c75be04addff0569ff262185ee
sha256sums = c93037bdcc1ce5d63451ed701637aa0476898ed88a9eb5f6fbef735ccb1d83fc
+ sha256sums = ae0951ec252a9047c7c4dc32eb8414177d82786c0effec79b9a95bb7bd42ca24
depends_x86_64 = lib32-glibc
pkgname = brother-hl-l2380dw
diff --git a/PKGBUILD b/PKGBUILD
index c8742e839534..0de0e485a97f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,25 +2,32 @@
pkgname="brother-hl-l2380dw"
pkgver="3.2.0"
-pkgrel="1"
+pkgrel="2"
pkgdesc="Brother HL-L2380DW CUPS driver"
url="http://www.brother.com"
license=('GPL')
-install="brother-hl-l2380dw.install"
+#install="brother-hl-l2380dw.install"
arch=('i686' 'x86_64')
depends_x86_64=('lib32-glibc')
sha256sums=('a4e51f131e4cb7e9337af161e4be275c1a2628c75be04addff0569ff262185ee'
- 'c93037bdcc1ce5d63451ed701637aa0476898ed88a9eb5f6fbef735ccb1d83fc')
+ 'c93037bdcc1ce5d63451ed701637aa0476898ed88a9eb5f6fbef735ccb1d83fc'
+ 'ae0951ec252a9047c7c4dc32eb8414177d82786c0effec79b9a95bb7bd42ca24')
source=(
http://download.brother.com/welcome/dlf101770/hll2380dwcupswrapper-$pkgver-1.i386.rpm
http://download.brother.com/welcome/dlf101769/hll2380dwlpr-$pkgver-1.i386.rpm
+ brother_lpdwrapper_HLL2380DW.diff
)
+prepare() {
+ cd "$srcdir/opt/brother/Printers/HLL2380DW/cupswrapper"
+ patch brother_lpdwrapper_HLL2380DW < "$srcdir/brother_lpdwrapper_HLL2380DW.diff"
+}
+
package() {
- mkdir -p "$pkgdir/usr/share"
- install -D -m 755 "$srcdir/opt/brother/Printers/HLL2380DW/cupswrapper/brother_lpdwrapper_HLL2380DW" "$pkgdir/usr/lib/cups/filter/brother_lpdwrapper_HLL2380DW"
- install -D -m 644 "$srcdir/opt/brother/Printers/HLL2380DW/cupswrapper/brother-HLL2380DW-cups-en.ppd" "$pkgdir/usr/share/cups/model/HLL2380DW.ppd"
+ cp -R "$srcdir/opt/" "$pkgdir/opt/"
+ install -d "$pkgdir/usr/lib/cups/filter/"
+ ln -s "/opt/brother/Printers/HLL2380DW/cupswrapper/brother_lpdwrapper_HLL2380DW" "$pkgdir/usr/lib/cups/filter/brother_lpdwrapper_HLL2380DW"
}
diff --git a/brother-hl-l2380dw.install b/brother-hl-l2380dw.install
deleted file mode 100644
index adc0b0ae77e2..000000000000
--- a/brother-hl-l2380dw.install
+++ /dev/null
@@ -1,34 +0,0 @@
-post_install() {
- __port2=`lpinfo -v | grep -i 'usb://Brother/HLL2380DW' | head -1`
- if [ "$__port2" = '' ];then
- __port2=`lpinfo -v | grep 'usb://' | head -1`
- fi
- __port=`echo $__port2| sed s/direct//g`
- if [ "$__port" = '' ];then
- __port="usb:/dev/usb/lp0"
- fi
-
- lpadmin -p HLL2380DW -E -v $__port -P /usr/share/cups/model/HLL2380DW.ppd
- echo "If CUPS is not running now, start it after installation"
- echo "and type command:"
- echo " lpadmin -p HLL2380DW -E -v URL -P /usr/share/cups/model/HLL2380DW.ppd"
- echo "where URL can be found using command:"
- echo " lpinfo -v | grep -i 'Brother'"
- echo "You can also register new printer using web interface at:"
- echo " http://localhost:631/"
-}
-
-post_upgrade() {
- /bin/true
-}
-
-pre_remove() {
- lpadmin -x HLL2380DW
-}
-
-
-op=$1
-shift
-
-$op "$@"
-
diff --git a/brother_lpdwrapper_HLL2380DW.diff b/brother_lpdwrapper_HLL2380DW.diff
new file mode 100644
index 000000000000..9cbdbb229f73
--- /dev/null
+++ b/brother_lpdwrapper_HLL2380DW.diff
@@ -0,0 +1,19 @@
+--- brother_lpdwrapper_HLL2380DW 2016-01-22 20:47:41.000000000 -0800
++++ brother_lpdwrapper_HLL2380DW_new 2016-01-22 21:35:06.270764564 -0800
+@@ -43,15 +43,7 @@
+ $width=-1;
+ $height=-1;
+
+-#my $basedir = Cwd::realpath ($0);
+-my $basedir = `readlink $0`;
+-if ( $basedir eq '' ){
+- $basedir = `realpath $0`;
+-}
+-chomp($basedir);
+-
+-$basedir =~ s/$PRINTER\/cupswrapper\/.*$/$PRINTER\//g;
+-
++my $basedir = "/opt/brother/Printers/HLL2380DW";
+
+ %units = ( pt => \&pt2dot,
+ mm => \&mm2dot,