This commit is contained in:
parent
a1f57c407b
commit
11bcac3fa9
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 3 17:11:53 CET 2008 - lnussel@suse.de
|
||||||
|
|
||||||
|
- use "usb" instead of "usb_device" (bnc#438867)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 3 11:10:31 CET 2008 - jsmeix@suse.de
|
Wed Dec 3 11:10:31 CET 2008 - jsmeix@suse.de
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ Group: Hardware/Scanner
|
|||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Summary: SANE (Scanner Access Now Easy) Scanner Drivers
|
Summary: SANE (Scanner Access Now Easy) Scanner Drivers
|
||||||
Version: 1.0.19
|
Version: 1.0.19
|
||||||
Release: 97
|
Release: 98
|
||||||
Url: http://www.sane-project.org/
|
Url: http://www.sane-project.org/
|
||||||
# URL for Source0: http://alioth.debian.org/frs/download.php/2318/sane-backends-1.0.19.tar.gz
|
# URL for Source0: http://alioth.debian.org/frs/download.php/2318/sane-backends-1.0.19.tar.gz
|
||||||
Source0: sane-backends-%{version}.tar.bz2
|
Source0: sane-backends-%{version}.tar.bz2
|
||||||
@ -492,14 +492,6 @@ install -m644 tools/udev/libsane.rules %{buildroot}%{_sysconfdir}/udev/rules.d/5
|
|||||||
# Modify the generated tools/hal/libsane.fdi file as follows:
|
# Modify the generated tools/hal/libsane.fdi file as follows:
|
||||||
# Add a generic entry for SCSI scanners:
|
# Add a generic entry for SCSI scanners:
|
||||||
sed -i -e '/<device>/a<match key="info.category" string="scsi_generic">\n <match key="@info.parent:scsi.type" string="scanner">\n <append key="info.capabilities" type="strlist">scanner<\/append>\n <\/match>\n<\/match>' tools/hal/libsane.fdi
|
sed -i -e '/<device>/a<match key="info.category" string="scsi_generic">\n <match key="@info.parent:scsi.type" string="scanner">\n <append key="info.capabilities" type="strlist">scanner<\/append>\n <\/match>\n<\/match>' tools/hal/libsane.fdi
|
||||||
# Replace 'key="info.bus" string="usb"' by 'key="info.subsystem" string="usb_device"',
|
|
||||||
# and replace 'key="usb.vendor_id"' by 'key="usb_device.vendor_id"',
|
|
||||||
# and replace 'key="usb.product_id"' by 'key="usb_device.product_id"',
|
|
||||||
# see the Novell/Suse Bugzilla bug
|
|
||||||
# https://bugzilla.novell.com/show_bug.cgi?id=250659
|
|
||||||
sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb_device"/' tools/hal/libsane.fdi
|
|
||||||
sed -i -e 's/key="usb.vendor_id"/key="usb_device.vendor_id"/' tools/hal/libsane.fdi
|
|
||||||
sed -i -e 's/key="usb.product_id"/key="usb_device.product_id"/' tools/hal/libsane.fdi
|
|
||||||
# Remove 'key="scanner.access_method"' lines.
|
# Remove 'key="scanner.access_method"' lines.
|
||||||
sed -i -e '/key="scanner.access_method"/d' tools/hal/libsane.fdi
|
sed -i -e '/key="scanner.access_method"/d' tools/hal/libsane.fdi
|
||||||
# There is a small number of USB scanners which are not talked to via libusb.
|
# There is a small number of USB scanners which are not talked to via libusb.
|
||||||
@ -514,9 +506,9 @@ sed -i -e '/key="scanner.access_method"/d' tools/hal/libsane.fdi
|
|||||||
# it must not add to 80-scanner.fdi (i.e. the explicitely marked as "SCSIviaUSBscanner" models).
|
# it must not add to 80-scanner.fdi (i.e. the explicitely marked as "SCSIviaUSBscanner" models).
|
||||||
# Currently there are no hexadecimal numbers in libsane.fdi with uppercase letters
|
# Currently there are no hexadecimal numbers in libsane.fdi with uppercase letters
|
||||||
# nevertheless to be safe the GNU sed extension to ignore case for pattern matching is used:
|
# nevertheless to be safe the GNU sed extension to ignore case for pattern matching is used:
|
||||||
sed -i -e '/usb_device.vendor_id.*0x04ce/I,/append key/{/usb_device.product_id.*0x0300/I,/append key/s/scanner/SCSIviaUSBscanner/g}' tools/hal/libsane.fdi
|
sed -i -e '/usb.vendor_id.*0x04ce/I,/append key/{/usb.product_id.*0x0300/I,/append key/s/scanner/SCSIviaUSBscanner/g}' tools/hal/libsane.fdi
|
||||||
for ID in 0094 0099 009a 00a0 00a3 80a3 80ac 00b6
|
for ID in 0094 0099 009a 00a0 00a3 80a3 80ac 00b6
|
||||||
do sed -i -e "/usb_device.vendor_id.*0x05da/I,/append key/{/usb_device.product_id.*0x$ID/I,/append key/s/scanner/SCSIviaUSBscanner/g}" tools/hal/libsane.fdi
|
do sed -i -e "/usb.vendor_id.*0x05da/I,/append key/{/usb.product_id.*0x$ID/I,/append key/s/scanner/SCSIviaUSBscanner/g}" tools/hal/libsane.fdi
|
||||||
done
|
done
|
||||||
# Disable entries for USB scanners which are "unsupported"
|
# Disable entries for USB scanners which are "unsupported"
|
||||||
# but keep the entries for models for which the support status
|
# but keep the entries for models for which the support status
|
||||||
@ -536,8 +528,23 @@ done
|
|||||||
for ID in $( cat unsupportedUSBIDs )
|
for ID in $( cat unsupportedUSBIDs )
|
||||||
do V="$( echo $ID | cut -d : -s -f 1 )"
|
do V="$( echo $ID | cut -d : -s -f 1 )"
|
||||||
P="$( echo $ID | cut -d : -s -f 2 )"
|
P="$( echo $ID | cut -d : -s -f 2 )"
|
||||||
sed -i -e "/usb_device.vendor_id.*$V/I,/info.capabilities/{/usb_device.product_id.*$P/I,/info.capabilities/{s/<append/<!-- <append/;s/append>/append> -->/}}" tools/hal/libsane.fdi
|
sed -i -e "/usb.vendor_id.*$V/I,/info.capabilities/{/usb.product_id.*$P/I,/info.capabilities/{s/<append/<!-- <append/;s/append>/append> -->/}}" tools/hal/libsane.fdi
|
||||||
done
|
done
|
||||||
|
%if 0%{?suse_version} < 1110
|
||||||
|
# for hal-resmgr
|
||||||
|
# Replace 'key="info.bus" string="usb"' by 'key="info.subsystem" string="usb_device"',
|
||||||
|
# and replace 'key="usb.vendor_id"' by 'key="usb_device.vendor_id"',
|
||||||
|
# and replace 'key="usb.product_id"' by 'key="usb_device.product_id"',
|
||||||
|
# see the Novell/Suse Bugzilla bug
|
||||||
|
# https://bugzilla.novell.com/show_bug.cgi?id=250659
|
||||||
|
sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb_device"/' tools/hal/libsane.fdi
|
||||||
|
sed -i -e 's/key="usb.vendor_id"/key="usb_device.vendor_id"/' tools/hal/libsane.fdi
|
||||||
|
sed -i -e 's/key="usb.product_id"/key="usb_device.product_id"/' tools/hal/libsane.fdi
|
||||||
|
%else
|
||||||
|
# for hal-acl-tool
|
||||||
|
# https://bugzilla.novell.com/show_bug.cgi?id=438867
|
||||||
|
sed -i -e 's/key="info.bus" string="usb"/key="info.subsystem" string="usb"/' tools/hal/libsane.fdi
|
||||||
|
%endif
|
||||||
# Install the HAL fdi file:
|
# Install the HAL fdi file:
|
||||||
install -d %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty
|
install -d %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty
|
||||||
install -m644 tools/hal/libsane.fdi %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty/70-scanner.fdi
|
install -m644 tools/hal/libsane.fdi %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty/70-scanner.fdi
|
||||||
@ -598,6 +605,8 @@ exit 0
|
|||||||
%{_sysconfdir}/udev/rules.d/56-sane-backends-autoconfig.rules
|
%{_sysconfdir}/udev/rules.d/56-sane-backends-autoconfig.rules
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 03 2008 lnussel@suse.de
|
||||||
|
- use "usb" instead of "usb_device" (bnc#438867)
|
||||||
* Wed Dec 03 2008 jsmeix@suse.de
|
* Wed Dec 03 2008 jsmeix@suse.de
|
||||||
- Moved /etc/hal/fdi/policy/10osvendor/70-scanner.fdi
|
- Moved /etc/hal/fdi/policy/10osvendor/70-scanner.fdi
|
||||||
to /usr/share/hal/fdi/information/20thirdparty/70-scanner.fdi
|
to /usr/share/hal/fdi/information/20thirdparty/70-scanner.fdi
|
||||||
|
Loading…
Reference in New Issue
Block a user