change to udev-hwdb like sane did
This commit is contained in:
1 parent
f72e24d82e
commit
24bbe17a27
4 files changed
+25
-28
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
pkgbase = brscan4
|
pkgbase = brscan4
|
||||||
pkgdesc = SANE drivers from Brother for brscan4 compatible models
|
pkgdesc = SANE drivers from Brother for brscan4 compatible models
|
||||||
pkgver = 0.4.10_1
|
pkgver = 0.4.10_1
|
||||||
pkgrel = 3
|
pkgrel = 4
|
||||||
url = http://support.brother.com
|
url = http://support.brother.com
|
||||||
install = brscan4.install
|
install = brscan4.install
|
||||||
arch = i686
|
arch = i686
|
||||||
@@ -10,13 +10,12 @@ pkgbase = brscan4
|
|||||||
license = custom:Brother
|
license = custom:Brother
|
||||||
depends = sane
|
depends = sane
|
||||||
depends = libusb-compat
|
depends = libusb-compat
|
||||||
depends = acl
|
|
||||||
source = https://download.brother.com/welcome/dlf006648/brscan4-0.4.10-1.x86_64.rpm
|
source = https://download.brother.com/welcome/dlf006648/brscan4-0.4.10-1.x86_64.rpm
|
||||||
source = agree.html
|
source = agree.html
|
||||||
source = mk-udev-rules
|
source = mk-udev-hwdb
|
||||||
md5sums = f4c4d1f214d4c42a6d40f5451fc40312
|
md5sums = f4c4d1f214d4c42a6d40f5451fc40312
|
||||||
md5sums = ccffb9a6f6d436b21be25b0241068981
|
md5sums = ccffb9a6f6d436b21be25b0241068981
|
||||||
md5sums = 43c64803cb0fc37093146583719cb543
|
md5sums = 4a69fac9c0053277a9be8e2dd382f168
|
||||||
|
|
||||||
pkgname = brscan4
|
pkgname = brscan4
|
||||||
|
|
||||||
@@ -3,9 +3,9 @@ license=('GPL' 'custom:Brother')
|
|||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
pkgname=brscan4
|
pkgname=brscan4
|
||||||
pkgver=0.4.10_1
|
pkgver=0.4.10_1
|
||||||
pkgrel=3
|
pkgrel=4
|
||||||
pkgdesc="SANE drivers from Brother for brscan4 compatible models"
|
pkgdesc="SANE drivers from Brother for brscan4 compatible models"
|
||||||
depends=('sane' 'libusb-compat' 'acl')
|
depends=('sane' 'libusb-compat')
|
||||||
url="http://support.brother.com"
|
url="http://support.brother.com"
|
||||||
install=brscan4.install
|
install=brscan4.install
|
||||||
|
|
||||||
@@ -14,24 +14,23 @@ install=brscan4.install
|
|||||||
|
|
||||||
source=("https://download.brother.com/welcome/$pkg"
|
source=("https://download.brother.com/welcome/$pkg"
|
||||||
"agree.html"
|
"agree.html"
|
||||||
mk-udev-rules)
|
mk-udev-hwdb)
|
||||||
md5sums=($pkg_md5sum
|
md5sums=($pkg_md5sum
|
||||||
'ccffb9a6f6d436b21be25b0241068981'
|
'ccffb9a6f6d436b21be25b0241068981'
|
||||||
'43c64803cb0fc37093146583719cb543')
|
'4a69fac9c0053277a9be8e2dd382f168')
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
umask 022
|
./mk-udev-hwdb opt/brother/scanner/brscan4/{Brsane4.ini,models4/*.ini} > hwdb
|
||||||
mkdir -p etc/udev/rules.d
|
|
||||||
./mk-udev-rules opt/brother/scanner/brscan4/{Brsane4.ini,models4/*.ini} > etc/udev/rules.d/40-$pkgname.rules
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cp -r $srcdir/etc $pkgdir
|
cp -r $srcdir/etc $pkgdir
|
||||||
cp -r $srcdir/opt $pkgdir
|
cp -r $srcdir/opt $pkgdir
|
||||||
cp -r $srcdir/usr $pkgdir
|
cp -r $srcdir/usr $pkgdir
|
||||||
install -D -m644 $srcdir/agree.html $pkgdir/usr/share/licenses/$pkgname/LICENSE.html
|
|
||||||
[ "$CARCH" = "x86_64" ] && mv $pkgdir/usr/lib64 $pkgdir/usr/lib
|
[ "$CARCH" = "x86_64" ] && mv $pkgdir/usr/lib64 $pkgdir/usr/lib
|
||||||
|
install -D -m644 $srcdir/agree.html $pkgdir/usr/share/licenses/$pkgname/LICENSE.html
|
||||||
|
install -D -m644 $srcdir/hwdb $pkgdir/usr/lib/udev/hwdb.d/20-$pkgname.hwdb
|
||||||
# move the links to the right direction
|
# move the links to the right direction
|
||||||
cd $pkgdir/usr/lib/sane
|
cd $pkgdir/usr/lib/sane
|
||||||
ln -sf libsane-brother4.so.1.0.7 $pkgdir/usr/lib/sane/libsane-brother4.so.1
|
ln -sf libsane-brother4.so.1.0.7 $pkgdir/usr/lib/sane/libsane-brother4.so.1
|
||||||
|
|||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/gawk -f
|
||||||
|
BEGIN {
|
||||||
|
FS = ",";
|
||||||
|
print "# brscan4-supported scanners (or interfaces of MFD)";
|
||||||
|
print "";
|
||||||
|
}
|
||||||
|
NF >= 3 && $1 ~ /^0[xX][[:xdigit:]]{4}$/ {
|
||||||
|
id = tolower( substr( $1, 3 ));
|
||||||
|
name = $4
|
||||||
|
gsub("\"", "", name)
|
||||||
|
print "# " name;
|
||||||
|
print "usb:v04f9p" id "*";
|
||||||
|
print " libsane_matched=yes";
|
||||||
|
print "";
|
||||||
|
}
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/gawk -f
|
|
||||||
BEGIN {
|
|
||||||
FS = ",";
|
|
||||||
print "ACTION==\"add\", ATTR{idVendor}==\"04f9\", GOTO=\"brscan4\"";
|
|
||||||
print "GOTO=\"brscan4_end\"";
|
|
||||||
print "LABEL=\"brscan4\"";
|
|
||||||
}
|
|
||||||
NF >= 3 && $1 ~ /^ *0[xX][[:xdigit:]]+ *$/ {
|
|
||||||
id = "000" tolower( substr( $1, 3 ));
|
|
||||||
id = substr( id, length( id ) - 3 );
|
|
||||||
print "ATTR{idProduct}==\"" id "\", ENV{libsane_matched}=\"yes\", RUN+=\"/usr/bin/setfacl -m g:scanner:rw /dev/$name\"";
|
|
||||||
}
|
|
||||||
END {
|
|
||||||
print "LABEL=\"brscan4_end\"";
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in new issue
Block a user