summaryrefslogtreecommitdiffstats
path: root/mingw32-libusb-win32.spec
blob: 37dd6ae781026bc944435ed16a0fc2958f44d01c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
%define __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}

%define		tarname libusb-win32-src

Name:		mingw32-libusb-win32
Version:	0.1.12.1
Release:	1%{?dist}
Summary:	Win32 port of libusb

Group:		Development/Libraries
# The source package also contains code under GPLv2+, but we do
# not ship it in the binary RPM.
License:	LGPLv2+
URL:		http://libusb-win32.sourceforge.net/
Source0:	http://prdownloads.sourceforge.net/libusb-win32/%{tarname}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	mingw32-filesystem >= 30
BuildRequires:	mingw32-binutils
BuildRequires:	mingw32-gcc
BuildRequires:	dos2unix

BuildArch:	noarch


%description
libusb-win32 is a port of the USB library libusb to the Windows
operating systems (Win98SE, WinME, Win2k, WinXP).

The library allows user space applications to access any USB
device on Windows in a generic way without writing any line of
kernel driver code.


%prep
%setup -q -n %{tarname}-%{version}


%build
export PATH=%{_mingw32_bindir}:$PATH
# Build is not smp safe
make host_prefix=%{_mingw32_target}
dos2unix AUTHORS.txt
dos2unix README.txt


%install
rm -rf "%buildroot"
#make bin_dist DESTDIR="%buildroot"
%{__install} -m 0755 -d "%{buildroot}%{_mingw32_bindir}"
%{__install} -m 0755 libusb0.dll "%{buildroot}%{_mingw32_bindir}"
%{__install} -m 0755 -d "%{buildroot}%{_mingw32_includedir}"
%{__install} -m 0644 src/usb.h "%{buildroot}%{_mingw32_includedir}"


%clean
rm -rf "%buildroot"


%files
%defattr(-,root,root,-)
%doc AUTHORS.txt README.txt
%{_mingw32_bindir}/libusb0.dll
%{_mingw32_includedir}/usb.h

%changelog
* Wed Feb 18 2009 Hans Ulrich Niedermann <hun@n-dimensional.de> - 0.1.12.1-1
- initial packaging