]> git.pld-linux.org Git - packages/libosinfo.git/blob - libosinfo.spec
- updated to 1.6.0
[packages/libosinfo.git] / libosinfo.spec
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
5 %bcond_without  tests           # don't perform "make check"
6 %bcond_without  vala            # Vala binding
7
8 Summary:        A library for managing OS information for virtualization
9 Summary(pl.UTF-8):      Biblioteka do zarządzania informacjami dotyczącymi OS na potrzeby wirtualizacji
10 Name:           libosinfo
11 Version:        1.6.0
12 Release:        1
13 License:        LGPL v2+
14 Group:          Libraries
15 Source0:        https://releases.pagure.org/libosinfo/%{name}-%{version}.tar.gz
16 # Source0-md5:  f6d92dc26b1b641f59679e5eecb37887
17 URL:            https://libosinfo.org/
18 BuildRequires:  autoconf >= 2.61
19 BuildRequires:  automake >= 1:1.11.1
20 BuildRequires:  gettext-tools >= 0.19.8
21 BuildRequires:  glib2-devel >= 1:2.44
22 BuildRequires:  gobject-introspection-devel >= 0.10.0
23 BuildRequires:  gtk-doc >= 1.10
24 BuildRequires:  libsoup-devel >= 2.4
25 BuildRequires:  libtool >= 2:2
26 BuildRequires:  libxml2-devel >= 1:2.6.0
27 BuildRequires:  libxslt-devel >= 1.0.0
28 BuildRequires:  pkgconfig
29 %{?with_vala:BuildRequires:     vala}
30 Requires:       /lib/hwdata/pci.ids
31 Requires:       /lib/hwdata/usb.ids
32 Requires:       glib2 >= 1:2.44
33 Requires:       hwdata >= 0.243-5
34 Requires:       libxml2 >= 1:2.6.0
35 Requires:       osinfo-db >= 20180612
36 Suggests:       osinfo-db-tools
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
44 %description -l pl.UTF-8
45 libosinfo to biblioteka umożliwiająca narzędziom wirtualizacyjnym
46 określenie optymalnych ustawień dla danej kombinacji hipernadzorcy i
47 systemu operacyjnego.
48
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}
54 Requires:       glib2-devel >= 1:2.44
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
79 %if "%{_rpmversion}" >= "5"
80 BuildArch:      noarch
81 %endif
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}
94 %if "%{_rpmversion}" >= "5"
95 BuildArch:      noarch
96 %endif
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} \
115         --disable-silent-rules \
116         %{?with_static_libs:--enable-static} \
117         %{__enable_disable tests} \
118         %{!?with_vala:--disable-vala} \
119         --with-html-dir=%{_gtkdocdir} \
120         --with-pci-ids-path=/lib/hwdata/pci.ids \
121         --with-usb-ids-path=/lib/hwdata/usb.ids
122 %{__make}
123
124 %if %{with tests}
125 %{__make} check
126 %endif
127
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
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
141 %find_lang %{name}
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %post   -p /sbin/ldconfig
147 %postun -p /sbin/ldconfig
148
149 %files -f %{name}.lang
150 %defattr(644,root,root,755)
151 %doc AUTHORS ChangeLog NEWS README
152 %attr(755,root,root) %{_bindir}/osinfo-detect
153 %attr(755,root,root) %{_bindir}/osinfo-install-script
154 %attr(755,root,root) %{_bindir}/osinfo-query
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
158 %{_mandir}/man1/osinfo-detect.1*
159 %{_mandir}/man1/osinfo-install-script.1*
160 %{_mandir}/man1/osinfo-query.1*
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
181 %if %{with vala}
182 %files -n vala-libosinfo
183 %defattr(644,root,root,755)
184 %{_datadir}/vala/vapi/libosinfo-1.0.vapi
185 %endif
This page took 0.074632 seconds and 3 git commands to generate.