]>
Commit | Line | Data |
---|---|---|
99be4fb8 MB |
1 | # |
2 | # Conditional build: | |
6e087f7e JB |
3 | %bcond_without apidocs # API documentation |
4 | %bcond_without static_libs # static library | |
5 | %bcond_without tests # unit tests | |
0e2f453b | 6 | %bcond_without vala # Vala binding |
836175b9 | 7 | |
99be4fb8 | 8 | Summary: A library for managing OS information for virtualization |
0e2f453b | 9 | Summary(pl.UTF-8): Biblioteka do zarządzania informacjami dotyczącymi OS na potrzeby wirtualizacji |
99be4fb8 | 10 | Name: libosinfo |
6e087f7e | 11 | Version: 1.11.0 |
4863ed97 | 12 | Release: 1 |
99be4fb8 MB |
13 | License: LGPL v2+ |
14 | Group: Libraries | |
fbb7a7c7 | 15 | Source0: https://releases.pagure.org/libosinfo/%{name}-%{version}.tar.xz |
6e087f7e | 16 | # Source0-md5: e7e586c0dd61aa73deff7fbe86473d64 |
38c36269 | 17 | URL: https://libosinfo.org/ |
1f100cb2 | 18 | BuildRequires: gettext-tools >= 0.19.8 |
a06ba523 | 19 | BuildRequires: glib2-devel >= 1:2.44 |
99be4fb8 | 20 | BuildRequires: gobject-introspection-devel >= 0.10.0 |
123eae4b | 21 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.10} |
d6218acb | 22 | BuildRequires: libsoup3-devel >= 3.0 |
99be4fb8 | 23 | BuildRequires: libxml2-devel >= 1:2.6.0 |
628bb2f4 | 24 | BuildRequires: libxslt-devel >= 1.0.0 |
fbb7a7c7 JB |
25 | BuildRequires: meson >= 0.49.0 |
26 | BuildRequires: ninja >= 1.5 | |
99be4fb8 | 27 | BuildRequires: pkgconfig |
123eae4b | 28 | BuildRequires: rpmbuild(macros) >= 1.736 |
fbb7a7c7 | 29 | BuildRequires: tar >= 1:1.22 |
0e2f453b | 30 | %{?with_vala:BuildRequires: vala} |
fbb7a7c7 | 31 | BuildRequires: xz |
bc63ea3e JB |
32 | Requires: /lib/hwdata/pci.ids |
33 | Requires: /lib/hwdata/usb.ids | |
a06ba523 | 34 | Requires: glib2 >= 1:2.44 |
bc63ea3e | 35 | Requires: hwdata >= 0.243-5 |
f0ee308f | 36 | Requires: libxml2 >= 1:2.6.0 |
1f100cb2 | 37 | Requires: osinfo-db >= 20180612 |
d6218acb | 38 | Suggests: osinfo-db-tools >= 1.10.0 |
99be4fb8 MB |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
42 | libosinfo is a library that allows virtualization provisioning tools | |
43 | to determine the optimal device settings for a hypervisor/operating | |
44 | system combination. | |
45 | ||
0e2f453b JB |
46 | %description -l pl.UTF-8 |
47 | libosinfo to biblioteka umożliwiająca narzędziom wirtualizacyjnym | |
8e7de27e JP |
48 | określenie optymalnych ustawień dla danej kombinacji hipernadzorcy i |
49 | systemu operacyjnego. | |
0e2f453b | 50 | |
99be4fb8 MB |
51 | %package devel |
52 | Summary: Header files for libosinfo library | |
53 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libosinfo | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{version}-%{release} | |
a06ba523 | 56 | Requires: glib2-devel >= 1:2.44 |
99be4fb8 MB |
57 | |
58 | %description devel | |
59 | Header files for libosinfo library. | |
60 | ||
61 | %description devel -l pl.UTF-8 | |
62 | Pliki nagłówkowe biblioteki libosinfo. | |
63 | ||
64 | %package static | |
65 | Summary: Static libosinfo library | |
66 | Summary(pl.UTF-8): Statyczna biblioteka libosinfo | |
67 | Group: Development/Libraries | |
68 | Requires: %{name}-devel = %{version}-%{release} | |
69 | ||
70 | %description static | |
71 | Static libosinfo library. | |
72 | ||
73 | %description static -l pl.UTF-8 | |
74 | Statyczna biblioteka libosinfo. | |
75 | ||
76 | %package apidocs | |
77 | Summary: libosinfo API documentation | |
78 | Summary(pl.UTF-8): Dokumentacja API biblioteki libosinfo | |
79 | Group: Documentation | |
80 | Requires: gtk-doc-common | |
f54a2479 | 81 | BuildArch: noarch |
99be4fb8 MB |
82 | |
83 | %description apidocs | |
84 | API documentation for libosinfo library. | |
85 | ||
86 | %description apidocs -l pl.UTF-8 | |
87 | Dokumentacja API biblioteki libosinfo. | |
88 | ||
89 | %package -n vala-libosinfo | |
90 | Summary: libosinfo API for Vala language | |
91 | Summary(pl.UTF-8): API libosinfo dla języka Vala | |
92 | Group: Development/Libraries | |
93 | Requires: %{name}-devel = %{version}-%{release} | |
836175b9 | 94 | BuildArch: noarch |
99be4fb8 MB |
95 | |
96 | %description -n vala-libosinfo | |
97 | libosinfo API for Vala language. | |
98 | ||
99 | %description -n vala-libosinfo -l pl.UTF-8 | |
100 | API libosinfo dla języka Vala. | |
101 | ||
102 | %prep | |
103 | %setup -q | |
104 | ||
105 | %build | |
fbb7a7c7 JB |
106 | %meson build \ |
107 | %{!?with_apidocs:-Denable-gtk-doc=false} \ | |
108 | %{!?with_vala:-Denable-vala=false} \ | |
109 | -Dwith-pci-ids-path=/lib/hwdata/pci.ids \ | |
110 | -Dwith-usb-ids-path=/lib/hwdata/usb.ids | |
111 | ||
112 | %ninja_build -C build | |
99be4fb8 | 113 | |
8e7de27e | 114 | %if %{with tests} |
fbb7a7c7 | 115 | %ninja_test -C build |
8e7de27e JP |
116 | %endif |
117 | ||
99be4fb8 MB |
118 | %install |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
fbb7a7c7 | 121 | %ninja_install -C build |
99be4fb8 | 122 | |
123eae4b JB |
123 | # unify |
124 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{pt_PT,pt} | |
77280e93 | 125 | |
649b6e1a JB |
126 | %find_lang %{name} |
127 | ||
99be4fb8 MB |
128 | %clean |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %post -p /sbin/ldconfig | |
132 | %postun -p /sbin/ldconfig | |
133 | ||
649b6e1a | 134 | %files -f %{name}.lang |
99be4fb8 | 135 | %defattr(644,root,root,755) |
fbb7a7c7 | 136 | %doc AUTHORS ChangeLog MAINTAINERS NEWS README |
99be4fb8 | 137 | %attr(755,root,root) %{_bindir}/osinfo-detect |
628bb2f4 | 138 | %attr(755,root,root) %{_bindir}/osinfo-install-script |
f0ee308f | 139 | %attr(755,root,root) %{_bindir}/osinfo-query |
99be4fb8 MB |
140 | %attr(755,root,root) %{_libdir}/libosinfo-1.0.so.*.*.* |
141 | %attr(755,root,root) %ghost %{_libdir}/libosinfo-1.0.so.0 | |
142 | %{_libdir}/girepository-1.0/Libosinfo-1.0.typelib | |
f0ee308f | 143 | %{_mandir}/man1/osinfo-detect.1* |
628bb2f4 | 144 | %{_mandir}/man1/osinfo-install-script.1* |
f0ee308f | 145 | %{_mandir}/man1/osinfo-query.1* |
99be4fb8 MB |
146 | |
147 | %files devel | |
148 | %defattr(644,root,root,755) | |
149 | %attr(755,root,root) %{_libdir}/libosinfo-1.0.so | |
150 | %{_datadir}/gir-1.0/Libosinfo-1.0.gir | |
151 | %{_includedir}/libosinfo-1.0 | |
152 | %{_pkgconfigdir}/libosinfo-1.0.pc | |
153 | ||
154 | %if %{with static_libs} | |
155 | %files static | |
156 | %defattr(644,root,root,755) | |
157 | %{_libdir}/libosinfo-1.0.a | |
158 | %endif | |
159 | ||
160 | %if %{with apidocs} | |
161 | %files apidocs | |
162 | %defattr(644,root,root,755) | |
163 | %{_gtkdocdir}/Libosinfo | |
164 | %endif | |
165 | ||
0e2f453b | 166 | %if %{with vala} |
99be4fb8 MB |
167 | %files -n vala-libosinfo |
168 | %defattr(644,root,root,755) | |
fbb7a7c7 | 169 | %{_datadir}/vala/vapi/libosinfo-1.0.deps |
99be4fb8 | 170 | %{_datadir}/vala/vapi/libosinfo-1.0.vapi |
0e2f453b | 171 | %endif |