blob: 2cef37c493a769056d97dc26a3326b43869ebf66 (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Maintainer: Paul van der Linden <mail@paultjuh.org>
# Contributor: Oliver Gatti
# Contributor: Andrew Titmuss <andrew@coffeetocode.me>
pkgname=scangearmp2
pkgver=4.60
pkgrel=3
pkgdesc="Canon ScanGear MP v2 scanner driver."
arch=('i686' 'x86_64')
url="https://www.canon.co.uk"
license=('GPL' 'custom:canon')
depends=('gtk2' 'libusb')
provides=('scangearmp2')
source=("https://gdlp01.c-wss.com/gds/2/0100011792/01/scangearmp2-source-4.60-3.tar.gz" \
scangearmp2.desktop libusb.patch)
sha256sums=('b90cff35c8cade1051e68dcc98d28d06378a291a751d0a8268c816a0a9609d19'
'd9b449d6c78c92f296acef85209b30c7d80b8bac692f135d071730ef0051d64b'
'ea64d40b4537a79a400a217a90b8fcdf9589e93df9710bb6a353bce54149879e')
[[ "$CARCH" == "x86_64" ]] && _arch="x86_64" || _arch="i686"
prepare() {
cd "$pkgname-source-$pkgver-$pkgrel"
patch -p2 < ../libusb.patch
}
build() {
cd "$pkgname-source-$pkgver-$pkgrel"
echo $_arch
pushd "scangearmp2"
./autogen.sh --prefix=/usr \
--enable-libpath=/usr/lib \
LDFLAGS="-L../../com/libs_bin_$_arch"
make
popd
}
check() {
cd "$pkgname-source-$pkgver-$pkgrel"
pushd "scangearmp2"
make check
popd
}
package() {
mkdir -p "$pkgdir/usr/share/applications"
install -m755 "scangearmp2.desktop" "$pkgdir/usr/share/applications"
cd "$pkgname-source-$pkgver-$pkgrel"
mkdir -p "$pkgdir/usr/lib/bjlib"
install -m644 "com/ini/canon_mfp2_net.ini" "$pkgdir/usr/lib/bjlib"
install -sm755 com/libs_bin_$_arch/*.so.* "$pkgdir/usr/lib"
cp -P com/libs_bin_$_arch/*.so "$pkgdir/usr/lib"
mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
install -m644 "doc/LICENSE-scangearmp-${pkgver}EN.txt" "$pkgdir/usr/share/licenses/$pkgname"
install -m644 "doc/LICENSE-scangearmp-${pkgver}FR.txt" "$pkgdir/usr/share/licenses/$pkgname"
install -m644 "doc/LICENSE-scangearmp-${pkgver}JP.txt" "$pkgdir/usr/share/licenses/$pkgname"
install -m644 "doc/LICENSE-scangearmp-${pkgver}SC.txt" "$pkgdir/usr/share/licenses/$pkgname"
mkdir -p "$pkgdir/etc/udev/rules.d"
install -m644 scangearmp2/etc/*.rules "$pkgdir/etc/udev/rules.d"
pushd "scangearmp2"
make DESTDIR="$pkgdir/" install
popd
}
|