File usb_modeswitch.spec of Package usb_modeswitch

#
# spec file for package usb_modeswitch (Version 0.9.6)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Url:            http://www.draisberghof.de/usb_modeswitch/

Name:           usb_modeswitch
Version:        0.9.6
Release:        3
Summary:        A mode switching tool for controlling multiple-device USB gear
Group:          Hardware/Mobile
License:        GPL v2 or later
Source0:        http://www.draisberghof.de/usb_modeswitch/%{name}-%{version}.tar.bz2
Source1:        http://www.draisberghof.de/usb_modeswitch/usb_modeswitch.conf
Source2:        modeswitch.conf2udevrules.pl
Source3:        51-usb-modeswitch.rules
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc libusb-devel make udev
Requires:       /bin/eject

%description
USB_ModeSwitch is a mode switching tool for controlling "flip flop"
(multiple device) USB gear. It allows so-called "Zero-CD" devices that
show up as USB storage initially to be switched into their more useful
"application mode". This is most common for UMTS/3G wireless WAN
devices.



Authors:
--------
    Josua Dietze and others

%prep
%setup -q

%build
gcc $RPM_OPT_FLAGS -o usb_modeswitch usb_modeswitch.c -lusb
#./compile.sh
chmod 644 %{S:2} # for rpmlint
cp %{S:2} .

%install
install -c -D -m 755 usb_modeswitch $RPM_BUILD_ROOT%{_sbindir}/usb_modeswitch
# install -c -D -m 600 usb_modeswitch.conf $RPM_BUILD_ROOT/etc/usb_modeswitch.conf
install -c -D -m 644 %{S:1} $RPM_BUILD_ROOT/etc/usb_modeswitch.conf
install -c -D -m 644 %{S:3} $RPM_BUILD_ROOT/etc/udev/rules.d/51-usb-modeswitch.rules

%files
%defattr(-,root,root,-)
%{_sbindir}/usb_modeswitch
%config /etc/usb_modeswitch.conf
%dir /etc/udev/rules.d
%config /etc/udev/rules.d/51-usb-modeswitch.rules
%doc README modeswitch.conf2udevrules.pl

%changelog
* Wed Jan 21 2009 seife@suse.de
- add dependency on /bin/eject (used in the udev rules)
* Wed Jan 21 2009 seife@suse.de
- update usb_modeswitch.conf (from 2009-01-13)
- add udev rules and a script to create them from the config file
* Mon Jan 12 2009 seife@suse.de
- update to version 0.9.6
  - special modes added for Sierra and Sony Ericsson, new devices
* Fri Nov 07 2008 seife@suse.de
- copied the package from home:perosb (Thanks!)
- added the latest config file from the home page
- install README
- use RPM_OPT_FLAGS
- enable useful debug info by not stripping the binary
openSUSE Build Service is sponsored by