]>
Commit | Line | Data |
---|---|---|
6399bff5 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # gtk-doc API documentation | |
4 | ||
c96b1dc3 JB |
5 | Summary: Mock hardware devices for creating unit tests |
6 | Summary(pl.UTF-8): Imitowanie urządzeń sprzętowych na potrzeby testów jednostkowych | |
7 | Name: umockdev | |
8c93e4fd | 8 | Version: 0.17.16 |
9c7e9b80 | 9 | Release: 1 |
c96b1dc3 JB |
10 | License: LGPL v2.1+ |
11 | Group: Libraries | |
5f22412d JB |
12 | #Source0Download: https://github.com/martinpitt/umockdev/releases |
13 | Source0: https://github.com/martinpitt/umockdev/releases/download/%{version}/%{name}-%{version}.tar.xz | |
8c93e4fd | 14 | # Source0-md5: 7f504b350a804f14dd18c6d607206b59 |
c96b1dc3 | 15 | URL: https://github.com/martinpitt/umockdev |
8c93e4fd | 16 | BuildRequires: gcc >= 6:4.7 |
c96b1dc3 JB |
17 | BuildRequires: glib2-devel >= 1:2.32.0 |
18 | BuildRequires: gobject-introspection-devel >= 1.32 | |
6399bff5 JB |
19 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.14} |
20 | BuildRequires: libpcap-devel | |
05afd7e3 | 21 | BuildRequires: libgudev-devel >= 232 |
a4e75fd8 JB |
22 | BuildRequires: meson |
23 | BuildRequires: ninja >= 1.5 | |
ded14442 | 24 | BuildRequires: python3 >= 1:3 |
05afd7e3 | 25 | BuildRequires: rpm-build >= 4.6 |
dba7b399 | 26 | BuildRequires: tar >= 1:1.22 |
c96b1dc3 | 27 | BuildRequires: udev-devel |
c96b1dc3 | 28 | BuildRequires: vala >= 2:0.16.1 |
dba7b399 | 29 | BuildRequires: xz |
c96b1dc3 JB |
30 | Requires: glib2 >= 1:2.32.0 |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | umockdev mocks Linux devices for creating integration tests for | |
35 | hardware related libraries and programs. It also provides tools to | |
36 | record the properties and behaviour of particular devices, and to run | |
37 | a program or test suite under a test bed with the previously recorded | |
38 | devices loaded. This allows developers of software like gphoto or | |
39 | libmtp to receive these records in bug reports and recreate the | |
40 | problem on their system without having access to the affected | |
41 | hardware. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | umockdev imituje urządzenia pod Linuksem w celu tworzenia testów | |
45 | integracyjnych dla bibliotek i programów związanych ze sprzętem. | |
46 | Dostarcza także narzędzia do nagrywania właściwości i zachowania | |
47 | określonych urządzeń oraz uruchamiania programów lub testów w | |
48 | środowisku testowym z wczytanymi wcześniej nagranymi danymi | |
ae8a26dd ER |
49 | urządzenia. Pozwala to programistom z projektów takich jak gphoto czy |
50 | libmtp otrzymywać takie nagrania w zgłoszeniach błędów i odtwarzać we | |
51 | własnym systemie bez dostępu do sprzętu dotkniętego problemem. | |
c96b1dc3 JB |
52 | |
53 | %package devel | |
54 | Summary: Header files for umockdev library | |
55 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki umockdev | |
56 | Group: Development/Libraries | |
57 | Requires: %{name} = %{version}-%{release} | |
58 | Requires: glib2-devel >= 1:2.32.0 | |
a4e75fd8 | 59 | Obsoletes: umockdev-static < 0.15 |
c96b1dc3 JB |
60 | |
61 | %description devel | |
62 | Header files for umockdev library. | |
63 | ||
64 | %description devel -l pl.UTF-8 | |
65 | Pliki nagłówkowe biblioteki umockdev. | |
66 | ||
c96b1dc3 JB |
67 | %package -n vala-umockdev |
68 | Summary: Vala API for umockdev library | |
69 | Summary(pl.UTF-8): API języka Vala do biblioteki umockdev | |
70 | Group: Development/Libraries | |
71 | Requires: %{name}-devel = %{version}-%{release} | |
72 | Requires: vala >= 2:0.16.1 | |
ae8a26dd | 73 | BuildArch: noarch |
c96b1dc3 JB |
74 | |
75 | %description -n vala-umockdev | |
76 | Vala API for umockdev library. | |
77 | ||
78 | %description -n vala-umockdev -l pl.UTF-8 | |
79 | API języka Vala do biblioteki umockdev. | |
80 | ||
81 | %package apidocs | |
82 | Summary: umockdev API documentation | |
83 | Summary(pl.UTF-8): Dokumentacja API biblioteki umockdev | |
84 | Group: Documentation | |
348eb0f1 | 85 | BuildArch: noarch |
c96b1dc3 JB |
86 | |
87 | %description apidocs | |
88 | API documentation for umockdev library. | |
89 | ||
90 | %description apidocs -l pl.UTF-8 | |
91 | Dokumentacja API biblioteki umockdev. | |
92 | ||
93 | %prep | |
94 | %setup -q | |
95 | ||
96 | %build | |
a4e75fd8 | 97 | %meson build \ |
6399bff5 | 98 | %{?with_apidocs:-Dgtk_doc=true} |
a4e75fd8 JB |
99 | |
100 | %ninja_build -C build | |
c96b1dc3 JB |
101 | |
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
a4e75fd8 | 105 | %ninja_install -C build |
c96b1dc3 JB |
106 | |
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %post -p /sbin/ldconfig | |
111 | %postun -p /sbin/ldconfig | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
6399bff5 | 115 | %doc NEWS README.md docs/script-format.txt |
c96b1dc3 JB |
116 | %attr(755,root,root) %{_bindir}/umockdev-record |
117 | %attr(755,root,root) %{_bindir}/umockdev-run | |
118 | %attr(755,root,root) %{_bindir}/umockdev-wrapper | |
119 | %attr(755,root,root) %{_libdir}/libumockdev.so.*.*.* | |
120 | %attr(755,root,root) %ghost %{_libdir}/libumockdev.so.0 | |
121 | %attr(755,root,root) %{_libdir}/libumockdev-preload.so.*.*.* | |
122 | %attr(755,root,root) %ghost %{_libdir}/libumockdev-preload.so.0 | |
123 | %{_libdir}/girepository-1.0/UMockdev-1.0.typelib | |
124 | ||
125 | %files devel | |
126 | %defattr(644,root,root,755) | |
127 | %attr(755,root,root) %{_libdir}/libumockdev.so | |
a4e75fd8 | 128 | %attr(755,root,root) %{_libdir}/libumockdev-preload.so |
c96b1dc3 JB |
129 | %{_datadir}/gir-1.0/UMockdev-1.0.gir |
130 | %{_includedir}/umockdev-1.0 | |
131 | %{_pkgconfigdir}/umockdev-1.0.pc | |
132 | ||
c96b1dc3 JB |
133 | %files -n vala-umockdev |
134 | %defattr(644,root,root,755) | |
135 | %{_datadir}/vala/vapi/umockdev-1.0.vapi | |
136 | ||
6399bff5 | 137 | %if %{with apidocs} |
c96b1dc3 JB |
138 | %files apidocs |
139 | %defattr(644,root,root,755) | |
140 | %{_gtkdocdir}/umockdev | |
6399bff5 | 141 | %endif |