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