summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorstefano2015-12-27 23:35:28 +0100
committerstefano2015-12-27 23:35:28 +0100
commit75124756621efb1da2164ec6c110b3589f8105e2 (patch)
tree6833009f7942a723a40d47a8759cf12c739b53f4
parente3770f8d371d1498930958abd9538c9699ceec56 (diff)
downloadaur-75124756621efb1da2164ec6c110b3589f8105e2.tar.gz
Update to 3.2.0-2
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD50
2 files changed, 23 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5cc2dafc4ac..d16d12514ce 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sun Dec 27 22:12:05 UTC 2015
+# Sun Dec 27 22:35:23 UTC 2015
pkgbase = brother-mfc-l2700dw
pkgdesc = LPR and CUPS driver for the Brother MFC-L2700DW
pkgver = 3.2.0
diff --git a/PKGBUILD b/PKGBUILD
index eee1354c2b6..125d2269a47 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -23,38 +23,32 @@ md5sums=('ff69f49954e8fea524787c617ac3fcfd'
prepare() {
# do not install in '/usr/local'
if [ -d $srcdir/usr/local/Brother ]; then
- install -d $srcdir/usr/share
- mv $srcdir/usr/local/Brother/ $srcdir/usr/share/brother
- rm -rf $srcdir/usr/local
+ install -dm755 "$srcdir/usr/share"
+ mv "$srcdir/usr/local/Brother/" "$srcdir/usr/share/brother"
+ rm -rf "$srcdir/usr/local"
sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' ./`
fi
# setup cups-directories
- install -d $srcdir/usr/share/cups/model
- install -d $srcdir/usr/lib/cups/filter
-# go to the cupswrapper directory and find the source file from wich to generate a ppd- and wrapper-file
- cd `find . -type d -name 'cupswrapper'`
- if [ -f cupswrapper* ]; then
- _wrapper_source=`ls cupswrapper*`
- sed -i '/^\/etc\/init.d\/cups/d' $_wrapper_source
- sed -i '/^sleep/d' $_wrapper_source
- sed -i '/^lpadmin/d' $_wrapper_source
- sed -i 's|/usr|$srcdir/usr|g' $_wrapper_source
- sed -i 's|/opt|$srcdir/opt|g' $_wrapper_source
- sed -i 's|/model/Brother|/model|g' $_wrapper_source
- sed -i 's|lpinfo|echo|g' $_wrapper_source
- export srcdir=$srcdir
- ./$_wrapper_source
- sed -i 's|$srcdir||' $srcdir/usr/lib/cups/filter/*lpdwrapper*
- sed -i "s|$srcdir||" $srcdir/usr/lib/cups/filter/*lpdwrapper*
- rm $_wrapper_source
- fi
-# /etc/printcap is managed by cups
- rm `find $srcdir -type f -name 'setupPrintcap*'`
+ install -dm755 "$srcdir/usr/share/cups/model"
+ install -dm755 "$srcdir/usr/lib/cups/filter"
+# copy ppd and filter file to their destination dirs
+ cd `find . -type d -name 'cupswrapper'`
+ cp *lpdwrapper* "$srcdir/usr/lib/cups/filter/"
+ cp *.ppd "$srcdir/usr/share/cups/model/"
+# set the basedir to an absolute path in the perl-lpdwrapper-script
+# the relative path,generated on the basis of the caller, does not work in this case
+ cd "$srcdir"
+# get absolute printer path
+ _baseDir="\"/$(find opt -maxdepth 3 -depth -print -quit -type d)\""
+# replace the dynamic basedir var with the absolute path
+ sed -i "s|\`readlink\ \$0\`|$_baseDir|" $srcdir/usr/lib/cups/filter/*lpdwrapper*
+# /etc/printcap is managed by cups
+ rm "$(find $srcdir -type f -name 'setupPrintcap*')"
}
package() {
- cp -R $srcdir/usr $pkgdir
- if [ -d $srcdir/opt ]; then cp -R $srcdir/opt $pkgdir; fi
- install -m 644 -D cupswrapper-license.txt $pkgdir/usr/share/licenses/${pkgname}/cupswrapper-licence.txt
- install -m 644 -D lpr-license.txt $pkgdir/usr/share/licenses/${pkgname}/lpr-licence.txt
+ cp -R "$srcdir/usr" "$pkgdir"
+ cp -R "$srcdir/opt" "$pkgdir"
+ install -m 644 -D cupswrapper-license.txt $pkgdir/usr/share/licenses/${pkgname}/cupswrapper-licence.txt
+ install -m 644 -D lpr-license.txt $pkgdir/usr/share/licenses/${pkgname}/lpr-licence.txt
}