]>
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 |
99be4fb8 MB |
7 | # |
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 |
8e7de27e | 11 | Version: 0.2.11 |
70f18963 | 12 | Release: 2 |
99be4fb8 MB |
13 | License: LGPL v2+ |
14 | Group: Libraries | |
15 | Source0: https://fedorahosted.org/releases/l/i/libosinfo/%{name}-%{version}.tar.gz | |
8e7de27e | 16 | # Source0-md5: acfcddc6a3f577524fd705947fb5abbc |
99be4fb8 MB |
17 | URL: https://fedorahosted.org/libosinfo/ |
18 | BuildRequires: autoconf >= 2.61 | |
0e2f453b | 19 | BuildRequires: automake >= 1:1.11.1 |
8e7de27e JP |
20 | %if %{with tests} |
21 | BuildRequires: check-devel | |
22 | %endif | |
bb82a0a1 | 23 | BuildRequires: gettext-tools >= 0.17 |
f0ee308f | 24 | BuildRequires: glib2-devel >= 2.0 |
99be4fb8 MB |
25 | BuildRequires: gnome-common |
26 | BuildRequires: gobject-introspection-devel >= 0.10.0 | |
27 | BuildRequires: gtk-doc >= 1.10 | |
4ef01d9c | 28 | BuildRequires: intltool >= 0.40.0 |
f0ee308f | 29 | BuildRequires: libsoup-gnome-devel >= 2.4 |
99be4fb8 MB |
30 | BuildRequires: libtool |
31 | BuildRequires: libxml2-devel >= 1:2.6.0 | |
628bb2f4 | 32 | BuildRequires: libxslt-devel >= 1.0.0 |
99be4fb8 | 33 | BuildRequires: pkgconfig |
0e2f453b | 34 | %{?with_vala:BuildRequires: vala} |
bc63ea3e JB |
35 | Requires: /lib/hwdata/pci.ids |
36 | Requires: /lib/hwdata/usb.ids | |
37 | Requires: hwdata >= 0.243-5 | |
f0ee308f | 38 | Requires: libxml2 >= 1:2.6.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} | |
f0ee308f JB |
56 | Requires: glib2-devel >= 2.0 |
57 | Requires: libsoup-gnome-devel >= 2.4 | |
58 | Requires: libxml2-devel >= 1:2.6.0 | |
99be4fb8 MB |
59 | |
60 | %description devel | |
61 | Header files for libosinfo library. | |
62 | ||
63 | %description devel -l pl.UTF-8 | |
64 | Pliki nagłówkowe biblioteki libosinfo. | |
65 | ||
66 | %package static | |
67 | Summary: Static libosinfo library | |
68 | Summary(pl.UTF-8): Statyczna biblioteka libosinfo | |
69 | Group: Development/Libraries | |
70 | Requires: %{name}-devel = %{version}-%{release} | |
71 | ||
72 | %description static | |
73 | Static libosinfo library. | |
74 | ||
75 | %description static -l pl.UTF-8 | |
76 | Statyczna biblioteka libosinfo. | |
77 | ||
78 | %package apidocs | |
79 | Summary: libosinfo API documentation | |
80 | Summary(pl.UTF-8): Dokumentacja API biblioteki libosinfo | |
81 | Group: Documentation | |
82 | Requires: gtk-doc-common | |
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} | |
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} \ |
bc63ea3e | 116 | --enable-udev \ |
0e2f453b | 117 | %{!?with_vala:--disable-vala} \ |
bc63ea3e JB |
118 | --with-html-dir=%{_gtkdocdir} \ |
119 | --with-pci-ids-path=/lib/hwdata/pci.ids \ | |
120 | --with-usb-ids-path=/lib/hwdata/usb.ids | |
99be4fb8 MB |
121 | %{__make} |
122 | ||
8e7de27e JP |
123 | %if %{with tests} |
124 | %{__make} check | |
125 | %endif | |
126 | ||
99be4fb8 MB |
127 | %install |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
130 | %{__make} install \ | |
131 | DESTDIR=$RPM_BUILD_ROOT | |
132 | ||
133 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
134 | ||
135 | %clean | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %post -p /sbin/ldconfig | |
139 | %postun -p /sbin/ldconfig | |
140 | ||
141 | %files | |
142 | %defattr(644,root,root,755) | |
0e2f453b | 143 | %doc AUTHORS ChangeLog NEWS README |
f0ee308f | 144 | %attr(755,root,root) %{_bindir}/osinfo-db-validate |
99be4fb8 | 145 | %attr(755,root,root) %{_bindir}/osinfo-detect |
628bb2f4 | 146 | %attr(755,root,root) %{_bindir}/osinfo-install-script |
f0ee308f | 147 | %attr(755,root,root) %{_bindir}/osinfo-query |
99be4fb8 MB |
148 | %attr(755,root,root) %{_libdir}/libosinfo-1.0.so.*.*.* |
149 | %attr(755,root,root) %ghost %{_libdir}/libosinfo-1.0.so.0 | |
150 | %{_libdir}/girepository-1.0/Libosinfo-1.0.typelib | |
151 | %{_datadir}/libosinfo | |
152 | /lib/udev/rules.d/95-osinfo.rules | |
f0ee308f JB |
153 | %{_mandir}/man1/osinfo-db-validate.1* |
154 | %{_mandir}/man1/osinfo-detect.1* | |
628bb2f4 | 155 | %{_mandir}/man1/osinfo-install-script.1* |
f0ee308f | 156 | %{_mandir}/man1/osinfo-query.1* |
99be4fb8 MB |
157 | |
158 | %files devel | |
159 | %defattr(644,root,root,755) | |
160 | %attr(755,root,root) %{_libdir}/libosinfo-1.0.so | |
161 | %{_datadir}/gir-1.0/Libosinfo-1.0.gir | |
162 | %{_includedir}/libosinfo-1.0 | |
163 | %{_pkgconfigdir}/libosinfo-1.0.pc | |
164 | ||
165 | %if %{with static_libs} | |
166 | %files static | |
167 | %defattr(644,root,root,755) | |
168 | %{_libdir}/libosinfo-1.0.a | |
169 | %endif | |
170 | ||
171 | %if %{with apidocs} | |
172 | %files apidocs | |
173 | %defattr(644,root,root,755) | |
174 | %{_gtkdocdir}/Libosinfo | |
175 | %endif | |
176 | ||
0e2f453b | 177 | %if %{with vala} |
99be4fb8 MB |
178 | %files -n vala-libosinfo |
179 | %defattr(644,root,root,755) | |
180 | %{_datadir}/vala/vapi/libosinfo-1.0.vapi | |
0e2f453b | 181 | %endif |