]> git.proxmox.com Git - pve-qemu.git/blob - debian/rules
fix #1420: fix stop mode backup with virtio-blk
[pve-qemu.git] / debian / rules
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
12
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)
17
18 ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
19
20 PACKAGE=pve-qemu-kvm
21 destdir := $(CURDIR)/debian/$(PACKAGE)
22
23 ifneq "$(wildcard /usr/share/quilt/quilt.make)" ""
24 include /usr/share/quilt/quilt.make
25 endif
26
27 CFLAGS = -Wall
28
29 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
30 CFLAGS += -O0
31 else
32 CFLAGS += -O2
33 endif
34
35 config.status: configure
36 dh_testdir
37 # Add here commands to configure the package.
38
39 # guest-agent is only required for guest systems
40 ./configure --with-confsuffix="/kvm" --target-list=$(ARCH)-softmmu \
41 --prefix=/usr --datadir=/usr/share \
42 --docdir=/usr/share/doc/pve-qemu-kvm \
43 --sysconfdir=/etc --localstatedir=/var --disable-xen --enable-gnutls \
44 --enable-sdl --enable-linux-aio --enable-rbd --enable-libiscsi \
45 --disable-smartcard --audio-drv-list="alsa" --enable-spice \
46 --enable-usb-redir --enable-glusterfs --enable-libusb --disable-gtk \
47 --enable-xfsctl --enable-numa --disable-strip --enable-jemalloc \
48 --enable-virtfs --disable-libnfs --disable-fdt \
49 --disable-guest-agent --disable-guest-agent-msi
50
51 build: patch build-stamp
52
53 build-stamp: config.status
54 dh_testdir
55
56 # Add here commands to compile the package.
57 $(MAKE)
58
59 #docbook-to-man debian/kvm.sgml > kvm.1
60
61 touch $@
62
63 clean: unpatch
64 dh_testdir
65 dh_testroot
66 rm -f build-stamp
67
68 # Add here commands to clean up after the build process.
69 -$(MAKE) distclean
70 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
71 cp -f /usr/share/misc/config.sub config.sub
72 endif
73 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
74 cp -f /usr/share/misc/config.guess config.guess
75 endif
76
77
78 dh_clean
79
80 install: build
81 dh_testdir
82 dh_testroot
83 dh_clean -k
84 dh_installdirs
85
86 # Add here commands to install the package into debian/pve-kvm.
87 $(MAKE) DESTDIR=$(destdir) install
88
89 mv $(destdir)/usr/bin/qemu-system-$(ARCH) $(destdir)/usr/bin/kvm
90 mv $(destdir)/usr/share/man/man1/qemu.1 $(destdir)/usr/share/man/man1/kvm.1
91
92 # Install the userspace utilities
93 install -s -m 0755 vma $(destdir)/usr/bin/
94
95 install -D -m 0755 $(CURDIR)/debian/kvm-ifup $(destdir)/etc/kvm/kvm-ifup
96 install -D -m 0755 $(CURDIR)/debian/kvm-ifdown $(destdir)/etc/kvm/kvm-ifdown
97
98 #install ovmf uefi rom
99 install -D -m 0644 $(CURDIR)/debian/OVMF_CODE-pure-efi.fd $(destdir)/usr/share/kvm/OVMF_CODE-pure-efi.fd
100 install -D -m 0644 $(CURDIR)/debian/OVMF_VARS-pure-efi.fd $(destdir)/usr/share/kvm/OVMF_VARS-pure-efi.fd
101
102 # we do not need openbios files (sparc/ppc)
103 rm -rf $(destdir)/usr/share/kvm/openbios-*
104 # remove ppc files
105 rm $(destdir)/usr/share/kvm/*.dtb
106 rm $(destdir)/usr/share/kvm/ppc_rom.bin
107 rm $(destdir)/usr/share/kvm/s390-ccw.img
108 rm $(destdir)/usr/share/kvm/slof.bin
109 rm $(destdir)/usr/share/kvm/spapr-rtas.bin
110 rm $(destdir)/usr/share/kvm/u-boot.e500
111 # remove Aplha files
112 rm $(destdir)/usr/share/kvm/palcode-clipper
113
114 # Remove things we don't package at all, would be a "kvm-dev" package
115 rm -Rf $(destdir)/usr/include/linux/
116 rm -Rf $(destdir)/usr/include
117 rm -Rf $(destdir)/usr/lib*
118
119 # Build architecture-independent files here.
120 binary-indep: build install
121 # We have nothing to do by default.
122
123 # Build architecture-dependent files here.
124 binary-arch: build install
125 dh_testdir
126 dh_testroot
127 dh_installchangelogs
128 dh_installdocs
129 dh_installexamples
130 # dh_install
131 # dh_installmenu
132 # dh_installdebconf
133 # dh_installlogrotate
134 # dh_installemacsen
135 # dh_installpam
136 # dh_installmime
137 # dh_python
138 # dh_installinit
139 # dh_installcron
140 # dh_installinfo
141 dh_installman
142 dh_link
143 dh_strip --dbg-package=pve-qemu-kvm-dbg
144 dh_compress
145 dh_fixperms
146 # dh_perl
147 # dh_makeshlibs
148 dh_installdeb
149 dh_shlibdeps
150 dh_gencontrol
151 dh_md5sums
152 dh_builddeb
153
154 binary: binary-indep binary-arch
155 .PHONY: build clean binary-indep binary-arch binary install