]>
Commit | Line | Data |
---|---|---|
95259824 WB |
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 | ||
a544966d WB |
18 | ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) |
19 | ||
95259824 WB |
20 | PACKAGE=pve-qemu-kvm |
21 | destdir := $(CURDIR)/debian/$(PACKAGE) | |
22 | ||
95259824 WB |
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. | |
a21f5778 EK |
34 | |
35 | # guest-agent is only required for guest systems | |
964a487a | 36 | ./configure \ |
2fb093cf | 37 | --docdir=/usr/share/doc/pve-qemu-kvm \ |
964a487a TL |
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 \ | |
edf1ab9a | 45 | --disable-capstone \ |
964a487a TL |
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 \ | |
73e12bd7 | 62 | --enable-seccomp \ |
964a487a TL |
63 | --enable-spice \ |
64 | --enable-usb-redir \ | |
65 | --enable-virtfs \ | |
66 | --enable-xfsctl | |
95259824 | 67 | |
8e326f30 | 68 | build: build-stamp |
95259824 WB |
69 | |
70 | build-stamp: config.status | |
71 | dh_testdir | |
72 | ||
73 | # Add here commands to compile the package. | |
74 | $(MAKE) | |
75 | ||
76 | #docbook-to-man debian/kvm.sgml > kvm.1 | |
77 | ||
78 | touch $@ | |
79 | ||
8e326f30 | 80 | clean: |
95259824 WB |
81 | dh_testdir |
82 | dh_testroot | |
83 | rm -f build-stamp | |
84 | ||
85 | # Add here commands to clean up after the build process. | |
86 | -$(MAKE) distclean | |
87 | ifneq "$(wildcard /usr/share/misc/config.sub)" "" | |
88 | cp -f /usr/share/misc/config.sub config.sub | |
89 | endif | |
90 | ifneq "$(wildcard /usr/share/misc/config.guess)" "" | |
91 | cp -f /usr/share/misc/config.guess config.guess | |
92 | endif | |
93 | ||
94 | ||
95 | dh_clean | |
96 | ||
97 | install: build | |
98 | dh_testdir | |
99 | dh_testroot | |
68ba098a | 100 | dh_prep |
95259824 | 101 | dh_installdirs |
7df330a9 | 102 | dh_lintian |
95259824 WB |
103 | |
104 | # Add here commands to install the package into debian/pve-kvm. | |
105 | $(MAKE) DESTDIR=$(destdir) install | |
106 | ||
95259824 WB |
107 | # we do not need openbios files (sparc/ppc) |
108 | rm -rf $(destdir)/usr/share/kvm/openbios-* | |
109 | # remove ppc files | |
110 | rm $(destdir)/usr/share/kvm/*.dtb | |
111 | rm $(destdir)/usr/share/kvm/ppc_rom.bin | |
112 | rm $(destdir)/usr/share/kvm/s390-ccw.img | |
8fefb882 TL |
113 | rm $(destdir)/usr/share/kvm/s390-netboot.img |
114 | rm $(destdir)/usr/share/kvm/qemu_vga.ndrv | |
95259824 WB |
115 | rm $(destdir)/usr/share/kvm/slof.bin |
116 | rm $(destdir)/usr/share/kvm/spapr-rtas.bin | |
117 | rm $(destdir)/usr/share/kvm/u-boot.e500 | |
118 | # remove Aplha files | |
119 | rm $(destdir)/usr/share/kvm/palcode-clipper | |
120 | ||
95259824 WB |
121 | # Remove things we don't package at all, would be a "kvm-dev" package |
122 | rm -Rf $(destdir)/usr/include/linux/ | |
123 | rm -Rf $(destdir)/usr/include | |
124 | rm -Rf $(destdir)/usr/lib* | |
125 | ||
126 | # Build architecture-independent files here. | |
127 | binary-indep: build install | |
128 | # We have nothing to do by default. | |
129 | ||
130 | # Build architecture-dependent files here. | |
131 | binary-arch: build install | |
132 | dh_testdir | |
133 | dh_testroot | |
2c2626dd EK |
134 | # exclude historic Changelog file, which stops at release 0.14 |
135 | dh_installchangelogs --exclude=Changelog | |
95259824 WB |
136 | dh_installdocs |
137 | dh_installexamples | |
fd202a5a | 138 | dh_install |
95259824 WB |
139 | # dh_installmenu |
140 | # dh_installdebconf | |
141 | # dh_installlogrotate | |
142 | # dh_installemacsen | |
143 | # dh_installpam | |
144 | # dh_installmime | |
145 | # dh_python | |
146 | # dh_installinit | |
147 | # dh_installcron | |
148 | # dh_installinfo | |
149 | dh_installman | |
150 | dh_link | |
151 | dh_strip --dbg-package=pve-qemu-kvm-dbg | |
152 | dh_compress | |
153 | dh_fixperms | |
154 | # dh_perl | |
155 | # dh_makeshlibs | |
156 | dh_installdeb | |
157 | dh_shlibdeps | |
158 | dh_gencontrol | |
159 | dh_md5sums | |
160 | dh_builddeb | |
161 | ||
162 | binary: binary-indep binary-arch | |
163 | .PHONY: build clean binary-indep binary-arch binary install |