summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2019-10-05 22:57:52 -0400
committerChris Severance2019-10-05 22:57:52 -0400
commit572b47b0b600bbc457ac4695a7ef0a0bdd163504 (patch)
treeeb20341fa7906d6bc770dece2161a2aadbbd40ec
parentc8ddcdf97d2c4cccad5524366c827478b1f15a28 (diff)
downloadaur-572b47b0b600bbc457ac4695a7ef0a0bdd163504.tar.gz
autu: Update to 1.0.1-1 patch BRDocument custom
-rw-r--r--.SRCINFO12
-rw-r--r--0001-Brother-BRDocument-Extras.patch15
-rw-r--r--PKGBUILD145
-rw-r--r--brother-dcp135c.install9
4 files changed, 117 insertions, 64 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f4d6cc16fe5a..ce57cdcb4173 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,31 @@
+# Generated by mksrcinfo v8
+# Sun Oct 6 02:57:51 UTC 2019
pkgbase = brother-dcp135c
pkgdesc = LPR and CUPS driver for the Brother DCP135C
pkgver = 1.0.1
pkgrel = 1
url = http://solutions.brother.com/linux/en_us/
- install = brother-dcp135c.install
arch = i686
arch = x86_64
license = custom:brother commercial license
depends = cups
+ options = !strip
source = http://www.brother.com/pub/bsc/linux/dlf/dcp135clpr-1.0.1-1.i386.rpm
source = http://www.brother.com/pub/bsc/linux/dlf/dcp135ccupswrapper-1.0.1-1.i386.rpm
+ source = 0001-Brother-BRDocument-Extras.patch
source = cupswrapper-license.txt
source = lpr-license.txt
md5sums = 395026a5438b03be521d309f38b4132b
md5sums = 82477f63f298bca32374450de6393270
+ md5sums = 68905bfd1200f23090cff7838be4f697
md5sums = 97ad0cffd216059e9d1d3121899d8646
md5sums = 5e87a3dc0f3e3438c088eda0f3565f0d
+ sha256sums = aab731af656be017042d5f934d99fa5592e86db8b4141cfd5a614a0b6d3122de
+ sha256sums = 327b3b0d443b1dcb6facabb47e84be0883125166fba6c2e95635a526de0f2639
+ sha256sums = fed3534b802b622b2e54ef929aae4a899c6737ed00ef6a15e35a879a143dc609
+ sha256sums = 2c6aa6a641332e5c87e971ac2a8beae13b059747bdba331bbd515914770d72d9
+ sha256sums = 9d85a8aafdaac8fac80e04234ad2acf5642bbf0b91ee582d2a89519a55f6dd67
+ depends_x86_64 = lib32-glibc
pkgname = brother-dcp135c
diff --git a/0001-Brother-BRDocument-Extras.patch b/0001-Brother-BRDocument-Extras.patch
new file mode 100644
index 000000000000..3af60d1ad13b
--- /dev/null
+++ b/0001-Brother-BRDocument-Extras.patch
@@ -0,0 +1,15 @@
+--- brdcp135c.ppd.orig 2019-10-05 16:31:37.047572690 -0400
++++ brdcp135c.ppd 2019-10-05 16:31:59.037733891 -0400
+@@ -224,11 +224,11 @@
+ *OpenUI *BRDocument/ Image Type: PickOne
+ *OrderDependency: 21 AnySetup *BRDocument
+ *DefaultBRDocument: Photo
+ *BRDocument Photo/Photo: ""
+ *BRDocument Graphics/Graphics: ""
+-*BRDocument custom/custom: ""
++*BRDocument Extras/Extras: ""
+ *CloseUI: *BRDocument
+
+ *%=== Color Matching ================================
+ *OpenUI *BRColorMatching/Color Matching: PickOne
+ *OrderDependency: 22 AnySetup *BRColorMatching
diff --git a/PKGBUILD b/PKGBUILD
index 5b7e551b30f4..ced342b9d124 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,62 +1,99 @@
-# Maintainer: Libernux <dutchman55@gmx.com>
-pkgname="brother-dcp135c"
-pkgver="1.0.1"
-pkgrel=1
+# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
+# Contributor: Libernux <dutchman55@gmx.com>
+
+set -u
+pkgname='brother-dcp135c'
+pkgver='1.0.1'
+pkgrel='1'
pkgdesc="LPR and CUPS driver for the Brother DCP135C"
arch=('i686' 'x86_64')
-url="http://solutions.brother.com/linux/en_us/"
+url='http://solutions.brother.com/linux/en_us/'
license=('custom:brother commercial license')
depends=('cups')
-install="$pkgname.install"
+depends_x86_64=('lib32-glibc')
+options=('!strip')
source=(
- "http://www.brother.com/pub/bsc/linux/dlf/dcp135clpr-$pkgver-$pkgrel.i386.rpm"
- "http://www.brother.com/pub/bsc/linux/dlf/dcp135ccupswrapper-$pkgver-$pkgrel.i386.rpm"
- 'cupswrapper-license.txt'
- 'lpr-license.txt'
+ "http://www.brother.com/pub/bsc/linux/dlf/dcp135clpr-${pkgver}-${pkgrel}.i386.rpm"
+ "http://www.brother.com/pub/bsc/linux/dlf/dcp135ccupswrapper-${pkgver}-${pkgrel}.i386.rpm"
+ '0001-Brother-BRDocument-Extras.patch'
+ 'cupswrapper-license.txt'
+ 'lpr-license.txt'
)
-md5sums=(
- '395026a5438b03be521d309f38b4132b'
- '82477f63f298bca32374450de6393270'
- '97ad0cffd216059e9d1d3121899d8646'
- '5e87a3dc0f3e3438c088eda0f3565f0d'
-)
-if test "$CARCH" == x86_64; then
- depends+=('lib32-glibc')
-fi
-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
- 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*'`
+md5sums=('395026a5438b03be521d309f38b4132b'
+ '82477f63f298bca32374450de6393270'
+ '68905bfd1200f23090cff7838be4f697'
+ '97ad0cffd216059e9d1d3121899d8646'
+ '5e87a3dc0f3e3438c088eda0f3565f0d')
+sha256sums=('aab731af656be017042d5f934d99fa5592e86db8b4141cfd5a614a0b6d3122de'
+ '327b3b0d443b1dcb6facabb47e84be0883125166fba6c2e95635a526de0f2639'
+ 'fed3534b802b622b2e54ef929aae4a899c6737ed00ef6a15e35a879a143dc609'
+ '2c6aa6a641332e5c87e971ac2a8beae13b059747bdba331bbd515914770d72d9'
+ '9d85a8aafdaac8fac80e04234ad2acf5642bbf0b91ee582d2a89519a55f6dd67')
+
+build() {
+ set -u
+
+ # 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"
+ sed -e 's|/usr/local/Brother|/usr/share/brother|g' -i $(grep -lre '/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')"
+ local _wrapper_source=(cupswrapper*)
+ if [ "${#_wrapper_source[@]}" -eq 1 ]; then
+ _wrapper_source="${_wrapper_source[0]}"
+ sed -e '/^\/etc\/init.d\/cups/d' \
+ -e '/^sleep/d' \
+ -e '/^lpadmin/d' \
+ -e 's|/usr|${srcdir}/usr|g' \
+ -e 's|/opt|${srcdir}/opt|g' \
+ -e 's|/model/Brother|/model|g' \
+ -e 's|lpinfo|echo|g' \
+ -e 's| \$errorcode| \\$errorcode|g' \
+ -e "/grep 'Nup=/"' s|`|\\&|g' \
+ -i "${_wrapper_source}"
+ srcdir="${srcdir}" \
+ sh -x -e -u "./${_wrapper_source}" -i
+ rm "${_wrapper_source}"
+ cd "${srcdir}"
+ local _lpdwrapper=('usr/lib/cups/filter'/*lpdwrapper*)
+ if [ "${#_lpdwrapper[@]}" -eq 1 ]; then
+ _lpdwrapper="${_lpdwrapper[0]}"
+ sed -e 's|${srcdir}||' \
+ -e "s|${srcdir}||" \
+ -i "${_lpdwrapper}"
+
+ local _ppd=(usr/share/cups/model/*.ppd)
+ if [ "${#_ppd[@]}" -eq 1 ]; then
+ _ppd="${_ppd[@]}"
+ #cp -p "${_ppd}"{,.orig}; false
+ # diff -pNau5 brdcp135c.ppd{.orig,} > '0001-Brother-BRDocument-Extras.patch'
+ patch -d 'usr/share/cups/model' -Nup0 -i "${srcdir}/0001-Brother-BRDocument-Extras.patch"
+ fi
+ fi
+ fi
+ cd "${srcdir}"
+
+ # /etc/printcap is managed by cups
+ rm "$(find "${srcdir}" -type 'f' -name 'setupPrintcap*')"
+ set +u
}
+
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
-} \ No newline at end of file
+ set -u
+ cp -pR "${srcdir}/usr" "${pkgdir}"
+ if [ -d "${srcdir}/opt" ]; then
+ cp -pR "${srcdir}/opt" "${pkgdir}"
+ fi
+ install -Dpm644 'cupswrapper-license.txt' 'lpr-license.txt' -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+ set +u
+}
+set +u
diff --git a/brother-dcp135c.install b/brother-dcp135c.install
deleted file mode 100644
index 3ddb04120f84..000000000000
--- a/brother-dcp135c.install
+++ /dev/null
@@ -1,9 +0,0 @@
-post_install() {
- post_upgrade;
-}
-
-post_upgrade() {
-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/"
-}