]> git.proxmox.com Git - pve-qemu.git/blame_incremental - debian/rules
d/rules: add identation for configure switches for readability
[pve-qemu.git] / debian / rules
... / ...
CommitLineData
1#!/usr/bin/make -f
2# -*- makefile -*-
3
4# Uncomment this to turn on verbose mode.
5#export DH_VERBOSE=1
6
7include /usr/share/dpkg/default.mk
8
9HOST_CPU ?= $(DEB_HOST_GNU_CPU)
10
11PACKAGE=pve-qemu-kvm
12destdir := $(CURDIR)/debian/$(PACKAGE)
13
14flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
15machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
16
17# default QEMU out-of-tree build directory is ./build
18BUILDDIR=build
19
20CFLAGS = -Wall
21
22# FIXME: There is a second -02 added because of meson.build in the subproject
23# and that is appended after -O0 from here (last -O wins), so supporting noopt
24# doesn't work like this.
25ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26 CFLAGS += -O0
27else
28 CFLAGS += -O2
29endif
30
31export CFLAGS
32
33# DEB_BUILD_OPTIONS=parallel=N
34MAKEFLAGS += $(subst parallel=,-j,$(filter parallel=%,${DEB_BUILD_OPTIONS}))
35
36${BUILDDIR}/config.status: configure
37 dh_testdir
38 # Add here commands to configure the package.
39
40ifneq "$(wildcard /usr/share/misc/config.sub)" ""
41 cp -f /usr/share/misc/config.sub config.sub
42endif
43ifneq "$(wildcard /usr/share/misc/config.guess)" ""
44 cp -f /usr/share/misc/config.guess config.guess
45endif
46
47 # guest-agent is only required for guest systems
48 ./configure \
49 --with-git-submodules=ignore \
50 --docdir=/usr/share/doc/pve-qemu-kvm \
51 --localstatedir=/var \
52 --prefix=/usr \
53 --sysconfdir=/etc \
54 --target-list=$(HOST_CPU)-softmmu,aarch64-softmmu \
55 --with-suffix="kvm" \
56 --with-pkgversion="${DEB_SOURCE}_${DEB_VERSION_UPSTREAM_REVISION}" \
57 --audio-drv-list="alsa" \
58 --datadir=/usr/share \
59 --libexecdir=/usr/lib/kvm \
60 --disable-capstone \
61 --disable-gtk \
62 --disable-guest-agent \
63 --disable-guest-agent-msi \
64 --disable-libnfs \
65 --disable-libssh \
66 --disable-sdl \
67 --disable-smartcard \
68 --disable-strip \
69 --disable-xen \
70 --enable-curl \
71 --enable-docs \
72 --enable-glusterfs \
73 --enable-gnutls \
74 --enable-libiscsi \
75 --enable-libusb \
76 --enable-linux-aio \
77 --enable-linux-io-uring \
78 --enable-numa \
79 --enable-opengl \
80 --enable-rbd \
81 --enable-seccomp \
82 --enable-slirp \
83 --enable-spice \
84 --enable-usb-redir \
85 --enable-virglrenderer \
86 --enable-virtfs \
87 --enable-zstd
88
89build: build-arch build-indep
90build-arch: build-stamp
91build-indep: build-stamp
92build: build-stamp
93
94build-stamp: ${BUILDDIR}/config.status
95 dh_testdir
96
97 # Add here commands to compile the package.
98 $(MAKE)
99
100 #docbook-to-man debian/kvm.sgml > kvm.1
101
102 touch $@
103
104clean:
105 dh_testdir
106 dh_testroot
107 rm -f build-stamp
108
109 # Add here commands to clean up before the build process.
110 -$(MAKE) distclean
111
112 dh_clean
113
114install: build
115 dh_testdir
116 dh_testroot
117 dh_prep
118 dh_installdirs
119 dh_lintian
120
121 # Add here commands to install the package into debian/pve-kvm.
122 $(MAKE) DESTDIR=$(destdir) install
123
124 # Remove things we don't package at all, would be a "kvm-dev" package
125 rm -Rf $(destdir)/usr/include/linux/
126 rm -Rf $(destdir)/usr/include
127 rm -f $(destdir)/usr/lib/kvm/qemu-bridge-helper
128 rm -f $(destdir)/usr/lib/kvm/virtfs-proxy-helper
129
130 # CPU flags are static for QEMU version, allows avoiding more costly checks
131 $(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
132 $(destdir)/usr/bin/qemu-system-x86_64 -machine help | ./debian/parse-machines.pl > $(machinefile)
133
134# Build architecture-independent files here.
135binary-indep: build install
136# We have nothing to do by default.
137
138# Build architecture-dependent files here.
139binary-arch: build install
140 dh_testdir
141 dh_testroot
142 # exclude historic Changelog file, which stops at release 0.14
143 dh_installchangelogs --exclude=Changelog
144 dh_installdocs
145 dh_installexamples
146 dh_install
147# dh_installmenu
148# dh_installdebconf
149# dh_installlogrotate
150# dh_installemacsen
151# dh_installpam
152# dh_installmime
153# dh_python
154# dh_installinit
155# dh_installcron
156# dh_installinfo
157 dh_installman
158 dh_link
159 dh_strip --dbgsym-migration='pve-qemu-kvm-dbg (<<8.0.0-1~)'
160 dh_compress
161 dh_fixperms
162# dh_perl
163# dh_makeshlibs
164 dh_installdeb
165 # Debian >= Buster has libglusterfs0 and lots of libgfFOO, upstream has the libs in glusterfs-common
166 # pass -x to dpkg-shlibdeps and specify dependencies in d/control instead
167 dh_shlibdeps -- -xlibglusterfs0 -xlibgfxdr0 -xlibgfrpc0 -xlibgfdb0 -xlibgfchangelog0 -xlibgfapi0
168 dh_gencontrol
169 dh_md5sums
170 dh_builddeb
171
172binary: binary-indep binary-arch
173.PHONY: build clean binary-indep binary-arch binary install