]> git.proxmox.com Git - pve-qemu.git/blame - debian/rules
Install userspace utilities and UEFI roms via dh_install
[pve-qemu.git] / debian / rules
CommitLineData
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)
15DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
16DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
17
a544966d
WB
18ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
19
95259824
WB
20PACKAGE=pve-qemu-kvm
21destdir := $(CURDIR)/debian/$(PACKAGE)
22
23ifneq "$(wildcard /usr/share/quilt/quilt.make)" ""
24include /usr/share/quilt/quilt.make
25endif
26
27CFLAGS = -Wall
28
29ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
30 CFLAGS += -O0
31else
32 CFLAGS += -O2
33endif
34
35config.status: configure
36 dh_testdir
37 # Add here commands to configure the package.
a21f5778
EK
38
39 # guest-agent is only required for guest systems
2fb093cf
EK
40 ./configure --with-confsuffix="/kvm" --target-list=$(ARCH)-softmmu \
41 --prefix=/usr --datadir=/usr/share \
42 --docdir=/usr/share/doc/pve-qemu-kvm \
43 --sysconfdir=/etc --localstatedir=/var --disable-xen --enable-gnutls \
44 --enable-sdl --enable-linux-aio --enable-rbd --enable-libiscsi \
45 --disable-smartcard --audio-drv-list="alsa" --enable-spice \
46 --enable-usb-redir --enable-glusterfs --enable-libusb --disable-gtk \
47 --enable-xfsctl --enable-numa --disable-strip --enable-jemalloc \
a21f5778
EK
48 --enable-virtfs --disable-libnfs --disable-fdt \
49 --disable-guest-agent --disable-guest-agent-msi
95259824
WB
50
51build: patch build-stamp
52
53build-stamp: config.status
54 dh_testdir
55
56 # Add here commands to compile the package.
57 $(MAKE)
58
59 #docbook-to-man debian/kvm.sgml > kvm.1
60
61 touch $@
62
63clean: unpatch
64 dh_testdir
65 dh_testroot
66 rm -f build-stamp
67
68 # Add here commands to clean up after the build process.
69 -$(MAKE) distclean
70ifneq "$(wildcard /usr/share/misc/config.sub)" ""
71 cp -f /usr/share/misc/config.sub config.sub
72endif
73ifneq "$(wildcard /usr/share/misc/config.guess)" ""
74 cp -f /usr/share/misc/config.guess config.guess
75endif
76
77
78 dh_clean
79
80install: build
81 dh_testdir
82 dh_testroot
68ba098a 83 dh_prep
95259824
WB
84 dh_installdirs
85
86 # Add here commands to install the package into debian/pve-kvm.
87 $(MAKE) DESTDIR=$(destdir) install
88
a544966d 89 mv $(destdir)/usr/bin/qemu-system-$(ARCH) $(destdir)/usr/bin/kvm
95259824
WB
90 mv $(destdir)/usr/share/man/man1/qemu.1 $(destdir)/usr/share/man/man1/kvm.1
91
95259824
WB
92 # we do not need openbios files (sparc/ppc)
93 rm -rf $(destdir)/usr/share/kvm/openbios-*
94 # remove ppc files
95 rm $(destdir)/usr/share/kvm/*.dtb
96 rm $(destdir)/usr/share/kvm/ppc_rom.bin
97 rm $(destdir)/usr/share/kvm/s390-ccw.img
98 rm $(destdir)/usr/share/kvm/slof.bin
99 rm $(destdir)/usr/share/kvm/spapr-rtas.bin
100 rm $(destdir)/usr/share/kvm/u-boot.e500
101 # remove Aplha files
102 rm $(destdir)/usr/share/kvm/palcode-clipper
103
95259824
WB
104 # Remove things we don't package at all, would be a "kvm-dev" package
105 rm -Rf $(destdir)/usr/include/linux/
106 rm -Rf $(destdir)/usr/include
107 rm -Rf $(destdir)/usr/lib*
108
109# Build architecture-independent files here.
110binary-indep: build install
111# We have nothing to do by default.
112
113# Build architecture-dependent files here.
114binary-arch: build install
115 dh_testdir
116 dh_testroot
117 dh_installchangelogs
118 dh_installdocs
119 dh_installexamples
fd202a5a 120 dh_install
95259824
WB
121# dh_installmenu
122# dh_installdebconf
123# dh_installlogrotate
124# dh_installemacsen
125# dh_installpam
126# dh_installmime
127# dh_python
128# dh_installinit
129# dh_installcron
130# dh_installinfo
131 dh_installman
132 dh_link
133 dh_strip --dbg-package=pve-qemu-kvm-dbg
134 dh_compress
135 dh_fixperms
136# dh_perl
137# dh_makeshlibs
138 dh_installdeb
139 dh_shlibdeps
140 dh_gencontrol
141 dh_md5sums
142 dh_builddeb
143
144binary: binary-indep binary-arch
145.PHONY: build clean binary-indep binary-arch binary install