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
37 --docdir
=/usr
/share
/doc
/pve-qemu-kvm \
38 --localstatedir
=/var \
41 --target-list
=$(ARCH
)-softmmu
,aarch64-softmmu \
42 --with-confsuffix
="/kvm" \
43 --audio-drv-list
="alsa" \
44 --datadir=/usr
/share \
47 --disable-guest-agent \
48 --disable-guest-agent-msi \
69 build-stamp
: config.status
72 # Add here commands to compile the package.
75 #docbook-to-man debian/kvm.sgml > kvm.1
84 # Add here commands to clean up after the build process.
86 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
87 cp
-f
/usr
/share
/misc
/config.sub config.sub
89 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
90 cp
-f
/usr
/share
/misc
/config.guess config.guess
103 # Add here commands to install the package into debian/pve-kvm.
104 $(MAKE
) DESTDIR
=$(destdir
) install
106 # we do not need openbios files (sparc/ppc)
107 rm -rf
$(destdir
)/usr
/share
/kvm
/openbios-
*
109 rm $(destdir
)/usr
/share
/kvm
/*.dtb
110 rm $(destdir
)/usr
/share
/kvm
/ppc_rom.bin
111 rm $(destdir
)/usr
/share
/kvm
/s390-ccw.img
112 rm $(destdir
)/usr
/share
/kvm
/s390-netboot.img
113 rm $(destdir
)/usr
/share
/kvm
/qemu_vga.ndrv
114 rm $(destdir
)/usr
/share
/kvm
/slof.bin
115 rm $(destdir
)/usr
/share
/kvm
/spapr-rtas.bin
116 rm $(destdir
)/usr
/share
/kvm
/u-boot.e500
118 rm $(destdir
)/usr
/share
/kvm
/palcode-clipper
120 # Remove things we don't package at all, would be a "kvm-dev" package
121 rm -Rf
$(destdir
)/usr
/include/linux
/
122 rm -Rf
$(destdir
)/usr
/include
123 rm -Rf
$(destdir
)/usr
/lib
*
125 # Build architecture-independent files here.
126 binary-indep
: build
install
127 # We have nothing to do by default.
129 # Build architecture-dependent files here.
130 binary-arch
: build
install
133 # exclude historic Changelog file, which stops at release 0.14
134 dh_installchangelogs
--exclude
=Changelog
140 # dh_installlogrotate
150 dh_strip
--dbg-package
=pve-qemu-kvm-dbg
161 binary
: binary-indep binary-arch
162 .PHONY
: build
clean binary-indep binary-arch binary
install