# 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)
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)))
--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-msi \
--disable-libnfs \
--disable-libxml2 \
+ --disable-sdl \
--disable-smartcard \
--disable-strip \
--disable-xen \
--enable-curl \
+ --enable-docs \
--enable-glusterfs \
--enable-gnutls \
--enable-jemalloc \
--enable-linux-aio \
--enable-numa \
--enable-rbd \
- --enable-sdl \
--enable-seccomp \
--enable-spice \
--enable-usb-redir \
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.
# 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