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