]> git.proxmox.com Git - pve-qemu.git/blobdiff - debian/rules
Write recognized CPUID flags into static file
[pve-qemu.git] / debian / rules
index f7e093b0a99e90f5420551eebc5e3aab135c0070..dad78ddb8dd42f73fb17855c020647bd34cbfc01 100755 (executable)
@@ -9,6 +9,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpkg/pkg-info.mk
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
@@ -20,6 +21,8 @@ ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
 PACKAGE=pve-qemu-kvm
 destdir := $(CURDIR)/debian/$(PACKAGE)
 
+flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
+
 CFLAGS = -Wall
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -33,17 +36,41 @@ config.status: configure
        # Add here commands to configure the package.
 
        # guest-agent is only required for guest systems
-       ./configure --with-confsuffix="/kvm" --target-list=$(ARCH)-softmmu,aarch64-softmmu \
-       --prefix=/usr --datadir=/usr/share \
+       ./configure \
        --docdir=/usr/share/doc/pve-qemu-kvm \
-       --sysconfdir=/etc --localstatedir=/var --disable-xen --enable-gnutls \
-       --enable-sdl --enable-linux-aio --enable-rbd --enable-libiscsi \
-       --disable-smartcard --audio-drv-list="alsa" --enable-spice \
-       --enable-usb-redir --enable-glusterfs --enable-libusb --disable-gtk \
-       --enable-xfsctl --enable-numa --disable-strip --enable-jemalloc \
-       --enable-virtfs --disable-libnfs \
+       --localstatedir=/var \
+       --prefix=/usr \
+       --sysconfdir=/etc \
+       --target-list=$(ARCH)-softmmu,aarch64-softmmu \
+       --with-confsuffix="/kvm" \
+       --with-pkgversion="${DEB_SOURCE}_${DEB_VERSION_UPSTREAM}" \
+       --audio-drv-list="alsa" \
+       --datadir=/usr/share \
        --disable-capstone \
-       --disable-guest-agent --disable-guest-agent-msi
+       --disable-gtk \
+       --disable-guest-agent \
+       --disable-guest-agent-msi \
+       --disable-libnfs \
+       --disable-libxml2 \
+       --disable-sdl \
+       --disable-smartcard \
+       --disable-strip \
+       --disable-xen \
+       --enable-curl \
+       --enable-docs \
+       --enable-glusterfs \
+       --enable-gnutls \
+       --enable-jemalloc \
+       --enable-libiscsi \
+       --enable-libusb \
+       --enable-linux-aio \
+       --enable-numa \
+       --enable-rbd \
+       --enable-seccomp \
+       --enable-spice \
+       --enable-usb-redir \
+       --enable-virtfs \
+       --enable-xfsctl
 
 build: build-stamp
 
@@ -79,6 +106,7 @@ install: build
        dh_testroot
        dh_prep
        dh_installdirs
+       dh_lintian
 
        # Add here commands to install the package into debian/pve-kvm.
        $(MAKE) DESTDIR=$(destdir) install
@@ -102,6 +130,9 @@ install: build
        rm -Rf $(destdir)/usr/include
        rm -Rf $(destdir)/usr/lib*
 
+       # CPU flags are static for QEMU version, allows avoiding more costly checks
+       $(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
+
 # Build architecture-independent files here.
 binary-indep: build install
 # We have nothing to do by default.
@@ -133,7 +164,9 @@ binary-arch: build install
 #      dh_perl
 #      dh_makeshlibs
        dh_installdeb
-       dh_shlibdeps
+       # Debian >= Buster has libglusterfs0 and lots of libgfFOO, upstream has the libs in glusterfs-common
+       # pass -x to dpkg-shlibdeps and specify dependencies in d/control instead
+       dh_shlibdeps -- -xlibglusterfs0 -xlibgfxdr0 -xlibgfrpc0 -xlibgfdb0 -xlibgfchangelog0 -xlibgfapi0
        dh_gencontrol
        dh_md5sums
        dh_builddeb