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