Add a LICENSE.MIT file and it to the build spec.
[platform/upstream/libusb.git] / packaging / libusb.spec
1 %define TIZEN_FEATURE_USBHOST_API on
2
3 Name:           libusb
4 Version:        1.0.21
5 Release:        0
6 License:        LGPL-2.1+, MIT
7 Summary:        USB Library
8 Url:            http://www.libusb.org/
9 Group:          Base/Device Management
10 Source:         %{name}-%{version}.tar.bz2
11 Source1:        baselibs.conf
12 Source1001:     libusb.manifest
13 BuildRequires:  pkg-config
14 BuildRequires:  systemd-devel
15 %if %{?TIZEN_FEATURE_USBHOST_API} == on
16 BuildRequires:  pkgconfig(dbus-1)
17 %endif
18
19 %description
20 Libusb is a library that allows userspace access to USB devices.
21
22 %package devel
23 Summary:        USB Library
24 Group:          Development/Libraries
25 Requires:       glibc-devel
26 Requires:       libusb = %{version}
27
28 %description devel
29 Libusb is a library that allows userspace access to USB devices.
30
31 %prep
32 %setup -q
33 cp %{SOURCE1001} .
34
35 %build
36 %reconfigure\
37         --with-pic\
38 %if %{?TIZEN_FEATURE_USBHOST_API} == on
39         --enable-usbhost-api \
40 %endif
41         --disable-static
42 make %{?_smp_mflags}
43
44 %install
45 %make_install
46 # usbhost_module
47 mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d
48 install -m 644 udev/99-usbhost.rules %{buildroot}%{_prefix}/lib/udev/rules.d/99-usbhost.rules
49
50 %post  -p /sbin/ldconfig
51
52 %postun  -p /sbin/ldconfig
53
54 %files
55 %manifest %{name}.manifest
56 %defattr(-,root,root)
57 %license LICENSE.LGPL-2.1+ LICENSE.MIT
58 %{_libdir}/*.so.*
59 # usbhost_module
60 %{_prefix}/lib/udev/rules.d/99-usbhost.rules
61
62 %files devel
63 %manifest %{name}.manifest
64 %defattr(-,root,root)
65 %license LICENSE.LGPL-2.1+ LICENSE.MIT
66 %{_includedir}/libusb-1.0
67 %{_libdir}/*.so
68 %{_libdir}/pkgconfig/*.pc
69
70 %changelog