]> git.proxmox.com Git - pve-qemu.git/blame - debian/rules
d/rules: enable slirp again
[pve-qemu.git] / debian / rules
CommitLineData
95259824
WB
1#!/usr/bin/make -f
2# -*- makefile -*-
3# Sample debian/rules that uses debhelper.
4# This file was originally written by Joey Hess and Craig Small.
5# As a special exception, when this file is copied by dh-make into a
6# dh-make output file, you may use that output file without restriction.
7# This special exception was added by Craig Small in version 0.37 of dh-make.
8
9# Uncomment this to turn on verbose mode.
10#export DH_VERBOSE=1
11
1024d894 12include /usr/share/dpkg/pkg-info.mk
95259824
WB
13
14# These are used for cross-compiling and for saving the configure script
15# from having to guess our platform (since we know it already)
16DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
18
a544966d
WB
19ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
20
95259824
WB
21PACKAGE=pve-qemu-kvm
22destdir := $(CURDIR)/debian/$(PACKAGE)
23
376d9ce8 24flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
6503e6e0 25machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
376d9ce8 26
817b7667
SR
27# default QEMU out-of-tree build directory is ./build
28BUILDDIR=build
29
95259824
WB
30CFLAGS = -Wall
31
32ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
33 CFLAGS += -O0
34else
35 CFLAGS += -O2
36endif
37
817b7667 38${BUILDDIR}/config.status: configure
95259824
WB
39 dh_testdir
40 # Add here commands to configure the package.
a21f5778
EK
41
42 # guest-agent is only required for guest systems
964a487a 43 ./configure \
eb96e850 44 --with-git-submodules=ignore \
2fb093cf 45 --docdir=/usr/share/doc/pve-qemu-kvm \
964a487a
TL
46 --localstatedir=/var \
47 --prefix=/usr \
48 --sysconfdir=/etc \
49 --target-list=$(ARCH)-softmmu,aarch64-softmmu \
817b7667 50 --with-suffix="kvm" \
2b259b70 51 --with-pkgversion="${DEB_SOURCE}_${DEB_VERSION_UPSTREAM_REVISION}" \
964a487a
TL
52 --audio-drv-list="alsa" \
53 --datadir=/usr/share \
44813695 54 --libexecdir=/usr/lib/kvm \
edf1ab9a 55 --disable-capstone \
964a487a
TL
56 --disable-gtk \
57 --disable-guest-agent \
58 --disable-guest-agent-msi \
59 --disable-libnfs \
fe0542be 60 --disable-libssh \
b7022279 61 --disable-sdl \
964a487a
TL
62 --disable-smartcard \
63 --disable-strip \
64 --disable-xen \
42dfcf97 65 --enable-curl \
8dfe6145 66 --enable-docs \
964a487a
TL
67 --enable-glusterfs \
68 --enable-gnutls \
964a487a
TL
69 --enable-libiscsi \
70 --enable-libusb \
71 --enable-linux-aio \
403f23a0 72 --enable-linux-io-uring \
964a487a 73 --enable-numa \
13d3e10a 74 --enable-opengl \
964a487a 75 --enable-rbd \
73e12bd7 76 --enable-seccomp \
0906461d 77 --enable-slirp \
964a487a
TL
78 --enable-spice \
79 --enable-usb-redir \
13d3e10a 80 --enable-virglrenderer \
964a487a 81 --enable-virtfs \
44813695 82 --enable-virtiofsd \
3aa5b759 83 --enable-zstd
95259824 84
8e326f30 85build: build-stamp
95259824 86
817b7667 87build-stamp: ${BUILDDIR}/config.status
95259824
WB
88 dh_testdir
89
90 # Add here commands to compile the package.
91 $(MAKE)
92
93 #docbook-to-man debian/kvm.sgml > kvm.1
94
95 touch $@
96
8e326f30 97clean:
95259824
WB
98 dh_testdir
99 dh_testroot
100 rm -f build-stamp
101
102 # Add here commands to clean up after the build process.
103 -$(MAKE) distclean
104ifneq "$(wildcard /usr/share/misc/config.sub)" ""
105 cp -f /usr/share/misc/config.sub config.sub
106endif
107ifneq "$(wildcard /usr/share/misc/config.guess)" ""
108 cp -f /usr/share/misc/config.guess config.guess
109endif
110
111
112 dh_clean
113
114install: build
115 dh_testdir
116 dh_testroot
68ba098a 117 dh_prep
95259824 118 dh_installdirs
7df330a9 119 dh_lintian
95259824
WB
120
121 # Add here commands to install the package into debian/pve-kvm.
122 $(MAKE) DESTDIR=$(destdir) install
123
95259824
WB
124 # we do not need openbios files (sparc/ppc)
125 rm -rf $(destdir)/usr/share/kvm/openbios-*
126 # remove ppc files
127 rm $(destdir)/usr/share/kvm/*.dtb
95259824 128 rm $(destdir)/usr/share/kvm/s390-ccw.img
8fefb882
TL
129 rm $(destdir)/usr/share/kvm/s390-netboot.img
130 rm $(destdir)/usr/share/kvm/qemu_vga.ndrv
95259824 131 rm $(destdir)/usr/share/kvm/slof.bin
95259824 132 rm $(destdir)/usr/share/kvm/u-boot.e500
a6ede898 133 # remove Alpha files
95259824 134 rm $(destdir)/usr/share/kvm/palcode-clipper
817b7667 135 # remove RISC-V files
eba403aa
FE
136 rm $(destdir)/usr/share/kvm/opensbi-riscv32-generic-fw_dynamic.bin
137 rm $(destdir)/usr/share/kvm/opensbi-riscv64-generic-fw_dynamic.bin
95259824 138
95259824
WB
139 # Remove things we don't package at all, would be a "kvm-dev" package
140 rm -Rf $(destdir)/usr/include/linux/
141 rm -Rf $(destdir)/usr/include
44813695
TL
142 rm -f $(destdir)/usr/lib/kvm/qemu-bridge-helper
143 rm -f $(destdir)/usr/lib/kvm/virtfs-proxy-helper
95259824 144
376d9ce8
TL
145 # CPU flags are static for QEMU version, allows avoiding more costly checks
146 $(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
a6ede898 147 $(destdir)/usr/bin/qemu-system-x86_64 -machine help | ./debian/parse-machines.pl > $(machinefile)
376d9ce8 148
95259824
WB
149# Build architecture-independent files here.
150binary-indep: build install
151# We have nothing to do by default.
152
153# Build architecture-dependent files here.
154binary-arch: build install
155 dh_testdir
156 dh_testroot
2c2626dd
EK
157 # exclude historic Changelog file, which stops at release 0.14
158 dh_installchangelogs --exclude=Changelog
95259824
WB
159 dh_installdocs
160 dh_installexamples
fd202a5a 161 dh_install
95259824
WB
162# dh_installmenu
163# dh_installdebconf
164# dh_installlogrotate
165# dh_installemacsen
166# dh_installpam
167# dh_installmime
168# dh_python
169# dh_installinit
170# dh_installcron
171# dh_installinfo
172 dh_installman
173 dh_link
174 dh_strip --dbg-package=pve-qemu-kvm-dbg
175 dh_compress
176 dh_fixperms
177# dh_perl
178# dh_makeshlibs
179 dh_installdeb
f3c1e326
FG
180 # Debian >= Buster has libglusterfs0 and lots of libgfFOO, upstream has the libs in glusterfs-common
181 # pass -x to dpkg-shlibdeps and specify dependencies in d/control instead
182 dh_shlibdeps -- -xlibglusterfs0 -xlibgfxdr0 -xlibgfrpc0 -xlibgfdb0 -xlibgfchangelog0 -xlibgfapi0
95259824
WB
183 dh_gencontrol
184 dh_md5sums
185 dh_builddeb
186
187binary: binary-indep binary-arch
188.PHONY: build clean binary-indep binary-arch binary install