diff options
author | Chris Severance | 2017-07-13 16:23:44 -0400 |
---|---|---|
committer | Chris Severance | 2017-07-13 16:23:44 -0400 |
commit | df925d3e8925a193f4a241cab5ddc517cff985fd (patch) | |
tree | f676bb9876b3ea22f6f5ce8eef49ea2bf5fb3657 | |
parent | 358f06a381f8873353c22b0fd92604e79c7b6bc6 (diff) | |
download | aur-df925d3e8925a193f4a241cab5ddc517cff985fd.tar.gz |
Modernize PKGBUILD
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | gt-x820.install | 8 |
3 files changed, 52 insertions, 36 deletions
@@ -1,13 +1,21 @@ +# Generated by mksrcinfo v8 +# Thu Jul 13 20:23:14 UTC 2017 pkgbase = iscan-plugin-gt-x820 - pkgdesc = iscan plugin for Epson Colorio GT-X820/Perfection Photo V600 scanners. - pkgver = 2.2.0 + pkgdesc = iscan plugin for Epson Colorio GT-X820 Perfection V600 Photo scanners + pkgver = 2.2.0_1 pkgrel = 1 url = http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX install = gt-x820.install arch = i686 arch = x86_64 license = custom - depends = iscan + depends = iscan>=2.21 + source = http://support.epson.net/linux/src/scanner/iscan/iscan-data_1.36.0-1.dsc + sha256sums = 07a7cd6ec4b6618222cef71d2d76268e785b816b12038133d787e79ee98ebba0 + source_i686 = https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x86/iscan-gt-x820-bundle-1.0.1.x86.rpm.tar.gz + sha256sums_i686 = 87c009a6ff4fa33c46a0990d92152dc63f3261958eb168b4b7a69828554512ce + source_x86_64 = https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-1.0.1.x64.rpm.tar.gz + sha256sums_x86_64 = 4f053966fb14f1b4e2e8b593891c02ec10c20cd22f941852609658d90082f4a9 pkgname = iscan-plugin-gt-x820 @@ -1,36 +1,44 @@ -# Contributors: -##Frank Phillips <frankalso[at]gmail[dot]com> -##mh00h +# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: notjustbill +# Contributor: untitled +# Contributor: mh00h +# Contributor: Frank Phillips <frankalso[at]gmail[dot]com> -pkgname=iscan-plugin-gt-x820 -pkgver=2.2.0 -_realpkgver=2.2.0-1 -pkgrel=1 -pkgdesc="iscan plugin for Epson Colorio GT-X820/Perfection Photo V600 scanners." +set -u +pkgname='iscan-plugin-gt-x820' +pkgver='2.2.0_1'; _bundlever='1.0.1' +pkgrel='1' +pkgdesc='iscan plugin for Epson Colorio GT-X820 Perfection V600 Photo scanners' arch=('i686' 'x86_64') -url="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" +url='http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX' license=('custom') -depends=('iscan') -install=gt-x820.install +depends=('iscan>=2.21') +install='gt-x820.install' +declare -gA _archf=([i686]='x86' [x86_64]='x64') +source=('http://support.epson.net/linux/src/scanner/iscan/iscan-data_1.36.0-1.dsc') # dummy file to fill source array +source_x86_64=("https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${_bundlever}.x64.rpm.tar.gz") +source_i686=("https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x86/iscan-gt-x820-bundle-${_bundlever}.x86.rpm.tar.gz") +sha256sums=('07a7cd6ec4b6618222cef71d2d76268e785b816b12038133d787e79ee98ebba0') +sha256sums_i686=('87c009a6ff4fa33c46a0990d92152dc63f3261958eb168b4b7a69828554512ce') +sha256sums_x86_64=('4f053966fb14f1b4e2e8b593891c02ec10c20cd22f941852609658d90082f4a9') -[ "$CARCH" = x86_64 ] && -source=(http://a1227.g.akamai.net/f/1227/40484/1d/download.ebz.epson.net/dsc/f/01/00/02/09/22/3881ed4f9aff07f6e1f21842a41bc6ee5d7f3434/$pkgname-${_realpkgver}.x86_64.rpm) -[ "$CARCH" = i686 ] && -source=(http://a1227.g.akamai.net/f/1227/40484/1d/download.ebz.epson.net/dsc/f/01/00/02/09/22/36d148fbd59e5b8c15ee002be442ea18701a2389/$pkgname-${_realpkgver}.i386.rpm) - -[ "$CARCH" = x86_64 ] && md5sums=('d193219b329c8e3a4ee1d87afd6bd535') -[ "$CARCH" = i686 ] && md5sums=('b616fd1358da189fff06482d04b92e2e') - -package() { - cd "$srcdir" - mv usr "$pkgdir" - if [ "$CARCH" = "x86_64" ] - then - mv "$pkgdir"/usr/lib{64,} +prepare() { + set -u + cd "iscan-gt-x820-bundle-${_bundlever}.${_archf[${CARCH}]}.rpm/plugins" + declare -A _arch=([i686]='i386' [x86_64]='x86_64') + bsdtar -xf "iscan-plugin-gt-x820-${pkgver//_/-}.${_arch[${CARCH}]}.rpm" + if [ -d "usr/lib64" ]; then + mv 'usr/lib64' 'usr/lib' fi - mkdir "$pkgdir"/usr/share/licenses - mv "$pkgdir"/usr/share/doc/$pkgname-$pkgver "$pkgdir"/usr/share/licenses/ - rm -rf "$pkgdir"/usr/share/doc + set +u } - +package() { + set -u + cd "iscan-gt-x820-bundle-${_bundlever}.${_archf[${CARCH}]}.rpm/plugins" + mv 'usr' "${pkgdir}" + install -Dpm644 "${pkgdir}/usr/share/doc/${pkgname}-${pkgver%%_*}"/* -t "${pkgdir}/usr/share/licenses/${pkgname}/" + rm -r "${pkgdir}/usr/share/doc" + set +u +} +set +u diff --git a/gt-x820.install b/gt-x820.install index a5f9f75f40b5..32aa1874ab04 100644 --- a/gt-x820.install +++ b/gt-x820.install @@ -1,9 +1,9 @@ post_install() { - echo "Running iscan-registry to register plugins and firmware with iscan" - iscan-registry -a interpreter usb 0x04b8 0x013a /usr/lib/iscan/libesintA1 /usr/share/iscan/esfwA1.bin + echo 'Registering gt-x820 plugins/firmware with iscan' + iscan-registry -a 'interpreter' 'usb' '0x04b8' '0x013a' '/usr/lib/iscan/libesintA1' '/usr/share/iscan/esfwA1.bin' } pre_remove() { - echo "Unregistering gt-x820 plugins/firmware" - iscan-registry -r interpreter usb 0x04b8 0x013a /usr/lib/iscan/libesintA1 /usr/share/iscan/esfwA1.bin + echo 'Unregistering gt-x820 plugins/firmware with iscan' + iscan-registry -r 'interpreter' 'usb' '0x04b8' '0x013a' '/usr/lib/iscan/libesintA1' '/usr/share/iscan/esfwA1.bin' } |