64 lines
1.9 KiB
RPMSpec
64 lines
1.9 KiB
RPMSpec
Name: usb_modeswitch
|
|
Version: 2.6.1
|
|
Release: 1
|
|
Summary: A mode switching tool for controlling multiple-device USB gear
|
|
License: GPLv2+
|
|
URL: http://www.draisberghof.de/usb_modeswitch/
|
|
|
|
Source0: http://www.draisberghof.de/%{name}/usb-modeswitch-%{version}.tar.bz2
|
|
Source1: http://www.draisberghof.de/usb_modeswitch/device_reference.txt
|
|
|
|
Patch0: 0000-device_reference-utf8.patch
|
|
|
|
BuildRequires: gcc libusbx-devel tcl-devel systemd
|
|
Requires: usb_modeswitch-data >= 20121109 systemd
|
|
|
|
%description
|
|
USB_ModeSwitch is (surprise!) a mode switching tool for controlling 'multi-mode' USB devices.
|
|
|
|
Many USB devices (primarily high-speed WAN modems) have their M$ Windoze drivers onboard;
|
|
when plugged in for the first time they act like a flash storage and start installing the
|
|
driver from there.
|
|
|
|
After installation (and on every consecutive plugging) the driver switches the mode
|
|
internally, the storage device vanishes (in most cases), and a new device (like an USB
|
|
modem) shows up. Modem maker "Option" called that feature "ZeroCD (TM)" since it eliminates
|
|
the need for shipping a separate driver carrier.
|
|
|
|
%package_help
|
|
|
|
%prep
|
|
%setup -q -n usb-modeswitch-%{version}
|
|
cp -f %{SOURCE1} device_reference.txt
|
|
|
|
%patch0 -p0
|
|
|
|
%build
|
|
%{set_build_flags}
|
|
%make_build
|
|
|
|
%install
|
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
%make_install SYSDIR=$RPM_BUILD_ROOT%{_unitdir} UDEVDIR=$RPM_BUILD_ROOT%{_prefix}/lib/udev
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%license COPYING
|
|
%config(noreplace) %{_sysconfdir}/usb_modeswitch.conf
|
|
%{_sbindir}/usb_modeswitch
|
|
%{_sbindir}/usb_modeswitch_dispatcher
|
|
%{_prefix}/lib/udev/usb_modeswitch
|
|
%{_unitdir}/usb_modeswitch@.service
|
|
|
|
%files help
|
|
%defattr(-,root,root)
|
|
%doc README ChangeLog device_reference.txt
|
|
%{_mandir}/man*/
|
|
|
|
%changelog
|
|
* Mon Oct 09 2023 yaoxin <yao_xin001@hoperun.com> - 2.6.1-1
|
|
- Upgrade to 2.6.1
|
|
|
|
* Sat Nov 9 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.5.2-4
|
|
- Package init
|