]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/libvirt
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / lfs / libvirt
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2023 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 SUMMARY = Server side daemon and supporting files for libvirt
28
29 VER = 8.10.0
30
31 THISAPP = libvirt-$(VER)
32 DL_FILE = $(THISAPP).tar.xz
33 DL_FROM = $(URL_IPFIRE)
34 DIR_APP = $(DIR_SRC)/$(THISAPP)
35 TARGET = $(DIR_INFO)/$(THISAPP)
36 SUP_ARCH = x86_64 aarch64
37 PROG = libvirt
38 PAK_VER = 33
39
40 DEPS = ebtables libpciaccess libyajl ncat qemu
41
42 SERVICES = libvirtd virtlogd
43
44 ###############################################################################
45 # Top-level Rules
46 ###############################################################################
47
48 objects = $(DL_FILE)
49
50 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
51
52 $(DL_FILE)_BLAKE2 = 6c99428dd74ae1e535d0918bb48da0a851b03e9dfc38f96fca060a33b6be6c23c8b4a789695e8cf930536c156c8a893e18753a58c8a827f464b83a61b47c4846
53
54 install : $(TARGET)
55 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
56
57 download :$(patsubst %,$(DIR_DL)/%,$(objects))
58
59 b2 : $(subst %,%_BLAKE2,$(objects))
60
61 dist:
62 $(PAK)
63
64 ###############################################################################
65 # Downloading, checking, b2sum
66 ###############################################################################
67
68 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
69 @$(CHECK)
70
71 $(patsubst %,$(DIR_DL)/%,$(objects)) :
72 @$(LOAD)
73
74 $(subst %,%_BLAKE2,$(objects)) :
75 @$(B2SUM)
76
77 ###############################################################################
78 # Installation Details
79 ###############################################################################
80
81 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
82 @$(PREBUILD)
83 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar Jxf $(DIR_DL)/$(DL_FILE)
84
85 cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/libvirt/0001-Change-default-behavior-of-libvirt-guests.sh-for-IPF.patch
86
87 cd $(DIR_APP) && meson \
88 --prefix=/usr \
89 --localstatedir=/var \
90 --sysconfdir=/etc \
91 -D docs=disabled \
92 -D sasl=disabled \
93 -D driver_vbox=disabled \
94 -D driver_lxc=disabled \
95 -D driver_esx=disabled \
96 -D driver_vmware=disabled \
97 -D driver_openvz=disabled \
98 -D firewalld=disabled \
99 -D driver_network=disabled \
100 -D driver_interface=enabled \
101 -D wireshark_dissector=disabled \
102 -D nls=disabled \
103 -D tests=disabled \
104 -D qemu_user=nobody \
105 -D qemu_group=kvm \
106 -D storage_dir=enabled \
107 -D storage_fs=enabled \
108 -D storage_lvm=enabled \
109 -D storage_iscsi=disabled \
110 -D storage_scsi=disabled \
111 -D storage_mpath=disabled \
112 -D storage_disk=disabled \
113 -D storage_rbd=disabled \
114 -D storage_gluster=disabled \
115 -D storage_zfs=disabled \
116 builddir/
117 cd $(DIR_APP) && ninja -C builddir/ $(MAKETUNING) $(EXTRA_MAKE)
118 cd $(DIR_APP) && ninja -C builddir/ install
119
120 #install initscripts
121 @$(call INSTALL_INITSCRIPTS,$(SERVICES))
122 mv /usr/libexec/libvirt-guests.sh /etc/rc.d/init.d/libvirt-guests
123
124 # Backup
125 install -v -m 644 $(DIR_SRC)/config/backup/includes/libvirt /var/ipfire/backup/addons/includes/libvirt
126
127 # Install libvirtd.conf
128 cp -fv $(DIR_SRC)/config/libvirt/libvirtd.conf /etc/libvirt
129 @rm -rf $(DIR_APP)
130 @$(POSTBUILD)