%define source_name usb-modeswitch Name: usb_modeswitch Version: 1.1.0 Release: 4%{?dist} Summary: USB Modeswitch gets 4G cards in operational mode Summary(de): USB Modeswitch aktiviert UMTS-Karten Group: Applications/System License: GPLv2+ URL: http://www.draisberghof.de/usb_modeswitch/ Source0: http://www.draisberghof.de/%{name}/%{source_name}-%{version}.tar.bz2 Patch0: usb_modeswitch-dir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libusb-devel %description USB Modeswitch brings up your datacard into operational mode. When plugged in they identify themselves as cdrom and present some non-Linux compatible installation files. This tool deactivates this cdrom-devices and enables the real communication device. It supports most devices built and sold by Huawei, T-Mobile, Vodafone, Option, ZTE, Novatel. %description -l de USB Modeswitch deaktiviert die CDROM-Emulation einiger UMTS-Karten. Dadurch erkennt Linux die Datenkarte und kann damit Internet- Verbindungen aufbauen. Die gängigen Karten von Huawei, T-Mobile, Vodafone, Option, ZTE und Novatell werden unterstützt. %package data Summary: USB Modeswitch device database Requires: udev Requires: tcl Requires: %{name} = %{version}-%{release} %description data Contains the device database and the rules file, including full paths %prep %setup -q -n %{source_name}-%{version} %patch0 -p1 -b .dir %build CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/usb_modeswitch.d/ mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d/ mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 install -p -m 755 usb_modeswitch $RPM_BUILD_ROOT%{_bindir}/ install -p -m 644 usb_modeswitch.conf $RPM_BUILD_ROOT%{_sysconfdir}/ gzip -9c usb_modeswitch.1 > usb_modeswitch.1.gz && install usb_modeswitch.1.gz $RPM_BUILD_ROOT%{_datadir}/man/man1 install -p -m 755 usb_modeswitch.sh $RPM_BUILD_ROOT/lib/udev/usb_modeswitch install -p -m 644 usb_modeswitch.d/* $RPM_BUILD_ROOT%{_sysconfdir}/usb_modeswitch.d/ install -p -m 644 40-usb_modeswitch.rules $RPM_BUILD_ROOT/lib/udev/rules.d %clean rm -rf $RPM_BUILD_ROOT %post data udevadm control --reload-rules %postun data udevadm control --reload-rules %files %defattr(-,root,root,-) %{_bindir}/usb_modeswitch %{_mandir}/man1/usb_modeswitch.1.gz %config(noreplace) %{_sysconfdir}/usb_modeswitch.conf %doc COPYING README ChangeLog %files data /lib/udev/rules.d/40-usb_modeswitch.rules /lib/udev/usb_modeswitch %{_sysconfdir}/usb_modeswitch.d/ %changelog - Sat Mar 6 2010 Huzaifa Sidhpurwala - 1.1.0-4 - Fix regression in rhbz #571001 * Thu Mar 4 2010 Huzaifa Sidhpurwala 1.1.0-3 - Patch usb_modeswtich to use the binary from /usr/bin/ - usb_modeswitch-data needs tcl * Wed Mar 2 2010 Huzaifa Sidhpurwala 1.1.0-2 - Reload udev when new rules are installed * Wed Mar 2 2010 Huzaifa Sidhpurwala 1.1.0-1 - New upstream 1.1.0 release - Split package into binary and data part * Thu Sep 17 2009 Peter Robinson 1.0.5-1 - new upstream 1.0.5 release * Sun Aug 02 2009 Robert M. Albrecht 1.0.2-1 - new upstream release * Sun Jul 26 2009 Fedora Release Engineering - 0.9.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering - 0.9.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sun Jan 11 2009 Robert M. Albrecht 0.9.6-1 * new upstream release * Sat Dec 13 2008 Robert M. Albrecht 0.9.5-1 * new upstream release * Sat Jun 22 2008 Robert M. Albrecht 0.9.4-2 - Fixed some rpmlint errors - Added german translation * Sat Jun 22 2008 Robert M. Albrecht 0.9.4-1 - Update to 0.9.4 - Honor RPM_OPT_FLAGS * Sat May 26 2008 Robert M. Albrecht 0.9.4-0.1.beta2 - First package Release