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