diff --git a/.cvsignore b/.cvsignore index 3710cf2..b379a6c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -usb_modeswitch-1.0.5.tar.bz2 +usb-modeswitch-1.1.0.tar.bz2 diff --git a/sources b/sources index 7de17e7..d15adb1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -294848bbbcbd77dc9a4caf08327ca297 usb_modeswitch-1.0.5.tar.bz2 +ca19c6d2b8f933133b5ea344474abc7d usb-modeswitch-1.1.0.tar.bz2 diff --git a/usb_modeswitch.spec b/usb_modeswitch.spec index 8795e4c..524ba93 100644 --- a/usb_modeswitch.spec +++ b/usb_modeswitch.spec @@ -1,12 +1,14 @@ +%define source_name usb-modeswitch + Name: usb_modeswitch -Version: 1.0.5 +Version: 1.1.0 Release: 1%{?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}/%{name}-%{version}.tar.bz2 +Source0: http://www.draisberghof.de/%{name}/%{source_name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libusb-devel @@ -23,18 +25,34 @@ 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: %{name} = %{version}-%{release} + +%description data +Contains the device database and the rules file, including full paths + %prep -%setup -q +%setup -q -n %{source_name}-%{version} %build -gcc $RPM_OPT_FLAGS -l usb -o usb_modeswitch usb_modeswitch.c +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 $RPM_BUILD_ROOT%{_sysconfdir} +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 +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 @@ -42,10 +60,20 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_bindir}/usb_modeswitch +%{_mandir}/man1/usb_modeswitch.1.gz %config(noreplace) %{_sysconfdir}/usb_modeswitch.conf -%doc COPYING README* +%doc COPYING README ChangeLog + +%files data +/lib/udev/rules.d/40-usb_modeswitch.rules +/lib/udev/usb_modeswitch.sh +%{_sysconfdir}/usb_modeswitch.d/ %changelog +* 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