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
)
19 destdir
:= $(CURDIR
)/debian
/$(PACKAGE
)
21 ifneq "$(wildcard /usr/share/quilt/quilt.make)" ""
22 include /usr
/share
/quilt
/quilt.make
27 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
33 config.status
: configure
35 # Add here commands to configure the package.
36 .
/configure
--prefix=/usr
--datadir=/usr
/share
--docdir
=/usr
/share
/doc
/pve-qemu-kvm
--sysconfdir
=/etc
--disable-xen
--enable-vnc-tls
--enable-sdl
--enable-uuid
--enable-linux-aio
38 build
: patch build-stamp
40 build-stamp
: config.status
43 # Add here commands to compile the package.
46 #docbook-to-man debian/kvm.sgml > kvm.1
55 # Add here commands to clean up after the build process.
57 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
58 cp
-f
/usr
/share
/misc
/config.sub config.sub
60 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
61 cp
-f
/usr
/share
/misc
/config.guess config.guess
73 # Add here commands to install the package into debian/pve-kvm.
74 $(MAKE
) DESTDIR
=$(destdir
) install
76 mv
$(destdir
)/usr
/bin
/qemu-system-x86_64
$(destdir
)/usr
/bin
/kvm
77 mv
$(destdir
)/usr
/share
/man
/man1
/qemu
.1 $(destdir
)/usr
/share
/man
/man1
/kvm
.1
79 # Install the userspace utilities
80 install -m
0755 scripts
/kvm
/kvm_stat
$(destdir
)/usr
/bin
/
82 install -D
-m
0755 $(CURDIR
)/debian
/kvm-ifup
$(destdir
)/etc
/kvm
/kvm-ifup
83 install -D
-m
0755 $(CURDIR
)/debian
/kvm-ifdown
$(destdir
)/etc
/kvm
/kvm-ifdown
85 # do not install empty file (now in /usr/share/kvm/cpus-x86_64.conf)
86 rm $(destdir
)/etc
/kvm
/target-x86_64.conf
88 # we do not need openbios files (sparc/ppc)
89 rm -rf
$(destdir
)/usr
/share
/kvm
/openbios-
*
91 rm $(destdir
)/usr
/share
/kvm
/*.dtb
92 rm $(destdir
)/usr
/share
/kvm
/ppc_rom.bin
93 rm $(destdir
)/usr
/share
/kvm
/s390-zipl.rom
94 rm $(destdir
)/usr
/share
/kvm
/slof.bin
95 rm $(destdir
)/usr
/share
/kvm
/spapr-rtas.bin
97 rm $(destdir
)/usr
/share
/kvm
/palcode-clipper
99 # remove guest agent (that is only required for a guest)
100 rm $(destdir
)/usr
/bin
/qemu-ga
102 # Remove things we don't package at all, would be a "kvm-dev" package
103 rm -Rf
$(destdir
)/usr
/include/linux
/
104 rm -Rf
$(destdir
)/usr
/include
105 rm -Rf
$(destdir
)/usr
/lib
*
107 # Build architecture-independent files here.
108 binary-indep
: build
install
109 # We have nothing to do by default.
111 # Build architecture-dependent files here.
112 binary-arch
: build
install
121 # dh_installlogrotate
142 binary
: binary-indep binary-arch
143 .PHONY
: build
clean binary-indep binary-arch binary
install