]> git.proxmox.com Git - pve-qemu.git/blob - debian/rules
620ba81ad7637cce0069aaceb36bb9900bceb619
[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 CFLAGS = -Wall
24
25 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26 CFLAGS += -O0
27 else
28 CFLAGS += -O2
29 endif
30
31 config.status: configure
32 dh_testdir
33 # Add here commands to configure the package.
34
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
46
47 build: build-stamp
48
49 build-stamp: config.status
50 dh_testdir
51
52 # Add here commands to compile the package.
53 $(MAKE)
54
55 #docbook-to-man debian/kvm.sgml > kvm.1
56
57 touch $@
58
59 clean:
60 dh_testdir
61 dh_testroot
62 rm -f build-stamp
63
64 # Add here commands to clean up after the build process.
65 -$(MAKE) distclean
66 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
67 cp -f /usr/share/misc/config.sub config.sub
68 endif
69 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
70 cp -f /usr/share/misc/config.guess config.guess
71 endif
72
73
74 dh_clean
75
76 install: build
77 dh_testdir
78 dh_testroot
79 dh_prep
80 dh_installdirs
81
82 # Add here commands to install the package into debian/pve-kvm.
83 $(MAKE) DESTDIR=$(destdir) install
84
85 # we do not need openbios files (sparc/ppc)
86 rm -rf $(destdir)/usr/share/kvm/openbios-*
87 # remove ppc files
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
96 # remove Aplha files
97 rm $(destdir)/usr/share/kvm/palcode-clipper
98
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*
103
104 # Build architecture-independent files here.
105 binary-indep: build install
106 # We have nothing to do by default.
107
108 # Build architecture-dependent files here.
109 binary-arch: build install
110 dh_testdir
111 dh_testroot
112 # exclude historic Changelog file, which stops at release 0.14
113 dh_installchangelogs --exclude=Changelog
114 dh_installdocs
115 dh_installexamples
116 dh_install
117 # dh_installmenu
118 # dh_installdebconf
119 # dh_installlogrotate
120 # dh_installemacsen
121 # dh_installpam
122 # dh_installmime
123 # dh_python
124 # dh_installinit
125 # dh_installcron
126 # dh_installinfo
127 dh_installman
128 dh_link
129 dh_strip --dbg-package=pve-qemu-kvm-dbg
130 dh_compress
131 dh_fixperms
132 # dh_perl
133 # dh_makeshlibs
134 dh_installdeb
135 dh_shlibdeps
136 dh_gencontrol
137 dh_md5sums
138 dh_builddeb
139
140 binary: binary-indep binary-arch
141 .PHONY: build clean binary-indep binary-arch binary install