[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, experimental, updated. debian/0.9.0_rc2-2

Guido Günther agx at sigxcpu.org
Fri Apr 1 08:26:38 UTC 2011


The following commit has been merged in the experimental branch:
commit 08c491580078f55d441942fb750f1e8c48f503e4
Author: Guido Günther <agx at sigxcpu.org>
Date:   Thu Mar 31 22:12:30 2011 +0200

    Add support for kFreeBSD
    
    Closes: #612238

diff --git a/debian/control b/debian/control
index 4a0283c..9a957fb 100644
--- a/debian/control
+++ b/debian/control
@@ -14,19 +14,20 @@ Build-Depends: cdbs (>= 0.4.90~),
  libavahi-client-dev,
  libsasl2-dev,
  libxen-dev [i386 amd64],
- lvm2,
+ lvm2 [linux-any],
  qemu [amd64 i386 powerpc sparc],
- open-iscsi,
+ open-iscsi [linux-any],
  libparted0-dev (>= 2.2),
- libdevmapper-dev,
+ libdevmapper-dev [linux-any],
  uuid-dev,
- libudev-dev,
+ libudev-dev [linux-any],
+ libhal-dev [!linux-any],
  libpciaccess-dev,
  module-init-tools,
  policykit-1,
- libcap-ng-dev,
+ libcap-ng-dev [linux-any],
  virtualbox-ose [amd64 i386],
- libnl-dev
+ libnl-dev [linux-any]
 XS-Python-Version: current
 Build-Conflicts: dpkg-dev (= 1.15.3)
 Vcs-Git: git://git.debian.org/git/pkg-libvirt/libvirt.git
@@ -55,7 +56,7 @@ Description: the programs for the libvirt library
 Package: libvirt0
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Recommends: lvm2
+Recommends: lvm2 [linux-any]
 Description: library for interfacing with different virtualization systems
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
diff --git a/debian/libvirt-bin.install b/debian/libvirt-bin.install
index 5d2274a..25e6ae1 100644
--- a/debian/libvirt-bin.install
+++ b/debian/libvirt-bin.install
@@ -2,7 +2,7 @@ usr/bin/*
 usr/sbin/*
 etc/libvirt/*
 etc/sasl2/*
-usr/share/polkit-1/*
+usr/share/polkit-1
 usr/lib/libvirt/*
 usr/share/augeas/*
 usr/share/libvirt/*
diff --git a/debian/rules b/debian/rules
index db2d901..9b80797 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,17 +3,39 @@
 DEB_BUILD_PARALLEL = yes
 
 ifneq (,$(findstring $(DEB_HOST_ARCH), i386 amd64))
-  BUILD_XEN = --with-xen
-  BUILD_VBOX = --with-vbox
+  WITH_XEN = --with-xen
+  WITH_VBOX = --with-vbox
 else
-  BUILD_XEN = --without-xen
-  BUILD_VBOX = --without-vbox
+  WITH_XEN = --without-xen
+  WITH_VBOX = --without-vbox
 endif
 
-ifneq (,$(findstring $(DEB_HOST_ARCH), ia64))
-  BUILD_LXC = --without-lxc
+ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
+  WITH_STORAGE_LVM    = --with-storage-lvm
+  WITH_STORAGE_ISCSI  = --with-storage-iscsi
+  WITH_STORAGE_DISK   =	--with-storage-disk
+  WITH_UDEV           = --with-udev --without-hal
+  WITH_CAPNG          = --with-capng
+  WITH_POLKIT         = --with-polkit
+  WITH_MACVTAP        = --with-macvtap
+  WITH_NETWORK        = --with-network
+  WITH_QEMU           = --with-qemu
+  ifneq (,$(findstring $(DEB_HOST_ARCH), ia64))
+      WITH_LXC        = --without-lxc
+  else
+      WITH_LXC        = --with-lxc
+  endif
 else
-  BUILD_LXC = --with-lxc
+  WITH_STORAGE_LVM    = --without-storage-lvm
+  WITH_STORAGE_ISCSI  = --without-storage-iscsi
+  WITH_STORAGE_DISK   =	--without-storage-disk
+  WITH_UDEV           = --without-udev --with-hal
+  WITH_CAPNG          = --without-capng
+  WITH_POLKIT         = --without-polkit
+  WITH_MACVTAP        = --without-macvtap
+  WITH_NETWORK        = --without-network
+  WITH_QEMU           = --without-qemu
+  WITH_LXC            = --without-lxc
 endif
 
 include /usr/share/cdbs/1/rules/debhelper.mk
@@ -22,30 +44,31 @@ include /usr/share/cdbs/1/class/python-distutils.mk
 
 DEB_CONFIGURE_EXTRA_FLAGS :=     \
 	--disable-rpath          \
-	--with-qemu              \
+	$(WITH_QEMU)		 \
 	--with-qemu-user=libvirt-qemu  \
 	--with-qemu-group=kvm    \
 	--with-openvz            \
 	--with-avahi             \
 	--with-sasl              \
-	--with-polkit		 \
-	--with-udev		 \
-	--without-hal		 \
+	$(WITH_POLKIT)		 \
+	$(WITH_UDEV)		 \
 	--with-storage-fs        \
-	--with-storage-lvm       \
-	--with-storage-iscsi     \
-	--with-storage-disk      \
+	$(WITH_STORAGE_LVM)	 \
+	$(WITH_STORAGE_ISCSI)	 \
+	$(WITH_STORAGE_DISK)	 \
 	--with-init-script=none  \
 	--without-numactl	 \
 	--without-selinux        \
 	--without-esx		 \
 	--without-libssh2	 \
-	--with-capng		 \
-	--with-macvtap		 \
+	$(WITH_CAPNG)		 \
 	--enable-debug		 \
-	$(BUILD_XEN)		 \
-	$(BUILD_VBOX)		 \
-	$(BUILD_LXC)
+	$(WITH_MACVTAP)		 \
+	$(WITH_NETWORK)		 \
+	--without-netcf		 \
+	$(WITH_XEN)		 \
+	$(WITH_VBOX)		 \
+	$(WITH_LXC)
 
 DEB_COMPRESS_EXCLUDE = .o event-test hellolibvirt info1 suspend
 DEB_PYTHON_SETUP_CMD = /dev/null
@@ -60,6 +83,10 @@ binary-install/libvirt-bin::
 	cp $(CURDIR)/tools/libvirt-guests.sysconf $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
 	dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
 
+build/libvirt-bin::
+	# Add empty dir so dh_install doesn't fail on kFreebsd until we have Polkit support
+	mkdir -p debian/tmp/usr/share/polkit-1
+
 binary-install/libvirt-doc::
 	find $(EXAMPLES_DIR) -name "*.o" -type f -delete -o -name .libs -type d -exec rm -rf {} \;
 	rm -f $(EXAMPLES_DIR)domain-events/events-c/event-test

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list