]> git.proxmox.com Git - pve-qemu.git/blame - debian/rules
update submodule and patches for 4.2.0
[pve-qemu.git] / debian / rules
CommitLineData
95259824
WB
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
1024d894 12include /usr/share/dpkg/pkg-info.mk
95259824
WB
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)
16DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
18
a544966d
WB
19ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
20
95259824
WB
21PACKAGE=pve-qemu-kvm
22destdir := $(CURDIR)/debian/$(PACKAGE)
23
376d9ce8
TL
24flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
25
95259824
WB
26CFLAGS = -Wall
27
28ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
29 CFLAGS += -O0
30else
31 CFLAGS += -O2
32endif
33
34config.status: configure
35 dh_testdir
36 # Add here commands to configure the package.
a21f5778
EK
37
38 # guest-agent is only required for guest systems
964a487a 39 ./configure \
2fb093cf 40 --docdir=/usr/share/doc/pve-qemu-kvm \
964a487a
TL
41 --localstatedir=/var \
42 --prefix=/usr \
43 --sysconfdir=/etc \
44 --target-list=$(ARCH)-softmmu,aarch64-softmmu \
45 --with-confsuffix="/kvm" \
1024d894 46 --with-pkgversion="${DEB_SOURCE}_${DEB_VERSION_UPSTREAM}" \
964a487a
TL
47 --audio-drv-list="alsa" \
48 --datadir=/usr/share \
edf1ab9a 49 --disable-capstone \
964a487a
TL
50 --disable-gtk \
51 --disable-guest-agent \
52 --disable-guest-agent-msi \
53 --disable-libnfs \
ec302df9 54 --disable-libxml2 \
b7022279 55 --disable-sdl \
964a487a
TL
56 --disable-smartcard \
57 --disable-strip \
58 --disable-xen \
42dfcf97 59 --enable-curl \
8dfe6145 60 --enable-docs \
964a487a
TL
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 \
73e12bd7 69 --enable-seccomp \
964a487a
TL
70 --enable-spice \
71 --enable-usb-redir \
72 --enable-virtfs \
73 --enable-xfsctl
95259824 74
8e326f30 75build: build-stamp
95259824
WB
76
77build-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
8e326f30 87clean:
95259824
WB
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
94ifneq "$(wildcard /usr/share/misc/config.sub)" ""
95 cp -f /usr/share/misc/config.sub config.sub
96endif
97ifneq "$(wildcard /usr/share/misc/config.guess)" ""
98 cp -f /usr/share/misc/config.guess config.guess
99endif
100
101
102 dh_clean
103
104install: build
105 dh_testdir
106 dh_testroot
68ba098a 107 dh_prep
95259824 108 dh_installdirs
7df330a9 109 dh_lintian
95259824
WB
110
111 # Add here commands to install the package into debian/pve-kvm.
112 $(MAKE) DESTDIR=$(destdir) install
113
95259824
WB
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
8fefb882
TL
120 rm $(destdir)/usr/share/kvm/s390-netboot.img
121 rm $(destdir)/usr/share/kvm/qemu_vga.ndrv
95259824 122 rm $(destdir)/usr/share/kvm/slof.bin
95259824
WB
123 rm $(destdir)/usr/share/kvm/u-boot.e500
124 # remove Aplha files
125 rm $(destdir)/usr/share/kvm/palcode-clipper
126
95259824
WB
127 # Remove things we don't package at all, would be a "kvm-dev" package
128 rm -Rf $(destdir)/usr/include/linux/
129 rm -Rf $(destdir)/usr/include
130 rm -Rf $(destdir)/usr/lib*
131
376d9ce8
TL
132 # CPU flags are static for QEMU version, allows avoiding more costly checks
133 $(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
134
95259824
WB
135# Build architecture-independent files here.
136binary-indep: build install
137# We have nothing to do by default.
138
139# Build architecture-dependent files here.
140binary-arch: build install
141 dh_testdir
142 dh_testroot
2c2626dd
EK
143 # exclude historic Changelog file, which stops at release 0.14
144 dh_installchangelogs --exclude=Changelog
95259824
WB
145 dh_installdocs
146 dh_installexamples
fd202a5a 147 dh_install
95259824
WB
148# dh_installmenu
149# dh_installdebconf
150# dh_installlogrotate
151# dh_installemacsen
152# dh_installpam
153# dh_installmime
154# dh_python
155# dh_installinit
156# dh_installcron
157# dh_installinfo
158 dh_installman
159 dh_link
160 dh_strip --dbg-package=pve-qemu-kvm-dbg
161 dh_compress
162 dh_fixperms
163# dh_perl
164# dh_makeshlibs
165 dh_installdeb
f3c1e326
FG
166 # Debian >= Buster has libglusterfs0 and lots of libgfFOO, upstream has the libs in glusterfs-common
167 # pass -x to dpkg-shlibdeps and specify dependencies in d/control instead
168 dh_shlibdeps -- -xlibglusterfs0 -xlibgfxdr0 -xlibgfrpc0 -xlibgfdb0 -xlibgfchangelog0 -xlibgfapi0
95259824
WB
169 dh_gencontrol
170 dh_md5sums
171 dh_builddeb
172
173binary: binary-indep binary-arch
174.PHONY: build clean binary-indep binary-arch binary install