]> git.proxmox.com Git - pve-qemu.git/blob - debian/rules
add patch for CVE-2019-20382 (vnc disconnect memory leak)
[pve-qemu.git] / debian / rules
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
12 include /usr/share/dpkg/pkg-info.mk
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)
16 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
18
19 ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
20
21 PACKAGE=pve-qemu-kvm
22 destdir := $(CURDIR)/debian/$(PACKAGE)
23
24 flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
25
26 CFLAGS = -Wall
27
28 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
29 CFLAGS += -O0
30 else
31 CFLAGS += -O2
32 endif
33
34 config.status: configure
35 dh_testdir
36 # Add here commands to configure the package.
37
38 # guest-agent is only required for guest systems
39 ./configure \
40 --docdir=/usr/share/doc/pve-qemu-kvm \
41 --localstatedir=/var \
42 --prefix=/usr \
43 --sysconfdir=/etc \
44 --target-list=$(ARCH)-softmmu,aarch64-softmmu \
45 --with-confsuffix="/kvm" \
46 --with-pkgversion="${DEB_SOURCE}_${DEB_VERSION_UPSTREAM}" \
47 --audio-drv-list="alsa" \
48 --datadir=/usr/share \
49 --disable-capstone \
50 --disable-gtk \
51 --disable-guest-agent \
52 --disable-guest-agent-msi \
53 --disable-libnfs \
54 --disable-libxml2 \
55 --disable-sdl \
56 --disable-smartcard \
57 --disable-strip \
58 --disable-xen \
59 --enable-curl \
60 --enable-docs \
61 --enable-glusterfs \
62 --enable-gnutls \
63 --enable-jemalloc \
64 --enable-libiscsi \
65 --enable-libusb \
66 --enable-linux-aio \
67 --enable-numa \
68 --enable-rbd \
69 --enable-seccomp \
70 --enable-spice \
71 --enable-usb-redir \
72 --enable-virtfs \
73 --enable-xfsctl
74
75 build: build-stamp
76
77 build-stamp: config.status
78 dh_testdir
79
80 # Add here commands to compile the package.
81 $(MAKE)
82
83 #docbook-to-man debian/kvm.sgml > kvm.1
84
85 touch $@
86
87 clean:
88 dh_testdir
89 dh_testroot
90 rm -f build-stamp
91
92 # Add here commands to clean up after the build process.
93 -$(MAKE) distclean
94 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
95 cp -f /usr/share/misc/config.sub config.sub
96 endif
97 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
98 cp -f /usr/share/misc/config.guess config.guess
99 endif
100
101
102 dh_clean
103
104 install: build
105 dh_testdir
106 dh_testroot
107 dh_prep
108 dh_installdirs
109 dh_lintian
110
111 # Add here commands to install the package into debian/pve-kvm.
112 $(MAKE) DESTDIR=$(destdir) install
113
114 # we do not need openbios files (sparc/ppc)
115 rm -rf $(destdir)/usr/share/kvm/openbios-*
116 # remove ppc files
117 rm $(destdir)/usr/share/kvm/*.dtb
118 rm $(destdir)/usr/share/kvm/ppc_rom.bin
119 rm $(destdir)/usr/share/kvm/s390-ccw.img
120 rm $(destdir)/usr/share/kvm/s390-netboot.img
121 rm $(destdir)/usr/share/kvm/qemu_vga.ndrv
122 rm $(destdir)/usr/share/kvm/slof.bin
123 rm $(destdir)/usr/share/kvm/spapr-rtas.bin
124 rm $(destdir)/usr/share/kvm/u-boot.e500
125 # remove Aplha files
126 rm $(destdir)/usr/share/kvm/palcode-clipper
127
128 # Remove things we don't package at all, would be a "kvm-dev" package
129 rm -Rf $(destdir)/usr/include/linux/
130 rm -Rf $(destdir)/usr/include
131 rm -Rf $(destdir)/usr/lib*
132
133 # CPU flags are static for QEMU version, allows avoiding more costly checks
134 $(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
135
136 # Build architecture-independent files here.
137 binary-indep: build install
138 # We have nothing to do by default.
139
140 # Build architecture-dependent files here.
141 binary-arch: build install
142 dh_testdir
143 dh_testroot
144 # exclude historic Changelog file, which stops at release 0.14
145 dh_installchangelogs --exclude=Changelog
146 dh_installdocs
147 dh_installexamples
148 dh_install
149 # dh_installmenu
150 # dh_installdebconf
151 # dh_installlogrotate
152 # dh_installemacsen
153 # dh_installpam
154 # dh_installmime
155 # dh_python
156 # dh_installinit
157 # dh_installcron
158 # dh_installinfo
159 dh_installman
160 dh_link
161 dh_strip --dbg-package=pve-qemu-kvm-dbg
162 dh_compress
163 dh_fixperms
164 # dh_perl
165 # dh_makeshlibs
166 dh_installdeb
167 # Debian >= Buster has libglusterfs0 and lots of libgfFOO, upstream has the libs in glusterfs-common
168 # pass -x to dpkg-shlibdeps and specify dependencies in d/control instead
169 dh_shlibdeps -- -xlibglusterfs0 -xlibgfxdr0 -xlibgfrpc0 -xlibgfdb0 -xlibgfchangelog0 -xlibgfapi0
170 dh_gencontrol
171 dh_md5sums
172 dh_builddeb
173
174 binary: binary-indep binary-arch
175 .PHONY: build clean binary-indep binary-arch binary install