Search
j0ke.net Open Build Service
>
Projects
>
virtualization
>
libvirt
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 8
[-]
[+]
Added
libvirt.spec
@@ -0,0 +1,408 @@ +# +# spec file for package libvirt (Version 0.4.0) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: libvirt +BuildRequires: PolicyKit-devel avahi-devel bridge-utils cyrus-sasl-devel fdupes gettext gnutls-devel libxml2-devel ncurses-devel pkg-config python-devel readline-devel xen-devel xhtml-dtd +# Only for directory ownership: +BuildRequires: gtk-doc +Url: http://libvirt.org/ +License: LGPL v2.1 or later +Group: Development/Libraries/C and C++ +AutoReqProv: yes +Version: 0.4.0 +Release: 43 +Summary: A C toolkit to interract with the virtualization capabilities of Linux +Requires: dnsmasq +Requires: bridge-utils +Requires: iptables +Requires: cyrus-sasl +# Not technically required, but makes 'out-of-box' config +# work correctly & doesn't have onerous dependancies +Recommends: cyrus-sasl-digestmd5 +Requires: PolicyKit >= 0.6 +Source0: %{name}-%{version}.tar.bz2 +Source1: libvirtd.init +Patch0: auth-callback.patch +Patch1: xen-3_2-hypercall.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +ExclusiveArch: %ix86 x86_64 +%define _libexecdir %{_prefix}/lib/%{name} + +%description +Libvirt is a C toolkit to interract with the virtualization +capabilities Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurently +on a single hardware system where the basic resources are driven by a +Linux instance. The library aims to provide long term stable C API +initially for the Xen paravirtualization but should be able to +integrate other virtualization mechanisms if needed. + + + +Authors: +-------- + Daniel Veillard <veillard@redhat.com> + Karel Zak <kzak@redhat.com> + +%package devel +License: LGPL v2.1 or later +Summary: A C toolkit to interract with the virtualization capabilities of Linux +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} libxml2-devel xen-devel + +%description devel +Libvirt is a C toolkit to interract with the virtualization +capabilities Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurently +on a single hardware system where the basic resources are driven by a +Linux instance. The library aims to provide long term stable C API +initially for the Xen paravirtualization but should be able to +integrate other virtualization mechanisms if needed. + + + +Authors: +-------- + Daniel Veillard <veillard@redhat.com> + Karel Zak <kzak@redhat.com> + +%package doc +License: LGPL v2.1 or later +Summary: A C toolkit to interract with the virtualization capabilities of Linux +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} + +%description doc +Libvirt is a C toolkit to interract with the virtualization +capabilities Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurently +on a single hardware system where the basic resources are driven by a +Linux instance. The library aims to provide long term stable C API +initially for the Xen paravirtualization but should be able to +integrate other virtualization mechanisms if needed. + + + +Authors: +-------- + Daniel Veillard <veillard@redhat.com> + Karel Zak <kzak@redhat.com> + +%package python +License: LGPL v2.1 or later +Summary: A C toolkit to interract with the virtualization capabilities of Linux +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} +%py_requires + +%description python +Libvirt is a C toolkit to interract with the virtualization +capabilities Linux. Virtualization of the Linux Operating System means +the ability to run multiple instances of Operating Systems concurently +on a single hardware system where the basic resources are driven by a +Linux instance. The library aims to provide long term stable C API +initially for the Xen paravirtualization but should be able to +integrate other virtualization mechanisms if needed. + + + +Authors: +-------- + Daniel Veillard <veillard@redhat.com> + Karel Zak <kzak@redhat.com> + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +rm po/no.* + +%build +autoreconf -f -i +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +%configure --with-init-script=none \ + --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid \ + --with-remote-file=%{_localstatedir}/run/libvirtd.pid \ + --with-xen-proxy=no +make DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name} +cd docs/examples ; make index.html ; cd ../.. + +%install +%makeinstall DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name} +cp -a AUTHORS ChangeLog COPYING NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{name}/ +cp -a docs/{*.html,*.gif,*.rng,libvirt*.xml} $RPM_BUILD_ROOT%{_docdir}/%{name} +mkdir $RPM_BUILD_ROOT%{_docdir}/%{name}/examples +install -m 0644 docs/examples/{*.c,*.html} $RPM_BUILD_ROOT%{_docdir}/%{name}/examples +# remove currently unsupported locale +rm -rf $RPM_BUILD_ROOT/usr/share/locale/sr@latin +# for now, do not install the default network definition +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml +mkdir -p $RPM_BUILD_ROOT/var/run/libvirtd +rm $RPM_BUILD_ROOT%{_docdir}/%{name}/{*.c,examples.x*} +install -m 0644 docs/examples/python/{*.py,*.xml,README} $RPM_BUILD_ROOT%{_docdir}/%{name}-python/examples +rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a +ln_dupes() +{ + target="" + fdupes -r "$1" | while read file; do + if [ -z "$file" ] || [ -z "$target" ]; then + target="$file" + continue + fi + ln -sf "${target#.}" "$file" + done +} +( + cd $RPM_BUILD_ROOT + ln_dupes .%{_docdir}/%{name} + ln_dupes ./usr/share/locale +) +# init script +mkdir -p $RPM_BUILD_ROOT/etc/init.d +install %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/libvirtd +ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT/usr/sbin/rclibvirtd +%find_lang %{name} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +/sbin/ldconfig +%{fillup_and_insserv -f -y libvirtd} + +%preun +%stop_on_removal libvirtd + +%postun +/sbin/ldconfig +%restart_on_update libvirtd +%insserv_cleanup + +%files -f %{name}.lang +%defattr(-, root, root) +%{_bindir}/virsh +%{_sbindir}/libvirtd +%doc %dir %{_docdir}/%{name} +%doc %{_docdir}/%{name}/[CNRT]* +%doc %{_docdir}/%{name}/AUTHORS +%doc %{_docdir}/%{name}/examples