]> git.pld-linux.org Git - packages/libgpiod.git/blob - libgpiod.spec
- updated to 1.6.3
[packages/libgpiod.git] / libgpiod.spec
1 # TODO: tests (BR: kmod-devel >= 18, udev-devel >= 1:215, glib2-devel >= 1:2.50 for library; bats for tools; catch2 for C++)
2 #
3 # Conditional build:
4 %bcond_without  apidocs         # Doxygen API documentation
5 %bcond_without  python          # Python binding
6 %bcond_without  static_libs     # static libraries
7 #
8 Summary:        Library and tools for interacting with the Linux GPIO character device
9 Summary(pl.UTF-8):      Biblioteka i narzędzia do obsługi linuksowych urządzeń znakowych GPIO
10 Name:           libgpiod
11 Version:        1.6.3
12 Release:        1
13 License:        LGPL v2.1+
14 Group:          Libraries
15 Source0:        https://www.kernel.org/pub/software/libs/libgpiod/%{name}-%{version}.tar.xz
16 # Source0-md5:  28e79f6f70fee1da9079558d8b7b3736
17 URL:            https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
18 %{?with_apidocs:BuildRequires:  doxygen}
19 BuildRequires:  help2man
20 BuildRequires:  libstdc++-devel >= 6:4.7
21 BuildRequires:  linux-libc-headers >= 6:5.5
22 %{?with_python:BuildRequires:   python3-devel >= 1:3.2}
23 BuildRequires:  tar >= 1:1.22
24 BuildRequires:  xz
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 Since Linux 4.8 the GPIO sysfs interface is deprecated. User space
29 should use the character device instead. This library encapsulates the
30 ioctl calls and data structures behind a straightforward API.
31
32 %description -l pl.UTF-8
33 Od wersja Linuksa 4.8 interfejs sysfs do GPIO jest przestarzały.
34 Przestrzeń użytkownika powinna zamiast niego używać urządzenia
35 znakowego. Ta biblioteka kryje wywołania ioctl i struktury danych za
36 bezpośrednim API.
37
38 %package devel
39 Summary:        Header files for libgpiod library
40 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libgpiod
41 Group:          Development/Libraries
42 Requires:       %{name} = %{version}-%{release}
43
44 %description devel
45 Header files for libgpiod library.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki libgpiod.
49
50 %package static
51 Summary:        Static libgpiod library
52 Summary(pl.UTF-8):      Statyczna biblioteka libgpiod
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{version}-%{release}
55
56 %description static
57 Static libgpiod library.
58
59 %description static -l pl.UTF-8
60 Statyczna biblioteka libgpiod.
61
62 %package cxx
63 Summary:        C++ binding for libgpiod library
64 Summary(pl.UTF-8):      Interfejs C++ do biblioteki libgpiod
65 Group:          Libraries
66 Requires:       %{name} = %{version}-%{release}
67
68 %description cxx
69 High-level, object-oriented C++ binding for libgpiod library.
70
71 %description cxx -l pl.UTF-8
72 Wysokopoziomowy, zorientowany obiektowo interfejs C++ do biblioteki
73 libgpiod.
74
75 %package cxx-devel
76 Summary:        Header files for libgpiodcxx library
77 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libgpiodcxx
78 Group:          Development/Libraries
79 Requires:       %{name}-cxx = %{version}-%{release}
80 Requires:       %{name}-devel = %{version}-%{release}
81 Requires:       libstdc++-devel >= 6:4.7
82
83 %description cxx-devel
84 Header files for libgpiodcxx library.
85
86 %description cxx-devel -l pl.UTF-8
87 Pliki nagłówkowe biblioteki libgpiodcxx.
88
89 %package cxx-static
90 Summary:        Static libgpiodcxx library
91 Summary(pl.UTF-8):      Statyczna biblioteka libgpiodcxx
92 Group:          Development/Libraries
93 Requires:       %{name}-cxx-devel = %{version}-%{release}
94
95 %description cxx-static
96 Static libgpiodcxx library.
97
98 %description cxx-static -l pl.UTF-8
99 Statyczna biblioteka libgpiodcxx.
100
101 %package -n python3-gpiod
102 Summary:        Pythona binding for libgpiod library
103 Summary(pl.UTF-8):      Interfejs Pythona do biblioteki libgpiod
104 Group:          Libraries/Python
105 Requires:       %{name} = %{version}-%{release}
106
107 %description -n python3-gpiod
108 High-level, object-oriented Python binding for libgpiod library.
109
110 %description -n python3-gpiod -l pl.UTF-8
111 Wysokopoziomowy, zorientowany obiektowo interfejs Pythona do
112 biblioteki libgpiod.
113
114 %package apidocs
115 Summary:        API documentation for libgpiod library
116 Summary(pl.UTF-8):      Dokumentacja API biblioteki libgpiod
117 Group:          Documentation
118 BuildArch:      noarch
119
120 %description apidocs
121 API documentation for libgpiod library.
122
123 %description apidocs -l pl.UTF-8
124 Dokumentacja API biblioteki libgpiod.
125
126 %prep
127 %setup -q
128
129 %build
130 %configure \
131         %{!?with_static_libs:--disable-static} \
132         --enable-bindings-cxx \
133         %{?with_python:--enable-bindings-python} \
134         --disable-silent-rules \
135         --enable-tools
136 %{__make}
137
138 %if %{with apidocs}
139 %{__make} doc
140 %endif
141
142 %install
143 rm -rf $RPM_BUILD_ROOT
144
145 %{__make} install \
146         DESTDIR=$RPM_BUILD_ROOT
147
148 # obsoleted by pkg-config
149 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgpiod*.la
150 %if %{with python}
151 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gpiod.la \
152         %{?with_static_libs:$RPM_BUILD_ROOT%{py3_sitedir}/gpiod.a}
153 %endif
154
155 %clean
156 rm -rf $RPM_BUILD_ROOT
157
158 %post   -p /sbin/ldconfig
159 %postun -p /sbin/ldconfig
160
161 %post   cxx -p /sbin/ldconfig
162 %postun cxx -p /sbin/ldconfig
163
164 %files
165 %defattr(644,root,root,755)
166 %doc NEWS README
167 %attr(755,root,root) %{_bindir}/gpiodetect
168 %attr(755,root,root) %{_bindir}/gpiofind
169 %attr(755,root,root) %{_bindir}/gpioget
170 %attr(755,root,root) %{_bindir}/gpioinfo
171 %attr(755,root,root) %{_bindir}/gpiomon
172 %attr(755,root,root) %{_bindir}/gpioset
173 %attr(755,root,root) %{_libdir}/libgpiod.so.*.*.*
174 %attr(755,root,root) %ghost %{_libdir}/libgpiod.so.2
175 %{_mandir}/man1/gpiodetect.1*
176 %{_mandir}/man1/gpiofind.1*
177 %{_mandir}/man1/gpioget.1*
178 %{_mandir}/man1/gpioinfo.1*
179 %{_mandir}/man1/gpiomon.1*
180 %{_mandir}/man1/gpioset.1*
181
182 %files devel
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/libgpiod.so
185 %{_includedir}/gpiod.h
186 %{_pkgconfigdir}/libgpiod.pc
187
188 %if %{with static_libs}
189 %files static
190 %defattr(644,root,root,755)
191 %{_libdir}/libgpiod.a
192 %endif
193
194 %files cxx
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/libgpiodcxx.so.*.*.*
197 %attr(755,root,root) %ghost %{_libdir}/libgpiodcxx.so.1
198
199 %files cxx-devel
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_libdir}/libgpiodcxx.so
202 %{_includedir}/gpiod.hpp
203 %{_pkgconfigdir}/libgpiodcxx.pc
204
205 %if %{with static_libs}
206 %files cxx-static
207 %defattr(644,root,root,755)
208 %{_libdir}/libgpiodcxx.a
209 %endif
210
211 %if %{with python}
212 %files -n python3-gpiod
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{py3_sitedir}/gpiod.so
215 %endif
216
217 %if %{with apidocs}
218 %files apidocs
219 %defattr(644,root,root,755)
220 %doc doc/html/*
221 %endif
This page took 0.065565 seconds and 3 git commands to generate.