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