]> git.ipfire.org Git - ipfire-2.x.git/blob - lfs/qemu
qemu-ga: resolve conflict by using binary from qemu built
[ipfire-2.x.git] / lfs / qemu
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include Config
26
27 # If you update the version also qemu-ga !!!
28 VER = 6.1.0
29
30 THISAPP = qemu-$(VER)
31 DL_FILE = $(THISAPP).tar.xz
32 DL_FROM = $(URL_IPFIRE)
33 DIR_APP = $(DIR_SRC)/$(THISAPP)
34 TARGET = $(DIR_INFO)/$(THISAPP)
35 SUP_ARCH = x86_64
36 PROG = qemu
37 PAK_VER = 31
38
39 DEPS = libusbredir spice libseccomp
40
41 TARGETS = \
42 i386-linux-user \
43 x86_64-linux-user \
44 arm-linux-user \
45 riscv64-linux-user \
46 i386-softmmu \
47 x86_64-softmmu \
48 arm-softmmu \
49 riscv64-softmmu
50
51 ###############################################################################
52 # Top-level Rules
53 ###############################################################################
54
55 objects = $(DL_FILE)
56
57 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
58
59 $(DL_FILE)_MD5 = 47f776c276a24f42108ba512a2aa3013
60
61 install : $(TARGET)
62
63 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
64
65 download :$(patsubst %,$(DIR_DL)/%,$(objects))
66
67 md5 : $(subst %,%_MD5,$(objects))
68
69 dist:
70 @$(PAK)
71
72 ###############################################################################
73 # Downloading, checking, md5sum
74 ###############################################################################
75
76 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
77 @$(CHECK)
78
79 $(patsubst %,$(DIR_DL)/%,$(objects)) :
80 @$(LOAD)
81
82 $(subst %,%_MD5,$(objects)) :
83 @$(MD5)
84
85 ###############################################################################
86 # Installation Details
87 ###############################################################################
88
89 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
90 @$(PREBUILD)
91 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
92 cd $(DIR_APP) && ./configure \
93 --prefix=/usr \
94 --sysconfdir=/etc \
95 --localstatedir=/var \
96 --enable-kvm \
97 --disable-attr \
98 --target-list="$(TARGETS)" \
99 --extra-cflags="$(CFLAGS)" \
100 --enable-spice \
101 --enable-usb-redir \
102 --enable-seccomp \
103 --disable-docs \
104 --disable-sdl
105
106 cd $(DIR_APP) && make $(MAKETUNING)
107 cd $(DIR_APP) && make install
108
109 # install wrapper for old kvm parameter handling
110 install -m 755 $(DIR_SRC)/config/qemu/qemu /usr/bin/qemu
111
112 # install an udev script to set the permissions of /dev/kvm
113 cp -avf $(DIR_SRC)/config/qemu/65-kvm.rules /lib/udev/rules.d/65-kvm.rules
114
115 @rm -rf $(DIR_APP)
116 @$(POSTBUILD)