packages: usb-modeswitch/usb-modeswitch.spec (NEW), usb-modeswitch/usb-mode...
megabajt
megabajt at pld-linux.org
Fri May 28 12:50:39 CEST 2010
Author: megabajt Date: Fri May 28 10:50:39 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- new
---- Files affected:
packages/usb-modeswitch:
usb-modeswitch.spec (NONE -> 1.1) (NEW), usb-modeswitch-makefile.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/usb-modeswitch/usb-modeswitch.spec
diff -u /dev/null packages/usb-modeswitch/usb-modeswitch.spec:1.1
--- /dev/null Fri May 28 12:50:39 2010
+++ packages/usb-modeswitch/usb-modeswitch.spec Fri May 28 12:50:33 2010
@@ -0,0 +1,66 @@
+# $Revision$, $Date$
+Summary: Switching tool for controlling "flip flop" USB devices
+Name: usb-modeswitch
+Version: 1.1.2
+Release: 1
+License: GPL v2
+Group: Applications
+Source0: http://www.draisberghof.de/usb_modeswitch/%{name}-%{version}.tar.bz2
+# Source0-md5: 071cb300d00938bfe20025c654303d92
+Patch0: %{name}-makefile.patch
+URL: http://www.draisberghof.de/usb_modeswitch/
+BuildRequires: libusb-devel
+Requires: tcl
+Suggests: usb-modeswitch-data
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__make} \
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags}" \
+ LDFLAGS="%{rpmldflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/usb_modeswitch.d
+
+%{__make} install \
+ PREFIX=$RPM_BUILD_ROOT%{_prefix} \
+ DESTDIR=$RPM_BUILD_ROOT
+
+install usb_modeswitch.setup $RPM_BUILD_ROOT%{_sysconfdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog README
+%attr(755,root,root) %{_sbindir}/usb_modeswitch
+%attr(755,root,root) /lib/udev/usb_modeswitch
+%dir %{_sysconfdir}/usb_modeswitch.d
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/usb_modeswitch.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/usb_modeswitch.setup
+%{_mandir}/man1/usb_modeswitch.1*
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2010/05/28 10:50:33 megabajt
+- new
+
================================================================
Index: packages/usb-modeswitch/usb-modeswitch-makefile.patch
diff -u /dev/null packages/usb-modeswitch/usb-modeswitch-makefile.patch:1.1
--- /dev/null Fri May 28 12:50:39 2010
+++ packages/usb-modeswitch/usb-modeswitch-makefile.patch Fri May 28 12:50:33 2010
@@ -0,0 +1,32 @@
+diff -urN usb-modeswitch-1.1.2/Makefile usb-modeswitch-1.1.2.new//Makefile
+--- usb-modeswitch-1.1.2/Makefile 2010-04-17 20:27:11.000000000 +0200
++++ usb-modeswitch-1.1.2.new//Makefile 2010-05-25 13:33:59.581100781 +0200
+@@ -1,7 +1,9 @@
+ PROG = usb_modeswitch
+ VERS = 1.1.2
+ CC = gcc
+-CFLAGS += -Wall -l usb
++CFLAGS += -Wall
++LDFLAGS = $(NULL)
++LIBS = -lusb
+ RM = /bin/rm -f
+ OBJS = usb_modeswitch.c
+ PREFIX = $(DESTDIR)/usr
+@@ -15,13 +17,16 @@
+ all: $(PROG)
+
+ $(PROG): $(OBJS)
+- $(CC) -o $(PROG) $(OBJS) $(CFLAGS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJS) $(LIBS)
+
+ clean:
+ $(RM) usb_modeswitch
+
+ install: all
+ install -d $(SBINDIR)
++ install -d $(UDEVDIR)
++ install -d $(ETCDIR)
++ install -d $(MANDIR)
+ install --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch
+ install --mode=755 usb_modeswitch.tcl $(UDEVDIR)/usb_modeswitch
+ install --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf
================================================================
More information about the pld-cvs-commit
mailing list