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