-
Notifications
You must be signed in to change notification settings - Fork 12
/
compile_libvirt-0.8.0.sh
70 lines (54 loc) · 1.79 KB
/
compile_libvirt-0.8.0.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh -ex
. utilslib.sh
basedir=/src/libvirt
baseurl=http://libvirt.org/sources
version=0.8.0
tarball=libvirt-${version}.tar.gz
directory=libvirt-${version}
patch=libvirt-${version}-mingw.patch
mkdir -p $basedir
pushd $basedir
utilslib_download $baseurl $tarball
if [ ! -d $directory ]
then
echo unpacking $tarball ...
tar -xvf $tarball
fi
pushd $directory
if [ ! -f mingw.patch.applied ]
then
echo patching ...
patch -p1 < ../../$patch
echo applied > mingw.patch.applied
fi
if [ ! -f configure.done ]
then
CFLAGS=-I/include\ -L/lib ./configure --prefix= --enable-debug=yes \
--without-xen --without-libvirtd --without-openvz \
--without-lxc --without-vbox --without-python
#CFLAGS=-g\ -ggdb\ -O0\ -I/include\ -L/lib ./configure --prefix= \
# --enable-debug=yes --enable-compile-warnings=error \
# --without-xen --without-libvirtd --without-openvz \
# --without-lxc --without-vbox
#CFLAGS=-g\ -ggdb\ -O0\ -I/include\ -L/lib ./autogen.sh --prefix= \
# --enable-debug=yes --enable-compile-warnings=error \
# --without-xen --without-libvirtd --without-openvz \
# --without-lxc --without-vbox
echo done > configure.done
fi
make
make install
# prepare gather
cp src/.libs/libvirt-0.dll $prepare_bin
cp src/.libs/libvirt.dll.a $prepare_lib
cp src/.libs/libvirt.a $prepare_lib
cp tools/.libs/virsh.exe $prepare_bin
mkdir -p $prepare_include/libvirt
cp include/libvirt/libvirt.h $prepare_include/libvirt
cp include/libvirt/virterror.h $prepare_include/libvirt
cp python/libvirt.py $prepare_python
cp python/.libs/libvirtmod.dll $prepare_python/libvirtmod.pyd
cp ../libvirt-${version}.tar.gz $prepare_src
cp ../../libvirt-${version}-mingw.patch $prepare_src
popd
popd