]> git.pld-linux.org Git - packages/libosinfo.git/blob - libosinfo.spec
- updated URLs
[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.0.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:  22a09db53246e4a54be14d82a59b15db
17 URL:            https://libosinfo.org/
18 BuildRequires:  autoconf >= 2.61
19 BuildRequires:  automake >= 1:1.11.1
20 %if %{with tests}
21 BuildRequires:  check-devel
22 BuildRequires:  osinfo-db
23 %endif
24 BuildRequires:  gettext-tools >= 0.17
25 BuildRequires:  glib2-devel >= 1:2.36
26 BuildRequires:  gnome-common
27 BuildRequires:  gobject-introspection-devel >= 0.10.0
28 BuildRequires:  gtk-doc >= 1.10
29 BuildRequires:  intltool >= 0.40.0
30 BuildRequires:  libsoup-devel >= 2.42
31 BuildRequires:  libtool >= 2:2
32 BuildRequires:  libxml2-devel >= 1:2.6.0
33 BuildRequires:  libxslt-devel >= 1.0.0
34 BuildRequires:  pkgconfig
35 %{?with_vala:BuildRequires:     vala}
36 Requires:       /lib/hwdata/pci.ids
37 Requires:       /lib/hwdata/usb.ids
38 Requires:       hwdata >= 0.243-5
39 Requires:       libsoup >= 2.42
40 Requires:       libxml2 >= 1:2.6.0
41 Requires:       osinfo-db
42 Suggests:       osinfo-db-tools
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
50 %description -l pl.UTF-8
51 libosinfo to biblioteka umożliwiająca narzędziom wirtualizacyjnym
52 określenie optymalnych ustawień dla danej kombinacji hipernadzorcy i
53 systemu operacyjnego.
54
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}
60 Requires:       glib2-devel >= 1:2.36
61 Requires:       libsoup-devel >= 2.42
62 Requires:       libxml2-devel >= 1:2.6.0
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
87 %if "%{_rpmversion}" >= "5"
88 BuildArch:      noarch
89 %endif
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}
102 %if "%{_rpmversion}" >= "5"
103 BuildArch:      noarch
104 %endif
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} \
123         --disable-silent-rules \
124         %{?with_static_libs:--enable-static} \
125         %{__enable_disable tests} \
126         %{!?with_vala:--disable-vala} \
127         --with-html-dir=%{_gtkdocdir} \
128         --with-pci-ids-path=/lib/hwdata/pci.ids \
129         --with-usb-ids-path=/lib/hwdata/usb.ids
130 %{__make}
131
132 %if %{with tests}
133 %{__make} check
134 %endif
135
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
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
149 %find_lang %{name}
150
151 %clean
152 rm -rf $RPM_BUILD_ROOT
153
154 %post   -p /sbin/ldconfig
155 %postun -p /sbin/ldconfig
156
157 %files -f %{name}.lang
158 %defattr(644,root,root,755)
159 %doc AUTHORS ChangeLog NEWS README
160 %attr(755,root,root) %{_bindir}/osinfo-detect
161 %attr(755,root,root) %{_bindir}/osinfo-install-script
162 %attr(755,root,root) %{_bindir}/osinfo-query
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
166 %{_mandir}/man1/osinfo-detect.1*
167 %{_mandir}/man1/osinfo-install-script.1*
168 %{_mandir}/man1/osinfo-query.1*
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
189 %if %{with vala}
190 %files -n vala-libosinfo
191 %defattr(644,root,root,755)
192 %{_datadir}/vala/vapi/libosinfo-1.0.vapi
193 %endif
This page took 0.22193 seconds and 3 git commands to generate.