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