]> git.proxmox.com Git - pve-qemu.git/blob - debian/rules
30868b0c60d221117ea68d38317898202dc293d7
[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 \
37 --docdir=/usr/share/doc/pve-qemu-kvm \
38 --localstatedir=/var \
39 --prefix=/usr \
40 --sysconfdir=/etc \
41 --target-list=$(ARCH)-softmmu,aarch64-softmmu \
42 --with-confsuffix="/kvm" \
43 --audio-drv-list="alsa" \
44 --datadir=/usr/share \
45 --disable-capstone \
46 --disable-gtk \
47 --disable-guest-agent \
48 --disable-guest-agent-msi \
49 --disable-libnfs \
50 --disable-libxml2 \
51 --disable-sdl \
52 --disable-smartcard \
53 --disable-strip \
54 --disable-xen \
55 --enable-curl \
56 --enable-docs \
57 --enable-glusterfs \
58 --enable-gnutls \
59 --enable-jemalloc \
60 --enable-libiscsi \
61 --enable-libusb \
62 --enable-linux-aio \
63 --enable-numa \
64 --enable-rbd \
65 --enable-seccomp \
66 --enable-spice \
67 --enable-usb-redir \
68 --enable-virtfs \
69 --enable-xfsctl
70
71 build: build-stamp
72
73 build-stamp: config.status
74 dh_testdir
75
76 # Add here commands to compile the package.
77 $(MAKE)
78
79 #docbook-to-man debian/kvm.sgml > kvm.1
80
81 touch $@
82
83 clean:
84 dh_testdir
85 dh_testroot
86 rm -f build-stamp
87
88 # Add here commands to clean up after the build process.
89 -$(MAKE) distclean
90 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
91 cp -f /usr/share/misc/config.sub config.sub
92 endif
93 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
94 cp -f /usr/share/misc/config.guess config.guess
95 endif
96
97
98 dh_clean
99
100 install: build
101 dh_testdir
102 dh_testroot
103 dh_prep
104 dh_installdirs
105 dh_lintian
106
107 # Add here commands to install the package into debian/pve-kvm.
108 $(MAKE) DESTDIR=$(destdir) install
109
110 # we do not need openbios files (sparc/ppc)
111 rm -rf $(destdir)/usr/share/kvm/openbios-*
112 # remove ppc files
113 rm $(destdir)/usr/share/kvm/*.dtb
114 rm $(destdir)/usr/share/kvm/ppc_rom.bin
115 rm $(destdir)/usr/share/kvm/s390-ccw.img
116 rm $(destdir)/usr/share/kvm/s390-netboot.img
117 rm $(destdir)/usr/share/kvm/qemu_vga.ndrv
118 rm $(destdir)/usr/share/kvm/slof.bin
119 rm $(destdir)/usr/share/kvm/spapr-rtas.bin
120 rm $(destdir)/usr/share/kvm/u-boot.e500
121 # remove Aplha files
122 rm $(destdir)/usr/share/kvm/palcode-clipper
123
124 # Remove things we don't package at all, would be a "kvm-dev" package
125 rm -Rf $(destdir)/usr/include/linux/
126 rm -Rf $(destdir)/usr/include
127 rm -Rf $(destdir)/usr/lib*
128
129 # Build architecture-independent files here.
130 binary-indep: build install
131 # We have nothing to do by default.
132
133 # Build architecture-dependent files here.
134 binary-arch: build install
135 dh_testdir
136 dh_testroot
137 # exclude historic Changelog file, which stops at release 0.14
138 dh_installchangelogs --exclude=Changelog
139 dh_installdocs
140 dh_installexamples
141 dh_install
142 # dh_installmenu
143 # dh_installdebconf
144 # dh_installlogrotate
145 # dh_installemacsen
146 # dh_installpam
147 # dh_installmime
148 # dh_python
149 # dh_installinit
150 # dh_installcron
151 # dh_installinfo
152 dh_installman
153 dh_link
154 dh_strip --dbg-package=pve-qemu-kvm-dbg
155 dh_compress
156 dh_fixperms
157 # dh_perl
158 # dh_makeshlibs
159 dh_installdeb
160 dh_shlibdeps
161 dh_gencontrol
162 dh_md5sums
163 dh_builddeb
164
165 binary: binary-indep binary-arch
166 .PHONY: build clean binary-indep binary-arch binary install