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.
12 include /usr
/share
/dpkg
/pkg-info.mk
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
)
19 ARCH ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_CPU
)
22 destdir
:= $(CURDIR
)/debian
/$(PACKAGE
)
26 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
32 config.status
: configure
34 # Add here commands to configure the package.
36 # guest-agent is only required for guest systems
38 --docdir
=/usr
/share
/doc
/pve-qemu-kvm \
39 --localstatedir
=/var \
42 --target-list
=$(ARCH
)-softmmu
,aarch64-softmmu \
43 --with-confsuffix
="/kvm" \
44 --with-pkgversion
="${DEB_SOURCE}_${DEB_VERSION_UPSTREAM}" \
45 --audio-drv-list
="alsa" \
46 --datadir=/usr
/share \
49 --disable-guest-agent \
50 --disable-guest-agent-msi \
75 build-stamp
: config.status
78 # Add here commands to compile the package.
81 #docbook-to-man debian/kvm.sgml > kvm.1
90 # Add here commands to clean up after the build process.
92 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
93 cp
-f
/usr
/share
/misc
/config.sub config.sub
95 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
96 cp
-f
/usr
/share
/misc
/config.guess config.guess
109 # Add here commands to install the package into debian/pve-kvm.
110 $(MAKE
) DESTDIR
=$(destdir
) install
112 # we do not need openbios files (sparc/ppc)
113 rm -rf
$(destdir
)/usr
/share
/kvm
/openbios-
*
115 rm $(destdir
)/usr
/share
/kvm
/*.dtb
116 rm $(destdir
)/usr
/share
/kvm
/ppc_rom.bin
117 rm $(destdir
)/usr
/share
/kvm
/s390-ccw.img
118 rm $(destdir
)/usr
/share
/kvm
/s390-netboot.img
119 rm $(destdir
)/usr
/share
/kvm
/qemu_vga.ndrv
120 rm $(destdir
)/usr
/share
/kvm
/slof.bin
121 rm $(destdir
)/usr
/share
/kvm
/spapr-rtas.bin
122 rm $(destdir
)/usr
/share
/kvm
/u-boot.e500
124 rm $(destdir
)/usr
/share
/kvm
/palcode-clipper
126 # Remove things we don't package at all, would be a "kvm-dev" package
127 rm -Rf
$(destdir
)/usr
/include/linux
/
128 rm -Rf
$(destdir
)/usr
/include
129 rm -Rf
$(destdir
)/usr
/lib
*
131 # Build architecture-independent files here.
132 binary-indep
: build
install
133 # We have nothing to do by default.
135 # Build architecture-dependent files here.
136 binary-arch
: build
install
139 # exclude historic Changelog file, which stops at release 0.14
140 dh_installchangelogs
--exclude
=Changelog
146 # dh_installlogrotate
156 dh_strip
--dbg-package
=pve-qemu-kvm-dbg
162 # Debian >= Buster has libglusterfs0 and lots of libgfFOO, upstream has the libs in glusterfs-common
163 # pass -x to dpkg-shlibdeps and specify dependencies in d/control instead
164 dh_shlibdeps
-- -xlibglusterfs0
-xlibgfxdr0
-xlibgfrpc0
-xlibgfdb0
-xlibgfchangelog0
-xlibgfapi0
169 binary
: binary-indep binary-arch
170 .PHONY
: build
clean binary-indep binary-arch binary
install