71aaa9
%define source_name	usb-modeswitch
71aaa9
71aaa9
Name:		usb_modeswitch
71aaa9
Version:	2.5.2
71aaa9
Release:	1%{?dist}
71aaa9
Summary:	USB Modeswitch gets mobile broadband cards in operational mode
71aaa9
Summary(de):	USB Modeswitch aktiviert UMTS-Karten
71aaa9
Group:		Applications/System
71aaa9
License:	GPLv2+
71aaa9
URL:		http://www.draisberghof.de/usb_modeswitch/
71aaa9
71aaa9
Source0:	http://www.draisberghof.de/%{name}/%{source_name}-%{version}.tar.bz2
71aaa9
Source1:	http://www.draisberghof.de/usb_modeswitch/device_reference.txt
71aaa9
71aaa9
# Submitted upstream (2014-11-24)
71aaa9
Patch0: device_reference-utf8.patch
71aaa9
# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2733
71aaa9
Patch1: 0001-usb_modeswitch-count-the-target-devices-from-zero.patch
71aaa9
71aaa9
BuildRequires:	libusbx-devel
71aaa9
BuildRequires:	jimtcl-devel
71aaa9
BuildRequires:	systemd
71aaa9
Requires:	usb_modeswitch-data >= 20121109
71aaa9
Requires:	systemd
71aaa9
71aaa9
%description
71aaa9
USB Modeswitch brings up your datacard into operational mode. When plugged
71aaa9
in they identify themselves as cdrom and present some non-Linux compatible
71aaa9
installation files. This tool deactivates this cdrom-device and enables
71aaa9
the real communication device. It supports most devices built and
71aaa9
sold by Huawei, T-Mobile, Vodafone, Option, ZTE, Novatel.
71aaa9
71aaa9
%description	-l de
71aaa9
USB Modeswitch deaktiviert die CDROM-Emulation einiger UMTS-Karten.
71aaa9
Dadurch erkennt Linux die Datenkarte und kann damit Internet-
71aaa9
Verbindungen aufbauen. Die gängigen Karten von Huawei, T-Mobile,
71aaa9
Vodafone, Option, ZTE und Novatell werden unterstützt.
71aaa9
71aaa9
71aaa9
%prep
71aaa9
%setup -q -n %{source_name}-%{version}
71aaa9
cp -f %{SOURCE1} device_reference.txt
71aaa9
71aaa9
%patch0 -p0
71aaa9
%patch1 -p1
71aaa9
71aaa9
71aaa9
%build
71aaa9
%{set_build_flags}
71aaa9
make %{?_smp_mflags}
71aaa9
71aaa9
71aaa9
%install
71aaa9
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
71aaa9
make install \
71aaa9
	DESTDIR=$RPM_BUILD_ROOT \
71aaa9
	SYSDIR=$RPM_BUILD_ROOT%{_unitdir} \
71aaa9
	UDEVDIR=$RPM_BUILD_ROOT%{_prefix}/lib/udev
71aaa9
71aaa9
71aaa9
%files
71aaa9
%{_sbindir}/usb_modeswitch
71aaa9
%{_sbindir}/usb_modeswitch_dispatcher
71aaa9
%{_mandir}/man1/usb_modeswitch.1.gz
71aaa9
%{_mandir}/man1/usb_modeswitch_dispatcher.1.gz
71aaa9
%{_prefix}/lib/udev/usb_modeswitch
71aaa9
%{_unitdir}/usb_modeswitch@.service
71aaa9
%config(noreplace) %{_sysconfdir}/usb_modeswitch.conf
71aaa9
%doc COPYING README ChangeLog device_reference.txt 
71aaa9
71aaa9
71aaa9
%changelog
71aaa9
* Wed Feb 28 2018 Lubomir Rintel <lkundrak@v3.sk> - 2.5.2-1
71aaa9
- New 2.5.2 release
71aaa9
71aaa9
* Fri Feb 23 2018 Florian Weimer <fweimer@redhat.com> - 2.5.1-3
71aaa9
- Use LDFLAGS from redhat-rpm-config
71aaa9
71aaa9
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
71aaa9
71aaa9
* Fri Aug 18 2017 Lubomir Rintel <lkundrak@v3.sk> - 2.5.1-1
71aaa9
- New 2.5.1 release
71aaa9
71aaa9
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-8
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
71aaa9
71aaa9
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-7
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
71aaa9
71aaa9
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-6
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
71aaa9
71aaa9
* Fri Jul 29 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.0-5
71aaa9
- Bump the release number to be higher than in Fedora 24
71aaa9
71aaa9
* Thu Jul 21 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.0-3
71aaa9
- Fix undefined behavior in config parser (rh #1352055)
71aaa9
71aaa9
* Wed Jul 20 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.0-2
71aaa9
- Add the previously omitted systemd service file (rh #1352055)
71aaa9
- Fix crash with invalid arguments (rh #1358472)
71aaa9
71aaa9
* Wed Jun 22 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.0-1
71aaa9
- New 2.4.0 release
71aaa9
71aaa9
* Tue May 03 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.3.0-1
71aaa9
- New 2.3.0 release
71aaa9
71aaa9
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.5-2
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
71aaa9
71aaa9
* Tue Aug 18 2015 Lubomir Rintel <lkundrak@v3.sk> - 2.2.5-1
71aaa9
- New 2.2.5 release
71aaa9
71aaa9
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-2
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
71aaa9
71aaa9
* Sun Feb 22 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.2.1-1
71aaa9
- New 2.2.1 release
71aaa9
71aaa9
* Mon Nov 24 2014 Till Maas <opensource@till.name> - 2.2.0-2
71aaa9
- Update device_reference.txt, make it proper UTF-8
71aaa9
71aaa9
* Tue Aug 26 2014 Robert M. Albrecht <mail@romal.de> - 2.2.0-1
71aaa9
- New upstream release
71aaa9
- Fixed a typo in the description
71aaa9
71aaa9
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
71aaa9
71aaa9
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
71aaa9
71aaa9
* Wed Apr 16 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.1.1-1
71aaa9
- Update to 2.1.1
71aaa9
71aaa9
* Tue Jan 28 2014 Dan Williams <dcbw@redhat.com> - 2.0.1-2
71aaa9
- Resurrect manpage patch
71aaa9
71aaa9
* Mon Jan  6 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.0.1-1
71aaa9
- Update to 2.0.1 and build against libusbx (RHBZ 994974)
71aaa9
- Use distro jimtcl (RHBZ 967314)
71aaa9
- Fix build on aarch64
71aaa9
- Cleanup and modernise spec
71aaa9
71aaa9
* Wed Aug 28 2013 Thomas Haller <thaller@redhat.com> 1.2.7-3
71aaa9
- Add manual page for usb_modeswitch_dispatcher and fix errors in
71aaa9
  manual page of usb_modeswitch (rhbz#948451, rhbz#884203).
71aaa9
71aaa9
* Mon Aug 26 2013 Dan Williams <dcbw@redhat.com> - 1.2.7-2
71aaa9
- Fix udev helper path
71aaa9
71aaa9
* Fri Aug 16 2013 Dan Williams <dcbw@redhat.com> - 1.2.7-1
71aaa9
- New upstream release
71aaa9
71aaa9
* Fri Jul 26 2013 Dan Williams <dcbw@redhat.com> - 1.2.6-2
71aaa9
- Fix udev directories
71aaa9
71aaa9
* Wed Jun 12 2013 Huzaifa Sidhpurwala <huzaifas@redhat.com> - 1.2.6
71aaa9
- New upstream release.
71aaa9
71aaa9
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-2
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
71aaa9
71aaa9
* Tue Nov 13 2012 Huzaifa Sidhpurwala <huzaifas@redhat.com> - 1.2.5-1
71aaa9
- New upstream release. Resolves rhbz#875832
71aaa9
71aaa9
* Fri Aug 24 2012 Huzaifa Sidhpurwala <huzaifas@redhat.com> - 1.2.4-1
71aaa9
- New upstream release. Resolves rhbz#785539
71aaa9
71aaa9
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
71aaa9
71aaa9
* Tue Apr 24 2012 Dan Williams <dcbw@redhat.com> 1.2.3-1
71aaa9
- Update to new upstream release
71aaa9
- Build TCL tool as a static binary to remove dependency on TCL itself rhbz#760839
71aaa9
71aaa9
* Wed Jan 25 2012 Huzaifa Sidhpurwala <huzaifas@redhat.com> 1.2.2-2
71aaa9
- Add usb_modeswitch.sh udev script and move Tcl dispatcher script to sbindir,
71aaa9
  resolves rhbz#782614, patch from Dominic Cleal
71aaa9
- Fix bus/device-based search, from deb#656248
71aaa9
71aaa9
* Fri Jan 20 2012 Huzaifa Sidhpurwala <huzaifas@redhat.com> 1.2.2
71aaa9
- New upstream version 1.2.2
71aaa9
71aaa9
* Fri Jan 06 2012 Huzaifa Sidhpurwala <huzaifas@redhat.com> 1.2.1-1
71aaa9
- New upstream version 1.2.1
71aaa9
71aaa9
* Tue Oct 25 2011 Huzaifa Sidhpurwala <huzaifas@redhat.com> 1.2.0-1
71aaa9
- New upstream
71aaa9
- use device_reference.txt from upstream
71aaa9
71aaa9
* Mon Mar 28 2011 Rahul Sundaram <sundaram@fedoraproject.org> - 1.1.7-1
71aaa9
- New upstream release.  Resolves rhbz#625004
71aaa9
- Update spec to match current guidelines
71aaa9
- Fix relevant rpmlint errors and warnings
71aaa9
71aaa9
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.6-2
71aaa9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
71aaa9
71aaa9
* Thu Dec 30 2010 Dan Williams <dcbw@redhat.com> 1.1.6-1
71aaa9
- New upstream version