blob: d7d68eca9a30ac5ffd0021383bd66f32fa92e626 (
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
|
# Maintainer: German Galkin <galkinga at gmail dot com>
pkgname=ricoh-sp150su-sane
pkgver=1.0.22
pkgrel=1
pkgdesc="SANE driver for Ricoh SP150SU series"
arch=('x86_64')
url="http://support.ricoh.com/bb/html/dr_ut_e/re1/model/sp150su/sp150su.htm"
license=('custom')
depends=('sane' 'libusb-compat')
source=("http://support.ricoh.com/bb/pub_e/dr_ut_e/0001294/0001294703/V100/r75389L2.gz"
"http://support.ricoh.com/bb/html/dr_ut_e/rcn1/ref_html/Agree.htm")
sha256sums=('ade3a9b8b280b2ed8f91ff0a186c763aeda6e3ccb5dea8642e70119ab7967473'
'dfe55420823dd1c1b43608aa7fda5dd2af052778e601b96810248f5c9fd8f6d2')
_backend_name=alto
_mylibsane=libsane-${_backend_name}.so.${pkgver}
build() {
echo ${_backend_name} > "$srcdir/${_backend_name}.dll.conf"
cat <<EOF > "$srcdir/${_backend_name}.conf"
#
# Configuration file for the alto backend
#
# Ricoh SP 150SU
usb 0x05ca 0x0454
# Ricoh SP 150SUw
usb 0x05ca 0x0456
EOF
cat <<EOF > "$srcdir/48-libsane-ricoh-sp150su.rules"
# Rules for Ricoh SP150SU/SP150SUw MFDs
ACTION!="add", GOTO="rules_end"
ENV{DEVTYPE}=="usb_device", GOTO="rules_begin"
SUBSYSTEM=="usb_device", GOTO="rules_begin"
GOTO="rules_end"
LABEL="rules_begin"
# Ricoh SP150SU
ATTRS{idVendor}=="05ca", ATTRS{idProduct}=="0454", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"
# Ricoh SP150SUw
ATTRS{idVendor}=="05ca", ATTRS{idProduct}=="0456", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"
LABEL="rules_end"
EOF
}
package() {
mkdir -p "$pkgdir/usr/lib/sane"
install -D -m644 "$srcdir/RICOH-SP-150SU-Scan_v1.00/64bit/${_mylibsane}" "$pkgdir/usr/lib/sane/"
install -D -m644 "$srcdir/RICOH-SP-150SU-Scan_v1.00/64bit/alto_ntdcmsdll.so" "$pkgdir/usr/lib/sane/"
ln -s "${_mylibsane}" "$pkgdir/usr/lib/sane/libsane-${_backend_name}.so"
ln -s "${_mylibsane}" "$pkgdir/usr/lib/sane/libsane-${_backend_name}.so.1"
mkdir -p "$pkgdir/etc/sane.d/dll.d"
install -D -m644 "$srcdir/${_backend_name}.dll.conf" "$pkgdir/etc/sane.d/dll.d/"
install -D -m644 "$srcdir/${_backend_name}.conf" "$pkgdir/etc/sane.d/dll.d/"
mkdir -p "$pkgdir/usr/lib/udev/rules.d"
install -D -m644 "$srcdir/48-libsane-ricoh-sp150su.rules" "$pkgdir/usr/lib/udev/rules.d/"
mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
install -D -m644 "$srcdir/Agree.htm" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.html"
}
|