summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD10
2 files changed, 11 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7e9dae09686..23c67200f0b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Mon Jun 5 22:58:50 UTC 2017
+# Sat Jun 10 08:27:23 UTC 2017
pkgbase = oki-c321-c331-c531
pkgdesc = CUPS printer driver for the Okidata C321 C331 C531
pkgver = 1.1
@@ -7,6 +7,7 @@ pkgbase = oki-c321-c331-c531
url = http://www.okidata.com/
arch = any
license = custom
+ makedepends = gzip
depends = cups
source = http://www.oki.com/uk/printing/download/C531_C331_C321_Linux_110_31034.zip
source = oki-license.txt
diff --git a/PKGBUILD b/PKGBUILD
index fd5b74cae11..e392915cd9e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,6 +9,7 @@ arch=('any')
url='http://www.okidata.com/'
license=('custom')
depends=('cups')
+makedepends=('gzip')
source=('http://www.oki.com/uk/printing/download/C531_C331_C321_Linux_110_31034.zip' 'oki-license.txt')
sha256sums=('45d8b343ec06a849166dcc98e6d3818584a18315ae1fd4c73a784b8adc248091'
'092bb318766a779c9beff91e831a4cfde2ba99b37a9047f6917b946be768b37c')
@@ -17,7 +18,14 @@ package() {
set -u
install -Dpm644 'oki-license.txt' -t "${pkgdir}/usr/share/licenses/${pkgname}/"
cd C*/
- install -Dpm644 *.ppd* -t "${pkgdir}/usr/share/cups/model"
+ install -d "${pkgdir}/usr/share/cups/model"
+ local _ppd
+ for _ppd in *.ppd.gz; do
+ gunzip < "${_ppd}" | \
+ sed -e '/^*NickName:/ s:OKI DATA CORP \(C[0-9][0-9][0-9]\)(PS):Oki \1 PS (OKI DATA CORP \1):g' \
+ | gzip > "${pkgdir}/usr/share/cups/model/${_ppd}"
+ touch -r "${_ppd}" "${pkgdir}/usr/share/cups/model/${_ppd}"
+ done
set +u
}
set +u