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