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