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