From 0cb521050241f24dd72da9fc39b51c0132018377 Mon Sep 17 00:00:00 2001 From: Ignacio Vazquez-Abrams Date: Jul 14 2005 07:24:19 +0000 Subject: Modified for new udev --- diff --git a/10-libifp.rules b/10-libifp.rules new file mode 100644 index 0000000..cba0818 --- /dev/null +++ b/10-libifp.rules @@ -0,0 +1,2 @@ +BUS=="usb", SYSFS{idVendor}=="0x4102", SYSFS{idProduct}=="0x100[135789]", RUN+="/sbin/libifp-hotplug" +BUS=="usb", SYSFS{idVendor}=="0x4102", SYSFS{idProduct}=="0x101[01]", RUN+="/sbin/libifp-hotplug" diff --git a/libifp.hotplug b/libifp.hotplug index 3c560be..4f03e51 100644 --- a/libifp.hotplug +++ b/libifp.hotplug @@ -1,6 +1,6 @@ #!/bin/bash # -# /etc/hotplug/usb/libifp +# /sbin/libifp-hotplug # # Cloned off the usbcam hotplug script that is shipped by # Red Hat with gphoto2. In principle we could just call that one, diff --git a/libifp.spec b/libifp.spec index d77bf95..6a844fb 100644 --- a/libifp.spec +++ b/libifp.spec @@ -1,6 +1,6 @@ Name: libifp Version: 1.0.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A general-purpose library-driver for iRiver's iFP portable audio players Group: System Environment/Base @@ -8,7 +8,7 @@ License: GPL URL: http://ifp-driver.sourceforge.net/ Source0: http://dl.sourceforge.net/ifp-driver/%{name}-%{version}.tar.gz Source1: libifp.hotplug -Source2: libifp.usermap +Source2: 10-libifp.rules BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libusb-devel doxygen @@ -39,8 +39,8 @@ make %{?_smp_mflags} rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -name \*.la -exec rm {} \; -install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/usb/libifp -install -D -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/hotplug/usb/libifp.usermap +install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/libifp-hotplug +install -D -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/10-libifp.rules %clean rm -rf $RPM_BUILD_ROOT @@ -53,7 +53,8 @@ rm -rf $RPM_BUILD_ROOT %doc ChangeLog COPYING README TODO %{_bindir}/* %{_libdir}/*.so.* -%{_sysconfdir}/hotplug/usb/* +/sbin/* +%{_sysconfdir}/udev/rules.d/*.rules %files devel %defattr(-,root,root,-) @@ -63,6 +64,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/* %changelog +* Thu Jul 14 2005 Ignacio Vazquez-Abrams 1.0.0.1-2 +- Modified for new udev + * Thu Jul 7 2005 Ignacio Vazquez-Abrams - Added Per Bjornsson's hotplug files diff --git a/libifp.usermap b/libifp.usermap deleted file mode 100644 index 4cf656d..0000000 --- a/libifp.usermap +++ /dev/null @@ -1,37 +0,0 @@ -# This file is shipped with libifp (based on a similar file in -# the libsane package as shipped by Red Hat). -# -# The entries below are used to detect an iRiver iFP portable music -# player when it is plugged in and then run the libifp hotplug script to -# change the ownership and permissions on the "device node" used by -# libusb. -# -# The 0x0003 match flag means the device is matched by its vendor and -# product IDs. -# -# Sample entry (replace 0xVVVV and 0xPPPP with vendor ID and product ID respectively) : -# libifp 0x0003 0xVVVV 0xPPPP 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -# -# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info -# -# -# The following list already contains the known iRiver iFP devices, with the -# product IDs copied from the header file for libifp. -# If it doesn't work for yours, try adding an appropriate entry. - -# iRiver iFP-1XX -libifp 0x0003 0x4102 0x1001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -#iRiver iFP-3XX -libifp 0x0003 0x4102 0x1003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -#iRiver iFP-5XX -libifp 0x0003 0x4102 0x1005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -#iRiver iFP-7XX -libifp 0x0003 0x4102 0x1007 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -#iRiver iFP-8XX -libifp 0x0003 0x4102 0x1008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -#iRiver iFP-9XX -libifp 0x0003 0x4102 0x1009 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -#iRiver iFP-10XX -libifp 0x0003 0x4102 0x1010 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 -#iRiver N10 -libifp 0x0003 0x4102 0x1011 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000