]> git.proxmox.com Git - pve-qemu-kvm.git/blame - debian/rules
update to upstream 1.0
[pve-qemu-kvm.git] / debian / rules
CommitLineData
4676c0af
DM
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
18PACKAGE=pve-qemu-kvm
19destdir := $(CURDIR)/debian/$(PACKAGE)
20
21ifneq "$(wildcard /usr/share/quilt/quilt.make)" ""
22include /usr/share/quilt/quilt.make
23endif
24
25CFLAGS = -Wall
26
27ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
28 CFLAGS += -O0
29else
30 CFLAGS += -O2
31endif
32
33config.status: configure
34 dh_testdir
35 # Add here commands to configure the package.
36 ./configure --prefix=/usr --datadir=/usr/share/kvm --docdir=/usr/share/doc/pve-qemu-kvm --sysconfdir=/etc --disable-xen --enable-vnc-tls --enable-sdl --enable-uuid --enable-linux-aio
37
38build: patch build-stamp
39
40build-stamp: config.status
41 dh_testdir
42
43 # Add here commands to compile the package.
44 $(MAKE) V=1
45
46 #docbook-to-man debian/kvm.sgml > kvm.1
47
48 touch $@
49
50clean: unpatch
51 dh_testdir
52 dh_testroot
53 rm -f build-stamp
54
55 # Add here commands to clean up after the build process.
56 -$(MAKE) distclean
57ifneq "$(wildcard /usr/share/misc/config.sub)" ""
58 cp -f /usr/share/misc/config.sub config.sub
59endif
60ifneq "$(wildcard /usr/share/misc/config.guess)" ""
61 cp -f /usr/share/misc/config.guess config.guess
62endif
63
64
65 dh_clean
66
67install: build
68 dh_testdir
69 dh_testroot
70 dh_clean -k
71 dh_installdirs
72
73 # Add here commands to install the package into debian/pve-kvm.
74 $(MAKE) DESTDIR=$(destdir) install
75
76 mv $(destdir)/usr/bin/qemu-system-x86_64 $(destdir)/usr/bin/kvm
77 mv $(destdir)/usr/share/man/man1/qemu.1 $(destdir)/usr/share/man/man1/kvm.1
78
79 # Install the userspace utilities
80 install -m 0755 kvm/kvm_stat $(destdir)/usr/bin/
81
82 install -D -m 0755 $(CURDIR)/debian/kvm-ifup $(destdir)/etc/kvm/kvm-ifup
83 install -D -m 0755 $(CURDIR)/debian/kvm-ifdown $(destdir)/etc/kvm/kvm-ifdown
84 # we do not need openbios files (sparc/ppc)
85 rm -rf $(destdir)/usr/share/kvm/openbios-*
86 # remove ppc files
87 rm $(destdir)/usr/share/kvm/*.dtb
88 rm $(destdir)/usr/share/kvm/ppc_rom.bin
89 rm $(destdir)/usr/share/kvm/s390-zipl.rom
90 rm $(destdir)/usr/share/kvm/slof.bin
91 rm $(destdir)/usr/share/kvm/spapr-rtas.bin
92
93 # remove guest agent (that is only required for a guest)
94 rm $(destdir)/usr/bin/qemu-ga
95
96 # Remove things we don't package at all, would be a "kvm-dev" package
97 rm -Rf $(destdir)/usr/include/linux/
98 rm -Rf $(destdir)/usr/include
99 rm -Rf $(destdir)/usr/lib*
100
101# Build architecture-independent files here.
102binary-indep: build install
103# We have nothing to do by default.
104
105# Build architecture-dependent files here.
106binary-arch: build install
107 dh_testdir
108 dh_testroot
109 dh_installchangelogs
110 dh_installdocs
111 dh_installexamples
112# dh_install
113# dh_installmenu
114# dh_installdebconf
115# dh_installlogrotate
116# dh_installemacsen
117# dh_installpam
118# dh_installmime
119# dh_python
120# dh_installinit
121# dh_installcron
122# dh_installinfo
123 dh_installman
124 dh_link
125 dh_strip
126 dh_compress
127 dh_fixperms
128# dh_perl
129# dh_makeshlibs
130 dh_installdeb
131 dh_shlibdeps
132 dh_gencontrol
133 dh_md5sums
134 dh_builddeb
135
136binary: binary-indep binary-arch
137.PHONY: build clean binary-indep binary-arch binary install