diff --git a/libvirt-0.2.0.tar.bz2 b/libvirt-0.2.0.tar.bz2 new file mode 100644 index 0000000..d8a945b --- /dev/null +++ b/libvirt-0.2.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa83fef8abae580e4fa966003cbc52406b5b767fd91198c85ff9a0c237f6eaa2 +size 928863 diff --git a/libvirt-0.2.0.tar.gz b/libvirt-0.2.0.tar.gz deleted file mode 100644 index 8e87c30..0000000 --- a/libvirt-0.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:86412c4fbe780ffd114c43da4e12b7afed07699c15e6410f7de47c785c8b94f7 -size 1628703 diff --git a/libvirt-cflags.patch b/libvirt-cflags.patch new file mode 100644 index 0000000..09860f8 --- /dev/null +++ b/libvirt-cflags.patch @@ -0,0 +1,22 @@ +2nd chunk removes incomplete chec. Without it autoconf will fail. +================================================================================ +--- configure.in ++++ configure.in +@@ -75,7 +75,7 @@ + dnl make CFLAGS very pedantic at least during the devel phase for everybody + dnl + if test "${GCC}" = "yes" ; then +- CFLAGS="-g -O -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall" ++ CFLAGS="-g -O -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall $CFLAGS" + fi + + dnl +@@ -161,7 +161,7 @@ + if test "z$with_libxml" = "zno" ; then + AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_MIN_VERSION) + AC_MSG_ERROR(libxml2 >= $LIBXML_MIN_VERSION is required for $XMLSEC_PACKAGE) +-elif test "z$with_libxml" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then ++elif test "z$with_libxml" = "z" ; then + PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION, + [LIBXML_FOUND=yes], + [LIBXML_FOUND=no]) diff --git a/libvirt.changes b/libvirt.changes index 938f3bc..9bdbac8 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Mar 7 18:50:05 CET 2007 - sbrabec@suse.cz + +- Created -doc subpackage (#248813). +- Do not remove valid locales. +- Fixed docdir destination. +- Build with CFLAGS. +- Spec file cleanup. + ------------------------------------------------------------------- Tue Feb 20 15:38:15 MST 2007 - jfehlig@novell.com diff --git a/libvirt.spec b/libvirt.spec index d27eceb..4ff434e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -11,18 +11,22 @@ # norootforbuild Name: libvirt -BuildRequires: gettext gnutls-devel libxml2-devel ncurses-devel python python-devel readline-devel xen-devel +BuildRequires: gettext gnutls-devel libxml2-devel ncurses-devel pkg-config python python-devel readline-devel xen-devel xhtml-dtd +# Only for directory ownership: +BuildRequires: gtk-doc URL: http://libvirt.org/ License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: Development/Libraries/C and C++ Autoreqprov: yes Version: 0.2.0 -Release: 1 +Release: 3 Summary: A C toolkit to interract with the virtualization capabilities of Linux -Source0: libvirt-%{version}.tar.gz +Source: %{name}-%{version}.tar.bz2 +Patch: libvirt-cflags.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: xen libxml2 readline ncurses gnutls ExclusiveArch: %ix86 x86_64 +%define _libexecdir %{_prefix}/lib/%{name} %description Libvirt is a C toolkit to interract with the virtualization @@ -43,7 +47,7 @@ Authors: %package devel Summary: A C toolkit to interract with the virtualization capabilities of Linux Group: Development/Libraries/C and C++ -Requires: libvirt = %{version} +Requires: %{name} = %{version} libxml2-devel xen-devel %description devel Libvirt is a C toolkit to interract with the virtualization @@ -56,6 +60,27 @@ integrate other virtualization mechanisms if needed. +Authors: +-------- + Daniel Veillard + Karel Zak + +%package doc +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 @@ -64,8 +89,9 @@ Authors: %package python Summary: A C toolkit to interract with the virtualization capabilities of Linux Group: Development/Libraries/C and C++ -Requires: libvirt = %{version} -Requires: %{_libdir}/python%(echo `python -c "import sys; print sys.version[0:3]"`) +Requires: %{name} = %{version} + +%py_requires %description python Libvirt is a C toolkit to interract with the virtualization @@ -84,88 +110,89 @@ Authors: Karel Zak %prep -%setup +%setup -q +%patch +rm po/no.* %build -export CFLAGS="$RPM_OPT_FLAGS" +autoreconf -f -i +# libvirt-0.2.0 FIXME: +# libvirt.c: 180 +# xend_internal.c: 1033 +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure -make +make %{?jobs:-j%jobs} DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name} +cd docs/examples ; make index.html ; cd ../.. %install -%{__rm} -rf $RPM_BUILD_ROOT -%makeinstall -(cd docs/examples ; make clean ; rm -rf .deps) -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a +%makeinstall DOCS_DIR=%{_docdir}/%{name}-python EXAMPLE_DIR=%{_docdir}/%{name}-python/examples HTML_DIR=%{_docdir}/%{name} +cp -a AUTHORS ChangeLog COPYING COPYING.LIB NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{name}/ +cp -a docs/{*.html,*.gif,*.rng,{libvirt,test}*.xml} $RPM_BUILD_ROOT%{_docdir}/%{name} +mkdir $RPM_BUILD_ROOT%{_docdir}/%{name}/examples +cp -a docs/examples/{*.c,*.html,info1,suspend} $RPM_BUILD_ROOT%{_docdir}/%{name}/examples +rm $RPM_BUILD_ROOT%{_docdir}/%{name}/examples.x* +cp -a docs/examples/python/{*.py,*.xml,README} $RPM_BUILD_ROOT%{_docdir}/%{name}-python/examples +chmod +x $RPM_BUILD_ROOT%{_docdir}/%{name}-python/examples/*.py +rm $RPM_BUILD_ROOT%{_libdir}/*.*a $RPM_BUILD_ROOT%{py_sitedir}/*.*a #mkdir -p $RPM_BUILD_ROOT/etc/permissions.d #cat > $RPM_BUILD_ROOT/etc/permissions.d/libvirt <