]>
Commit | Line | Data |
---|---|---|
b8f9753f JB |
1 | # |
2 | # Conditional build: | |
8fe07087 JB |
3 | %bcond_without apidocs # API documentation |
4 | %bcond_without static_libs # static library | |
0c72b7a8 | 5 | %bcond_without vala # Vala API |
b45f2707 | 6 | |
b8f9753f JB |
7 | Summary: GUsb - GObject wrapper for libusb1 library |
8 | Summary(pl.UTF-8): GUsb - obudowanie GObject biblioteki libusb1 | |
9 | Name: libgusb | |
0f59d908 | 10 | Version: 0.3.4 |
34638842 | 11 | Release: 1 |
b8f9753f JB |
12 | License: LGPL v2.1+ |
13 | Group: Libraries | |
4d22d43d | 14 | Source0: https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz |
0f59d908 | 15 | # Source0-md5: 0f72fa5081f42fc798969027870eb384 |
8fe07087 | 16 | BuildRequires: gcc >= 5:3.2 |
c6fb2f40 | 17 | BuildRequires: glib2-devel >= 1:2.44.0 |
0c72b7a8 | 18 | BuildRequires: gobject-introspection-devel >= 1.29 |
b4e7b800 | 19 | BuildRequires: gtk-doc >= 1.9 |
52721825 JB |
20 | BuildRequires: libusb-devel >= 1.0.22 |
21 | BuildRequires: meson >= 0.46.0 | |
0f59d908 | 22 | BuildRequires: ninja >= 1.5 |
b8f9753f | 23 | BuildRequires: pkgconfig |
0f59d908 | 24 | BuildRequires: rpmbuild(macros) >= 1.736 |
8fe07087 | 25 | BuildRequires: sed >= 4.0 |
b8f9753f | 26 | BuildRequires: tar >= 1:1.22 |
0c72b7a8 | 27 | %{?with_vala:BuildRequires: vala >= 2:0.16} |
b8f9753f | 28 | BuildRequires: xz |
c6fb2f40 | 29 | Requires: glib2 >= 1:2.44.0 |
52721825 | 30 | Requires: libusb >= 1.0.22 |
b8f9753f JB |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
34 | GUsb is a GObject wrapper for libusb1 that makes it easy to do | |
35 | asynchronous control, bulk and interrupt transfers with proper | |
36 | cancellation and integration into a mainloop. This makes it easy to | |
37 | integrate low level USB transfers with your high-level application or | |
38 | system daemon. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | GUsb to obudowanie GObject biblioteki libusb1, ułatwiające | |
b45f2707 ER |
42 | asynchroniczne sterowanie oraz przesyłanie danych (typu bulk jak i z |
43 | użyciem przerwań) z właściwym przerywaniem i integracją w głównej | |
b8f9753f JB |
44 | pętli. Ułatwia to integrowanie niskopoziomowego przesyłania danych po |
45 | USB w wysokopoziomowej aplikacji lub demonie systemowym. | |
46 | ||
47 | %package devel | |
48 | Summary: Header files for GUsb library | |
49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GUsb | |
50 | Group: Development/Libraries | |
51 | Requires: %{name} = %{version}-%{release} | |
c6fb2f40 | 52 | Requires: glib2-devel >= 1:2.44.0 |
52721825 | 53 | Requires: libusb-devel >= 1.0.22 |
b8f9753f JB |
54 | |
55 | %description devel | |
56 | Header files for GUsb library. | |
57 | ||
58 | %description devel -l pl.UTF-8 | |
59 | Pliki nagłówkowe biblioteki GUsb. | |
60 | ||
61 | %package static | |
62 | Summary: Static GUsb library | |
63 | Summary(pl.UTF-8): Statyczna biblioteka GUsb | |
64 | Group: Development/Libraries | |
65 | Requires: %{name}-devel = %{version}-%{release} | |
66 | ||
67 | %description static | |
68 | Static GUsb library. | |
69 | ||
70 | %description static -l pl.UTF-8 | |
71 | Statyczna biblioteka GUsb. | |
72 | ||
73 | %package apidocs | |
74 | Summary: GUsb API documentation | |
75 | Summary(pl.UTF-8): Dokumentacja API biblioteki GUsb | |
76 | Group: Documentation | |
0f59d908 | 77 | %if "%{_rpmversion}" >= "4.6" |
b4e7b800 ER |
78 | BuildArch: noarch |
79 | %endif | |
b8f9753f JB |
80 | |
81 | %description apidocs | |
82 | API and internal documentation for GUsb library. | |
83 | ||
84 | %description apidocs -l pl.UTF-8 | |
85 | Dokumentacja API biblioteki GUsb. | |
86 | ||
0c72b7a8 JB |
87 | %package -n vala-libgusb |
88 | Summary: Vala API for libgusb | |
89 | Summary(pl.UTF-8): API języka Vala do libgusb | |
90 | Group: Development/Libraries | |
91 | Requires: %{name}-devel = %{version}-%{release} | |
92 | Requires: vala >= 2:0.16 | |
0f59d908 | 93 | %if "%{_rpmversion}" >= "4.6" |
b45f2707 ER |
94 | BuildArch: noarch |
95 | %endif | |
0c72b7a8 JB |
96 | |
97 | %description -n vala-libgusb | |
98 | Vala API for libgusb. | |
99 | ||
100 | %description -n vala-libgusb -l pl.UTF-8 | |
101 | API języka Vala do libgusb. | |
102 | ||
b8f9753f JB |
103 | %prep |
104 | %setup -q | |
b8f9753f | 105 | |
8fe07087 JB |
106 | %if %{with static_libs} |
107 | %{__sed} -i -e 's/shared_library/library/' gusb/meson.build | |
108 | %endif | |
109 | ||
b8f9753f | 110 | %build |
43182ba7 JP |
111 | %meson build \ |
112 | -Dvapi=%{__true_false vala} | |
8fe07087 | 113 | |
0f59d908 | 114 | %ninja_build -C build |
b8f9753f JB |
115 | |
116 | %install | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
0f59d908 | 119 | %ninja_install -C build |
b8f9753f JB |
120 | |
121 | %clean | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %post -p /sbin/ldconfig | |
125 | %postun -p /sbin/ldconfig | |
126 | ||
127 | %files | |
128 | %defattr(644,root,root,755) | |
8fe07087 | 129 | %doc AUTHORS MAINTAINERS NEWS README.md |
4d22d43d | 130 | %attr(755,root,root) %{_bindir}/gusbcmd |
b8f9753f JB |
131 | %attr(755,root,root) %{_libdir}/libgusb.so.*.*.* |
132 | %attr(755,root,root) %ghost %{_libdir}/libgusb.so.2 | |
0c72b7a8 | 133 | %{_libdir}/girepository-1.0/GUsb-1.0.typelib |
b8f9753f JB |
134 | |
135 | %files devel | |
136 | %defattr(644,root,root,755) | |
137 | %attr(755,root,root) %{_libdir}/libgusb.so | |
138 | %{_includedir}/gusb-1 | |
0c72b7a8 | 139 | %{_datadir}/gir-1.0/GUsb-1.0.gir |
b8f9753f JB |
140 | %{_pkgconfigdir}/gusb.pc |
141 | ||
8fe07087 | 142 | %if %{with static_libs} |
b8f9753f JB |
143 | %files static |
144 | %defattr(644,root,root,755) | |
145 | %{_libdir}/libgusb.a | |
8fe07087 | 146 | %endif |
b8f9753f JB |
147 | |
148 | %if %{with apidocs} | |
149 | %files apidocs | |
150 | %defattr(644,root,root,755) | |
151 | %{_gtkdocdir}/gusb | |
152 | %endif | |
0c72b7a8 JB |
153 | |
154 | %if %{with vala} | |
155 | %files -n vala-libgusb | |
156 | %defattr(644,root,root,755) | |
8fe07087 | 157 | %{_datadir}/vala/vapi/gusb.deps |
0c72b7a8 JB |
158 | %{_datadir}/vala/vapi/gusb.vapi |
159 | %endif |