summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 187fbb38f399e895b138723bc899ed3a113cf3c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: Muflone http://www.muflone.com/contacts/english/

pkgname=iscan-plugin-gt-s650
pkgver=2.30.4
pkgrel=2
pkgdesc="EPSON Image Scan! plugin for Epson scanners (DS, EP, ES, ET, EW, L, LX, PX, WF, XP Series, FF-640, GT-S650, Perfection V19, Perfection V39)"
arch=('x86_64')
url="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
license=('custom:EPSON EULA')
depends=('iscan' 'iscan-data')
source=("https://download2.ebz.epson.net/iscan/plugin/gt-s650/deb/x64/iscan-gt-s650-bundle-${pkgver}.x64.deb.tar.gz")
sha256sums=('553eb55fef42ebcae562f3b8442d43093a16d8b53893da3b0d25396e81377949')
install="${pkgname}.install"

prepare() {
  cd "iscan-gt-s650-bundle-${pkgver}.x64.deb/plugins"
  bsdtar -xf "iscan-plugin-gt-s650_1.1.1-1_amd64.deb"
  bsdtar -xf data.tar.gz
  gzip -fkd "usr/share/doc/iscan-plugin-gt-s650/NEWS.gz"
  gzip -fkd "usr/share/doc/iscan-plugin-gt-s650/COPYING.EPSON.en.txt.gz"
}

package() {
  cd "iscan-gt-s650-bundle-${pkgver}.x64.deb/plugins/usr"
  # Install plugins
  install -m 755 -d "${pkgdir}/usr/lib/iscan"
  install -m 644 -t "${pkgdir}/usr/lib/iscan" "lib/iscan/libiscan-plugin-gt-s650.so.0.0.0"
  ln -s "libiscan-plugin-gt-s650.so.0.0.0" "${pkgdir}/usr/lib/iscan/libiscan-plugin-gt-s650.so"
  ln -s "libiscan-plugin-gt-s650.so.0.0.0" "${pkgdir}/usr/lib/iscan/libiscan-plugin-gt-s650.so.0"
  # Install firmwares
  install -m 755 -d "${pkgdir}/usr/share/iscan"
  install -m 644 -t "${pkgdir}/usr/share/iscan" "share/iscan/esfw010c.bin"
  # Install shared data
  install -m 755 -d "${pkgdir}/usr/share/iscan-data/device"
  install -m 644 -t "${pkgdir}/usr/share/iscan-data/device" "share/iscan-data/device/50657266656374696f6e20563139.xml"
  install -m 644 -t "${pkgdir}/usr/share/iscan-data/device" "share/iscan-data/device/50657266656374696f6e20563339.xml"
  # Install documentation
  install -m 755 -d "${pkgdir}/usr/share/doc/${pkgname}"
  install -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" \
    "share/doc/iscan-plugin-gt-s650/NEWS"
  # Install licenses
  install -m 755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \
    "share/doc/iscan-plugin-gt-s650/COPYING.EPSON.en.txt" \
    "share/doc/iscan-plugin-gt-s650/copyright"
}