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.
9 # Uncomment this to turn on verbose mode.
13 # These are used for cross-compiling and for saving the configure script
14 # from having to guess our platform (since we know it already)
15 DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
16 DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
18 ARCH ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_CPU
)
21 destdir
:= $(CURDIR
)/debian
/$(PACKAGE
)
25 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
31 config.status
: configure
33 # Add here commands to configure the package.
35 # guest-agent is only required for guest systems
36 .
/configure
--with-confsuffix
="/kvm" --target-list
=$(ARCH
)-softmmu
,aarch64-softmmu \
37 --prefix=/usr
--datadir=/usr
/share \
38 --docdir
=/usr
/share
/doc
/pve-qemu-kvm \
39 --sysconfdir
=/etc
--localstatedir
=/var
--disable-xen
--enable-gnutls \
40 --enable-sdl
--enable-linux-aio
--enable-rbd
--enable-libiscsi \
41 --disable-smartcard
--audio-drv-list
="alsa" --enable-spice \
42 --enable-usb-redir
--enable-glusterfs
--enable-libusb
--disable-gtk \
43 --enable-xfsctl
--enable-numa
--disable-strip
--enable-jemalloc \
44 --enable-virtfs
--disable-libnfs \
45 --disable-guest-agent
--disable-guest-agent-msi
49 build-stamp
: config.status
52 # Add here commands to compile the package.
55 #docbook-to-man debian/kvm.sgml > kvm.1
64 # Add here commands to clean up after the build process.
66 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
67 cp
-f
/usr
/share
/misc
/config.sub config.sub
69 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
70 cp
-f
/usr
/share
/misc
/config.guess config.guess
82 # Add here commands to install the package into debian/pve-kvm.
83 $(MAKE
) DESTDIR
=$(destdir
) install
85 # we do not need openbios files (sparc/ppc)
86 rm -rf
$(destdir
)/usr
/share
/kvm
/openbios-
*
88 rm $(destdir
)/usr
/share
/kvm
/*.dtb
89 rm $(destdir
)/usr
/share
/kvm
/ppc_rom.bin
90 rm $(destdir
)/usr
/share
/kvm
/s390-ccw.img
91 rm $(destdir
)/usr
/share
/kvm
/s390-netboot.img
92 rm $(destdir
)/usr
/share
/kvm
/qemu_vga.ndrv
93 rm $(destdir
)/usr
/share
/kvm
/slof.bin
94 rm $(destdir
)/usr
/share
/kvm
/spapr-rtas.bin
95 rm $(destdir
)/usr
/share
/kvm
/u-boot.e500
97 rm $(destdir
)/usr
/share
/kvm
/palcode-clipper
99 # Remove things we don't package at all, would be a "kvm-dev" package
100 rm -Rf
$(destdir
)/usr
/include/linux
/
101 rm -Rf
$(destdir
)/usr
/include
102 rm -Rf
$(destdir
)/usr
/lib
*
104 # Build architecture-independent files here.
105 binary-indep
: build
install
106 # We have nothing to do by default.
108 # Build architecture-dependent files here.
109 binary-arch
: build
install
112 # exclude historic Changelog file, which stops at release 0.14
113 dh_installchangelogs
--exclude
=Changelog
119 # dh_installlogrotate
129 dh_strip
--dbg-package
=pve-qemu-kvm-dbg
140 binary
: binary-indep binary-arch
141 .PHONY
: build
clean binary-indep binary-arch binary
install