sane: new patch to fix udev-rules

This commit is contained in:
Juergen Daubert 2009-12-17 12:27:25 +01:00
parent 0021f27148
commit 78e19ac4c9
4 changed files with 38 additions and 6 deletions

View File

@ -1,7 +1,7 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/udev/
drwxr-xr-x root/root etc/udev/rules.d/
-rw-r--r-- root/root etc/udev/rules.d/libsane.rules
-rw-r--r-- root/root etc/udev/rules.d/85-libsane.rules
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/gamma4scanimage

View File

@ -1 +1,2 @@
803da89ea53f33d10691de7afd466119 sane-1.0.20-udev_rule.patch
a0cfdfdebca2feb4f2ba5d3418b15a42 sane-backends-1.0.20.tar.gz

View File

@ -5,12 +5,15 @@
name=sane
version=1.0.20
release=1
source=(ftp://ftp.sane-project.org/pub/$name/$name-backends-$version/$name-backends-$version.tar.gz)
release=2
source=(ftp://ftp.sane-project.org/pub/$name/$name-backends-$version/$name-backends-$version.tar.gz
$name-$version-udev_rule.patch)
build () {
cd $name-backends-$version
patch -p1 -i $SRC/$name-$version-udev_rule.patch
./configure --prefix=/usr \
--mandir=/usr/man \
--localstatedir=/var \
@ -20,9 +23,7 @@ build () {
make
make -j1 DESTDIR=$PKG install
install -d $PKG/etc/udev/rules.d
install -m 644 tools/udev/libsane.rules $PKG/etc/udev/rules.d
sed -i 's/usb_device/usb/' $PKG/etc/udev/rules.d/libsane.rules
install -D -m 644 tools/udev/libsane.rules $PKG/etc/udev/rules.d/85-libsane.rules
chown root:root $PKG/{var,var/lock}
chmod 0755 $PKG/var

View File

@ -0,0 +1,30 @@
diff -Nru sane-backends-1.0.20.orig/tools/sane-desc.c sane-backends-1.0.20/tools/sane-desc.c
--- sane-backends-1.0.20.orig/tools/sane-desc.c 2009-12-17 09:46:40.000000000 +0100
+++ sane-backends-1.0.20/tools/sane-desc.c 2009-12-17 09:54:01.000000000 +0100
@@ -3475,7 +3475,7 @@
}
}
printf ("\n");
- printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
+ printf ("ATTRS{idVendor}==\"%s\", ATTRS{idProduct}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
usbid->usb_vendor_id + 2, usbid->usb_product_id + 2, DEVMODE, DEVGROUP);
usbid = usbid->next;
}
@@ -3488,7 +3488,7 @@
printf ("SUBSYSTEMS!=\"scsi\", GOTO=\"libsane_scsi_rules_end\"\n\n");
printf ("LABEL=\"libsane_scsi_rules_begin\"\n");
printf ("# Generic: SCSI device type 6 indicates a scanner\n");
- printf ("KERNEL==\"sg[0-9]*\", NAME=\"%%k\", ATTRS{type}==\"6\", MODE=\"%s\", GROUP=\"%s\"\n", DEVMODE, DEVGROUP);
+ printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"6\", MODE=\"%s\", GROUP=\"%s\"\n", DEVMODE, DEVGROUP);
printf ("# Some scanners advertise themselves as SCSI device type 3\n");
while (scsiid)
@@ -3521,7 +3521,7 @@
}
}
printf ("\n");
- printf ("KERNEL==\"sg[0-9]*\", NAME=\"%%k\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", MODE=\"%s\", GROUP=\"%s\"\n",
+ printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", MODE=\"%s\", GROUP=\"%s\"\n",
scsiid->scsi_vendor_id, scsiid->scsi_product_id, DEVMODE, DEVGROUP);
scsiid = scsiid->next;
}