]> git.proxmox.com Git - pve-qemu.git/blob - debian/rules
bump version to 8.1.2-3
[pve-qemu.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 include /usr/share/dpkg/default.mk
8
9 HOST_CPU ?= $(DEB_HOST_GNU_CPU)
10
11 PACKAGE=pve-qemu-kvm
12 destdir := $(CURDIR)/debian/$(PACKAGE)
13
14 flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
15 machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
16
17 # default QEMU out-of-tree build directory is ./build
18 BUILDDIR=build
19
20 # FIXME: pass to configure as --extra-cflags=CFLAGS ?! also LDFLAGS?
21 CFLAGS += -Wall
22
23 export CFLAGS
24
25 # DEB_BUILD_OPTIONS=parallel=N
26 MAKEFLAGS += $(subst parallel=,-j,$(filter parallel=%,${DEB_BUILD_OPTIONS}))
27
28 ${BUILDDIR}/config.status: configure
29 dh_testdir
30 # Add here commands to configure the package.
31
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
39 # guest-agent is only required for guest systems
40 ./configure \
41 --disable-download \
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
80
81 build: build-arch build-indep
82 build-arch: build-stamp
83 build-indep: build-stamp
84 build: build-stamp
85
86 build-stamp: ${BUILDDIR}/config.status
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
96 clean:
97 dh_testdir
98 dh_testroot
99 rm -f build-stamp
100
101 # Add here commands to clean up before the build process.
102 -$(MAKE) distclean
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 # 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
119 rm -f $(destdir)/usr/lib/kvm/qemu-bridge-helper
120 rm -f $(destdir)/usr/lib/kvm/virtfs-proxy-helper
121
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)
124 $(destdir)/usr/bin/qemu-system-x86_64 -machine help | ./debian/parse-machines.pl > $(machinefile)
125
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
134 # exclude historic Changelog file, which stops at release 0.14
135 dh_installchangelogs --exclude=Changelog
136 dh_installdocs
137 dh_installexamples
138 dh_install
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
151 dh_strip --dbgsym-migration='pve-qemu-kvm-dbg (<<8.0.0-1~)'
152 dh_compress
153 dh_fixperms
154 # dh_perl
155 # dh_makeshlibs
156 dh_installdeb
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
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