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