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