summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bccde220d89f6976066662734a16260c7d75a3a0 (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
pkgname=scangearmp-mx510series-x86_64
pkgver=1.90
pkgrel=1
pkgdesc="Canon Scanner Driver (MX510 Series) x86_64"
url="http://support-th.canon-asia.com/contents/TH/EN/0100413102.html"
arch=('x86_64')
license=('custom')
depends=('sane' 'pangox-compat')
conflicts=('scangearmp')
makedepends=('rpmextract')
source=('http://pdisp01.c-wss.com/gdl/WWUFORedirectTarget.do?id=MDEwMDAwNDEzMTAx&cmp=ACB&lang=EN')
md5sums=('d055b3dc640ebe1c6b60b77c78916b8e')

build() {
  cd "$startdir/src"
  tar -xf "$startdir/src/WWUFORedirectTarget.do?id=MDEwMDAwNDEzMTAx&cmp=ACB&lang=EN"
}

package() {
  cd $pkgdir
  rpmextract.sh $startdir/src/scangearmp-mx510series-$pkgver-$pkgrel-rpm/packages/scangearmp-common-$pkgver-$pkgrel.x86_64.rpm
  rpmextract.sh $startdir/src/scangearmp-mx510series-$pkgver-$pkgrel-rpm/packages/scangearmp-mx510series-$pkgver-$pkgrel.x86_64.rpm
  mkdir -p usr/share/licenses/${pkgname}
  mv usr/lib64 usr/lib
  chmod -R a+rX usr/
  mkdir -p usr/share/applications
  cat > usr/share/applications/scangearmp.desktop <<EOF
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Canon ScanGearMP
Exec=/usr/local/bin/scangearmp
Icon=scanner
Categories=Office;
EOF
}