Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37562385
en ru br
Репозитории ALT
S:9.7.0-alt2
5.1: 0.7.7-alt0.M51.2
4.1: 0.7.7-alt0.M41.1
4.0: 0.7.7-alt0.M40.1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: libvirt

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# -*- rpm-spec -*-

# %%branch_switch set %%branch_release use

%define branch_switch M40

%def_without polkit
%define _localstatedir /var

Name: libvirt
Version: 0.7.7
Release: %branch_release alt1
Summary: Library providing a simple API virtualization
License: LGPL
Group: System/Libraries
Url: http://libvirt.org/
Packager: Anton Protopopov <aspsk at altlinux.ru>
Source0: %name-%version.tar
Source1: gnulib-%name-%version.tar
Requires: dnsmasq
Requires: bridge-utils
Requires: iptables
%if_with polkit
Requires: PolicyKit >= 0.6
%endif
Requires(post): %post_service
Requires(preun): %preun_service
BuildRequires(pre): rpm-macros-branch
BuildRequires: bridge-utils cvs dnsmasq libavahi-devel libgnutls-devel libreadline-devel libsasl2-devel libxml2-devel python-devel xsltproc parted libparted-devel libcurl-devel libdevmapper-devel
%if_with polkit
BuildRequires: PolicyKit-devel >= 0.6
%endif
ExclusiveArch: %ix86 x86_64 ia64

%description
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes).

%package devel
Summary: Libraries, includes, etc. to compile with the libvirt library
Group: System/Libraries
Requires: %name = %version-%release

%description devel
Includes and documentations for the C library providing an API to use
the virtualization capabilities of recent versions of Linux (and other OSes).

%package -n python-module-%name
Summary: Python bindings for the libvirt library
Group: System/Libraries
Requires: %name = %version-%release

Obsoletes: libvirt-python < %version-%release
Provides: libvirt-python = %version-%release

%description -n python-module-%name
The libvirt-python package contains a module that permits applications
written in the Python programming language to use the interface
supplied by the libvirt library to use the virtualization capabilities
of recent versions of Linux (and other OSes).

%prep
%setup -a1

%build
export GNULIB_SRCDIR=gnulib-%name-%version
export NO_GIT=t
export SKIP_PO=t
./autogen.sh
%configure   --with-init-script=redhat \
            --with-qemud-pid-file=/var/run/libvirt_qemud.pid \
            --with-remote-file=/var/run/libvirtd.pid \
            --without-xen \
            --with-openvz \
            --without-storage-mpath \
            --enable-debug=yes \
%{subst_with polkit} \
#
make

%install
%makeinstall_std
(cd docs/examples ; make clean ; rm -rf .deps Makefile Makefile.in)
(cd docs/examples/python ; rm -f Makefile Makefile.in)
install -d -m 0755 %buildroot/var/run/libvirt/
rm -f %buildroot%{_libdir}/*.{a,la}
rm -f %buildroot%{_libdir}/python*/site-packages/*.{a,la}

# We don't want to install /etc/libvirt/qemu/networks in the main %files list

# because if the admin wants to delete the default network completely, we don't
# want to end up re-incarnating it on every RPM upgrade.
install -d -m 0755 %buildroot%_datadir/libvirt/networks/
cp %buildroot/etc/libvirt/qemu/networks/default.xml \
  %buildroot%_datadir/libvirt/networks/default.xml
rm -f %buildroot/etc/libvirt/qemu/networks/default.xml
rm -f %buildroot/etc/libvirt/qemu/networks/autostart/default.xml
# Strip auto-generated UUID - we need it generated per-install
sed -i -e "/<uuid>/d" %buildroot%_datadir/libvirt/networks/default.xml
%find_lang %name

%post
%post_ldconfig

# We want to install the default network for initial RPM installs

# or on the first upgrade from a non-network aware libvirt only.
# We check this by looking to see if the daemon is already installed
/sbin/chkconfig --list libvirtd 1>/dev/null 2>&1
if [ $? != 0 ]
then
   UUID=`/usr/bin/uuidgen`
   sed -e "s,</name>,</name>\n  <uuid>$UUID</uuid>," \
        < %_datadir/libvirt/networks/default.xml \
        > /etc/libvirt/qemu/networks/default.xml
   ln -s ../default.xml /etc/libvirt/qemu/networks/autostart/default.xml
fi

%post_service libvirtd

%preun
%preun_service libvirtd

%postun
%postun_ldconfig

%files -f %name.lang
%doc AUTHORS ChangeLog README TODO
%doc docs/*.xml

%_libdir/lib*.so.*

%_bindir/virsh
%_bindir/virt-xml-validate
%_bindir/virt-pki-validate
%_man1dir/virsh.*
%_man1dir/virt-xml-validate.*
%_man1dir/virt-pki-validate.*
%config(noreplace) /etc/sasl2/libvirt.conf
%_datadir/libvirt/
%if_with polkit
%_datadir/PolicyKit/policy/libvirtd.policy
%endif
%_libexecdir/libvirt_parthelper
%_libexecdir/libvirt_lxc
%config(noreplace) %_sysconfdir/sysconfig/libvirtd
%config(noreplace) %_sysconfdir/logrotate.d/libvirtd
%_sbindir/libvirtd
%_initdir/libvirtd

%_datadir/augeas/lenses/libvirtd*.aug
%_datadir/augeas/lenses/tests/test_libvirtd*.aug

/var/lib/libvirt/
/var/log/libvirt/
/var/run/libvirt/
%defattr(600,root,root,700)
%config(noreplace) /etc/libvirt/

%files devel
%_pkgconfigdir/libvirt.pc
%_libdir/lib*.so
%_includedir/libvirt
%doc %_datadir/gtk-doc/html/libvirt

%doc docs/html docs/devhelp docs/*.gif
%doc docs/libvirt-api.xml
%doc examples

%files -n python-module-%name
%python_sitelibdir/libvirt*
%doc python/tests/*.py
%doc python/TODO
%doc examples/python

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin