3 %bcond_without apidocs # API documentation
4 %bcond_without static_libs # static library
5 %bcond_without vala # Vala API
7 Summary: GUsb - GObject wrapper for libusb1 library
8 Summary(pl.UTF-8): GUsb - obudowanie GObject biblioteki libusb1
14 Source0: https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
15 # Source0-md5: 5effbae7609134a51f3ec295733302c3
16 BuildRequires: gcc >= 5:3.2
17 BuildRequires: glib2-devel >= 1:2.44.0
18 BuildRequires: gobject-introspection-devel >= 1.29
19 BuildRequires: gtk-doc >= 1.9
20 BuildRequires: libusb-devel >= 1.0.22
21 BuildRequires: meson >= 0.46.0
22 BuildRequires: ninja >= 1.5
23 BuildRequires: pkgconfig
24 BuildRequires: rpm-build >= 4.6
25 BuildRequires: rpmbuild(macros) >= 1.736
26 BuildRequires: sed >= 4.0
27 BuildRequires: tar >= 1:1.22
28 %{?with_vala:BuildRequires: vala >= 2:0.16}
30 Requires: glib2 >= 1:2.44.0
31 Requires: libusb >= 1.0.22
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 GUsb is a GObject wrapper for libusb1 that makes it easy to do
36 asynchronous control, bulk and interrupt transfers with proper
37 cancellation and integration into a mainloop. This makes it easy to
38 integrate low level USB transfers with your high-level application or
41 %description -l pl.UTF-8
42 GUsb to obudowanie GObject biblioteki libusb1, ułatwiające
43 asynchroniczne sterowanie oraz przesyłanie danych (typu bulk jak i z
44 użyciem przerwań) z właściwym przerywaniem i integracją w głównej
45 pętli. Ułatwia to integrowanie niskopoziomowego przesyłania danych po
46 USB w wysokopoziomowej aplikacji lub demonie systemowym.
49 Summary: Header files for GUsb library
50 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GUsb
51 Group: Development/Libraries
52 Requires: %{name} = %{version}-%{release}
53 Requires: glib2-devel >= 1:2.44.0
54 Requires: libusb-devel >= 1.0.22
57 Header files for GUsb library.
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki GUsb.
63 Summary: Static GUsb library
64 Summary(pl.UTF-8): Statyczna biblioteka GUsb
65 Group: Development/Libraries
66 Requires: %{name}-devel = %{version}-%{release}
71 %description static -l pl.UTF-8
72 Statyczna biblioteka GUsb.
75 Summary: GUsb API documentation
76 Summary(pl.UTF-8): Dokumentacja API biblioteki GUsb
81 API and internal documentation for GUsb library.
83 %description apidocs -l pl.UTF-8
84 Dokumentacja API biblioteki GUsb.
86 %package -n vala-libgusb
87 Summary: Vala API for libgusb
88 Summary(pl.UTF-8): API języka Vala do libgusb
89 Group: Development/Libraries
90 Requires: %{name}-devel = %{version}-%{release}
91 Requires: vala >= 2:0.16
94 %description -n vala-libgusb
97 %description -n vala-libgusb -l pl.UTF-8
98 API języka Vala do libgusb.
103 %if %{with static_libs}
104 %{__sed} -i -e 's/shared_library/library/' gusb/meson.build
109 -Dvapi=%{__true_false vala}
111 %ninja_build -C build
114 rm -rf $RPM_BUILD_ROOT
116 %ninja_install -C build
119 rm -rf $RPM_BUILD_ROOT
121 %post -p /sbin/ldconfig
122 %postun -p /sbin/ldconfig
125 %defattr(644,root,root,755)
126 %doc AUTHORS MAINTAINERS NEWS README.md
127 %attr(755,root,root) %{_bindir}/gusbcmd
128 %attr(755,root,root) %{_libdir}/libgusb.so.*.*.*
129 %attr(755,root,root) %ghost %{_libdir}/libgusb.so.2
130 %{_libdir}/girepository-1.0/GUsb-1.0.typelib
133 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_libdir}/libgusb.so
135 %{_includedir}/gusb-1
136 %{_datadir}/gir-1.0/GUsb-1.0.gir
137 %{_pkgconfigdir}/gusb.pc
139 %if %{with static_libs}
141 %defattr(644,root,root,755)
147 %defattr(644,root,root,755)
152 %files -n vala-libgusb
153 %defattr(644,root,root,755)
154 %{_datadir}/vala/vapi/gusb.deps
155 %{_datadir}/vala/vapi/gusb.vapi