]> git.pld-linux.org Git - packages/libgusb.git/blob - libgusb.spec
8e5f57ba6fa9199e8bb0f091e8292ed8dc477b5e
[packages/libgusb.git] / libgusb.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_without  static_libs     # static library
5 %bcond_without  vala            # Vala API
6
7 Summary:        GUsb - GObject wrapper for libusb1 library
8 Summary(pl.UTF-8):      GUsb - obudowanie GObject biblioteki libusb1
9 Name:           libgusb
10 Version:        0.3.10
11 Release:        1
12 License:        LGPL v2.1+
13 Group:          Libraries
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}
29 BuildRequires:  xz
30 Requires:       glib2 >= 1:2.44.0
31 Requires:       libusb >= 1.0.22
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
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
39 system daemon.
40
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.
47
48 %package devel
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
55
56 %description devel
57 Header files for GUsb library.
58
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki GUsb.
61
62 %package static
63 Summary:        Static GUsb library
64 Summary(pl.UTF-8):      Statyczna biblioteka GUsb
65 Group:          Development/Libraries
66 Requires:       %{name}-devel = %{version}-%{release}
67
68 %description static
69 Static GUsb library.
70
71 %description static -l pl.UTF-8
72 Statyczna biblioteka GUsb.
73
74 %package apidocs
75 Summary:        GUsb API documentation
76 Summary(pl.UTF-8):      Dokumentacja API biblioteki GUsb
77 Group:          Documentation
78 BuildArch:      noarch
79
80 %description apidocs
81 API and internal documentation for GUsb library.
82
83 %description apidocs -l pl.UTF-8
84 Dokumentacja API biblioteki GUsb.
85
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
92 BuildArch:      noarch
93
94 %description -n vala-libgusb
95 Vala API for libgusb.
96
97 %description -n vala-libgusb -l pl.UTF-8
98 API języka Vala do libgusb.
99
100 %prep
101 %setup -q
102
103 %if %{with static_libs}
104 %{__sed} -i -e 's/shared_library/library/' gusb/meson.build
105 %endif
106
107 %build
108 %meson build \
109         -Dvapi=%{__true_false vala}
110
111 %ninja_build -C build
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 %ninja_install -C build
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.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
131
132 %files devel
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
138
139 %if %{with static_libs}
140 %files static
141 %defattr(644,root,root,755)
142 %{_libdir}/libgusb.a
143 %endif
144
145 %if %{with apidocs}
146 %files apidocs
147 %defattr(644,root,root,755)
148 %{_gtkdocdir}/gusb
149 %endif
150
151 %if %{with vala}
152 %files -n vala-libgusb
153 %defattr(644,root,root,755)
154 %{_datadir}/vala/vapi/gusb.deps
155 %{_datadir}/vala/vapi/gusb.vapi
156 %endif
This page took 0.038182 seconds and 2 git commands to generate.