OBS User unknown 2008-04-02 22:40:47 +00:00 committed by Git OBS Bridge
parent b91c2fcdcb
commit 870dbcbf8c
4 changed files with 83 additions and 17 deletions

View File

@ -1,6 +1,7 @@
#! /bin/bash
#
# Johannes Meixner <jsmeix@suse.de>, 2004, 2005, 2006
# Johannes Meixner <jsmeix@suse.de>, 2004, 2005, 2006, 2007, 2008
# Till Kamppeter <till.kamppeter@gmail.com>, 2008
#set -x
@ -15,12 +16,20 @@ MY_NAME=${0##*/}
# Create temporary files:
TMP_DATA=$(mktemp -u /tmp/$MY_NAME.XXXXXX)
cat /dev/null >$TMP_DATA
# Extract USB entries from the models.dat file:
test -n "$1" && RULES_FILE="$1" || RULES_FILE="models.dat"
ls $RULES_FILE &>/dev/null || { echo "$MY_NAME error: Required models.dat file '$RULES_FILE' not found." 1>&2 ; exit 3 ; }
tr '[:upper:]' '[:lower:]' <$RULES_FILE | egrep '^usb-pid=[0-9a-f][0-9a-f][0-9a-f][0-9a-f]$' | grep -v '0000' | cut -s -d '=' -f 2 | sort -u >$TMP_DATA
tr '[:upper:]' '[:lower:]' <$RULES_FILE | egrep '^usb-pid=[0-9a-f][0-9a-f][0-9a-f]$' | grep -v '000' | cut -s -d '=' -f 2 | sort -u | sed -e 's/^/0/' >>$TMP_DATA
# Extract HPLIP USB ID classes (the digits in entries like SYSFS{idProduct}=="??12")
# and generate all possible HPLIP USB device IDs, see
# https://bugs.launchpad.net/bugs/195782
test -n "$1" && RULES_FILE="$1" || RULES_FILE="hpmud.rules"
test -r $RULES_FILE || { echo "$MY_NAME error: Cannot read file '$RULES_FILE'." 1>&2 ; exit 3 ; }
for CLASS in $( sed -n -e '/idVendor}=="03f0"/s/.*idProduct}=="??\([0-9A-Za-z]*\)".*/\1/p' $RULES_FILE )
do for A in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do for B in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do echo "0x$A$B$CLASS" >>$TMP_DATA
done
done
done
# Output:
@ -33,10 +42,10 @@ echo ' <device>'
exec <$TMP_DATA
while read PRODUCT
do echo
echo ' <match key="info.bus" string="usb_device">'
echo ' <match key="info.subsystem" string="usb_device">'
echo ' <match key="usb_device.vendor_id" int="0x03f0">'
echo -n ' <match key="usb_device.product_id" int="'
echo -n "0x$PRODUCT"
echo -n "$PRODUCT"
echo '">'
echo ' <append key="info.capabilities" type="strlist">scanner</append>'
echo ' </match>'

View File

@ -18,7 +18,7 @@ Summary: HPIJS stand-alone
# x.y.m : x = major release number, y = year (eg: 6 = 2006), m = month (eg: 6a = second release in June)
# Official releases have a 3 digit number and release candidates have a 4 digit number: x.y.m.rc
Version: 2.8.2
Release: 4
Release: 12
Group: Hardware/Printing
License: BSD 3-Clause
Url: http://hpinkjet.sourceforge.net/
@ -64,7 +64,6 @@ For full documentation and license see the package hplip.
Authors:
--------
David Suffield <david.suffield@hp.com>
Cory Meisch <cory.meisch@hp.com>
Yie Shiyun <shiyun.yie@hp.com>
Donald J. Welch <donald.welch@hp.com>
Cauligi Raghothama S. <raghothama.cauligi@hp.com>

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Wed Apr 2 14:40:57 CEST 2008 - jsmeix@suse.de
- Exchanged create_hal_global_fdi_from_models.dat with
create_hal_global_fdi_from_hpmud_rules which creates the
global HAL 70-hpmud.fdi file during build-time from the
55-hpmud.rules file to be in sync with the udev rules file
and to make sure to have all possible HPLIP device IDs, see
https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/195782
- Require the exact matching version of the hpijs sub-package
to have the correct libhpip and libhpmud installed.
- Require pyxml to have the xml.parsers.expat Python module,
see https://answers.launchpad.net/hplip/+question/25696
-------------------------------------------------------------------
Tue Feb 26 12:25:45 CET 2008 - jsmeix@suse.de

View File

@ -18,7 +18,7 @@ Summary: HP's Printing, Scanning, and Faxing Software
# x.y.m : x = major release number, y = year (eg: 6 = 2006), m = month (eg: 6a = second release in June)
# Official releases have a 3 digit number and release candidates have a 4 digit number: x.y.m.rc
Version: 2.8.2
Release: 4
Release: 23
Group: Hardware/Printing
License: BSD 3-Clause; GPL v2 or later; X11/MIT
Url: http://hpinkjet.sourceforge.net/
@ -40,8 +40,8 @@ Source101: hp-toolbox.wrapper
Source102: hpijs.1.gz
# Source103 is the init script for hpssd:
Source103: rchplip
# Script which outputs a global HAL fdi file for HP USB devices which are known to HPLIP:
Source104: create_hal_global_fdi_from_models.dat
# Script which outputs a global HAL fdi file for all HP USB devices which belong to HPLIP:
Source104: create_hal_global_fdi_from_hpmud_rules
# Patch100... is for special Suse patches:
# Patch101 changes in the udev rules file the owner from "lp" to "root"
# to avoid that the permissions can be changed e.g. by any CUPS filter script
@ -50,7 +50,12 @@ Patch101: change-udev-rules.diff
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: coreutils, /bin/grep, /bin/sed, /usr/bin/find
Requires: %{name}-hpijs, foomatic-filters, python-xml, python-qt
# Require the exact matching version of the hpijs sub-package to make sure
# to have the exact matching version of libhpip and libhpmud installed.
# A wrong library version may let libsane-hpaio crash (e.g. segfault)
# which lets the whole scanning stack frontend<->libsane-dll<->libsane-backend crash
# also for any other backend when the hpaio backend is enabled (e.g. "scanimage -L"):
Requires: %{name}-hpijs = %{version}, foomatic-filters, python-xml, python-qt, pyxml
# Either the hplip17 packages or the hplip packages can be installed:
Obsoletes: hplip17
# Skip testing devel dependencies required by libtool .la files by the following comment:
@ -95,12 +100,40 @@ http://hpinkjet.sourceforge.net/
Authors:
--------
David Suffield <david.suffield@hp.com>
Cory Meisch <cory.meisch@hp.com>
Yie Shiyun <shiyun.yie@hp.com>
Donald J. Welch <donald.welch@hp.com>
Cauligi Raghothama S. <raghothama.cauligi@hp.com>
Aaron Albright
Charlie Moore
Chris Wiesner
Chuck Esterbrook
Cory Meisch
David Goodger
David Paschal
Don Castrapel
Foster Nuffer
Hamish B Lawson
Henrique M. Holschuh
Ian Bicking
Jacqueline Pitter
James Thiele
John Hosszu
John Oleinik
Linus Araque
Mark Crawford
Mark Overton
Michael Foord
Mike Orr
Pete Parks
Philippe Normand
Sam Rushing
Smith Kennedy
Steve DeRoos
Tavis Rudd
Till Kamppeter
%package hpijs
License: BSD 3-Clause; GPL v2 or later; X11/MIT
Summary: HPIJS for HP's printing and scanning software HPLIP
Group: Hardware/Printing
# Mutual RPM package requirements are meanwhile considered to be bad because
@ -236,9 +269,9 @@ do egrep -v '^\*UIConstraints:|^\*NonUIConstraints:' $p | cupstestppd - || { rm
done
popd
# End of the general tests and adjustments for all PPDs.
# Run the script which outputs a global HAL fdi file for HP USB devices which are known to HPLIP
# Run the script which outputs a global HAL fdi file for all HP USB devices which belong to HPLIP
# and install its output as /etc/hal/fdi/policy/10osvendor/70-hpmud.fdi:
bash %{SOURCE104} data/models/models.dat >70-hpmud.fdi
bash %{SOURCE104} data/rules/55-hpmud.rules >70-hpmud.fdi
install -d %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor
install -m644 70-hpmud.fdi %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor/70-hpmud.fdi
# Desktop menue entry stuff:
@ -385,6 +418,17 @@ exit 0
%{_libdir}/libhpmud.*
%changelog
* Wed Apr 02 2008 jsmeix@suse.de
- Exchanged create_hal_global_fdi_from_models.dat with
create_hal_global_fdi_from_hpmud_rules which creates the
global HAL 70-hpmud.fdi file during build-time from the
55-hpmud.rules file to be in sync with the udev rules file
and to make sure to have all possible HPLIP device IDs, see
https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/195782
- Require the exact matching version of the hpijs sub-package
to have the correct libhpip and libhpmud installed.
- Require pyxml to have the xml.parsers.expat Python module,
see https://answers.launchpad.net/hplip/+question/25696
* Tue Feb 26 2008 jsmeix@suse.de
- Static "hpijs" PPD files via enable-foomatic-ppd-install
require foomatic-rip-hplip via their cupsFilter entries