]> git.pld-linux.org Git - packages/libgusb.git/blob - libgusb.spec
remove static libs workaround outdated since 0.3.2
[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.4.9
11 Release:        1
12 License:        LGPL v2.1+
13 Group:          Libraries
14 #Source0Download: https://github.com/hughsie/libgusb/releases
15 Source0:        https://github.com/hughsie/libgusb/releases/download/%{version}/%{name}-%{version}.tar.xz
16 # Source0-md5:  354a3227334991ea4e924843c144bd82
17 URL:            https://github.com/hughsie/libgusb
18 BuildRequires:  gcc >= 5:3.2
19 BuildRequires:  glib2-devel >= 1:2.44.0
20 BuildRequires:  gobject-introspection-devel >= 1.29
21 %{?with_apidocs:BuildRequires:  gi-docgen >= 2021.1}
22 BuildRequires:  json-glib-devel >= 1.1.1
23 BuildRequires:  libusb-devel >= 1.0.22
24 BuildRequires:  meson >= 0.56.0
25 BuildRequires:  ninja >= 1.5
26 BuildRequires:  pkgconfig
27 BuildRequires:  rpm-build >= 4.6
28 BuildRequires:  rpmbuild(macros) >= 2.029
29 BuildRequires:  sed >= 4.0
30 BuildRequires:  tar >= 1:1.22
31 %{?with_vala:BuildRequires:     vala >= 2:0.16}
32 BuildRequires:  xz
33 Requires:       glib2 >= 1:2.44.0
34 Requires:       libusb >= 1.0.22
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 GUsb is a GObject wrapper for libusb1 that makes it easy to do
39 asynchronous control, bulk and interrupt transfers with proper
40 cancellation and integration into a mainloop. This makes it easy to
41 integrate low level USB transfers with your high-level application or
42 system daemon.
43
44 %description -l pl.UTF-8
45 GUsb to obudowanie GObject biblioteki libusb1, ułatwiające
46 asynchroniczne sterowanie oraz przesyłanie danych (typu bulk jak i z
47 użyciem przerwań) z właściwym przerywaniem i integracją w głównej
48 pętli. Ułatwia to integrowanie niskopoziomowego przesyłania danych po
49 USB w wysokopoziomowej aplikacji lub demonie systemowym.
50
51 %package devel
52 Summary:        Header files for GUsb library
53 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki GUsb
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       glib2-devel >= 1:2.44.0
57 Requires:       libusb-devel >= 1.0.22
58
59 %description devel
60 Header files for GUsb library.
61
62 %description devel -l pl.UTF-8
63 Pliki nagłówkowe biblioteki GUsb.
64
65 %package static
66 Summary:        Static GUsb library
67 Summary(pl.UTF-8):      Statyczna biblioteka GUsb
68 Group:          Development/Libraries
69 Requires:       %{name}-devel = %{version}-%{release}
70
71 %description static
72 Static GUsb library.
73
74 %description static -l pl.UTF-8
75 Statyczna biblioteka GUsb.
76
77 %package apidocs
78 Summary:        GUsb API documentation
79 Summary(pl.UTF-8):      Dokumentacja API biblioteki GUsb
80 Group:          Documentation
81 BuildArch:      noarch
82
83 %description apidocs
84 API and internal documentation for GUsb library.
85
86 %description apidocs -l pl.UTF-8
87 Dokumentacja API biblioteki GUsb.
88
89 %package -n vala-libgusb
90 Summary:        Vala API for libgusb
91 Summary(pl.UTF-8):      API języka Vala do libgusb
92 Group:          Development/Libraries
93 Requires:       %{name}-devel = %{version}-%{release}
94 Requires:       vala >= 2:0.16
95 BuildArch:      noarch
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
103 %prep
104 %setup -q
105
106 %build
107 %meson build \
108         %{!?with_static_libs:--default-library=shared} \
109         -Ddocs=%{__true_false apidocs} \
110         -Dvapi=%{__true_false vala}
111
112 %ninja_build -C build
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116
117 %ninja_install -C build
118
119 %if %{with apidocs}
120 install -d $RPM_BUILD_ROOT%{_gidocdir}
121 %{__mv} $RPM_BUILD_ROOT%{_docdir}/libgusb $RPM_BUILD_ROOT%{_gidocdir}
122 %endif
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %post   -p /sbin/ldconfig
128 %postun -p /sbin/ldconfig
129
130 %files
131 %defattr(644,root,root,755)
132 %doc AUTHORS MAINTAINERS NEWS README.md
133 %attr(755,root,root) %{_bindir}/gusbcmd
134 %attr(755,root,root) %{_libdir}/libgusb.so.*.*.*
135 %attr(755,root,root) %ghost %{_libdir}/libgusb.so.2
136 %{_libdir}/girepository-1.0/GUsb-1.0.typelib
137
138 %files devel
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/libgusb.so
141 %{_includedir}/gusb-1
142 %{_datadir}/gir-1.0/GUsb-1.0.gir
143 %{_pkgconfigdir}/gusb.pc
144
145 %if %{with static_libs}
146 %files static
147 %defattr(644,root,root,755)
148 %{_libdir}/libgusb.a
149 %endif
150
151 %if %{with apidocs}
152 %files apidocs
153 %defattr(644,root,root,755)
154 %{_gidocdir}/libgusb
155 %endif
156
157 %if %{with vala}
158 %files -n vala-libgusb
159 %defattr(644,root,root,755)
160 %{_datadir}/vala/vapi/gusb.deps
161 %{_datadir}/vala/vapi/gusb.vapi
162 %endif
This page took 0.160891 seconds and 4 git commands to generate.