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