]> git.proxmox.com Git - pve-container.git/blob - src/Makefile
fix #3140: allow iface suffix on link local dns address
[pve-container.git] / src / Makefile
1 PACKAGE=pve-container
2
3 PREFIX=${DESTDIR}/usr
4 BINDIR=${PREFIX}/bin
5 LIBDIR=${PREFIX}/lib
6 SBINDIR=${PREFIX}/sbin
7 MANDIR=${PREFIX}/share/man
8 DOCDIR=${PREFIX}/share/doc/${PACKAGE}
9 LXC_SCRIPT_DIR=${PREFIX}/share/lxc
10 LXC_TMPL_DIR=${LXC_SCRIPT_DIR}/templates
11 LXC_HOOK_DIR=${LXC_SCRIPT_DIR}/hooks
12 LXC_CONFIG_DIR=${LXC_SCRIPT_DIR}/config
13 LXC_COMMON_CONFIG_DIR=${LXC_CONFIG_DIR}/common.conf.d
14 SERVICEDIR=${DESTDIR}/lib/systemd/system
15 PODDIR=${DOCDIR}/pod
16 MAN1DIR=${MANDIR}/man1/
17 MAN5DIR=${MANDIR}/man5/
18 BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
19 ZSHCOMPLDIR=${PREFIX}/share/zsh/vendor-completions/
20 export PERLDIR=${PREFIX}/share/perl5
21
22 # this require package pve-doc-generator
23 export NOVIEW=1
24 include /usr/share/pve-doc-generator/pve-doc-generator.mk
25
26 all:
27
28 pct.bash-completion:
29 PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->generate_bash_completions();" >$@.tmp
30 mv $@.tmp $@
31
32 pct.zsh-completion:
33 PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->generate_zsh_completions();" >$@.tmp
34 mv $@.tmp $@
35
36 .PHONY: check
37 check: test
38 make -C test
39
40 .PHONY: install
41 install: pct lxc-pve.conf pct.1 pct.conf.5 pct.bash-completion pct.zsh-completion \
42 pve-userns.seccomp pve-container@.service pve-container-debug@.service \
43 lxc-pve-prestart-hook lxc-pve-autodev-hook lxc-pve-poststop-hook lxcnetaddbr
44 PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->verify_api();"
45 install -d ${SBINDIR}
46 install -m 0755 pct ${SBINDIR}
47 install -d ${LXC_SCRIPT_DIR}
48 install -m 0755 lxcnetaddbr ${LXC_SCRIPT_DIR}
49 install -m 0755 pve-container-stop-wrapper ${LXC_SCRIPT_DIR}
50 install -d -m0755 ${SERVICEDIR}
51 install -m0644 pve-container@.service ${SERVICEDIR}/
52 install -m0644 pve-container-debug@.service ${SERVICEDIR}/
53 install -m0644 'system-pve\x2dcontainer.slice' ${SERVICEDIR}/
54 install -d ${LXC_HOOK_DIR}
55 install -m 0755 lxc-pve-prestart-hook ${LXC_HOOK_DIR}
56 install -m 0755 lxc-pve-autodev-hook ${LXC_HOOK_DIR}
57 install -m 0755 lxc-pve-poststop-hook ${LXC_HOOK_DIR}
58 install -d ${LXC_CONFIG_DIR}
59 install -m 0644 pve-userns.seccomp ${LXC_CONFIG_DIR}/pve-userns.seccomp
60 install -d ${LXC_COMMON_CONFIG_DIR}
61 install -m 0644 lxc-pve.conf ${LXC_COMMON_CONFIG_DIR}/01-pve.conf
62 install -m 0644 -D pct.bash-completion ${BASHCOMPLDIR}/pct
63 install -m 0644 -D pct.zsh-completion ${ZSHCOMPLDIR}/_pct
64 make -C PVE install
65 install -d ${MAN1DIR}
66 install -d ${MAN5DIR}
67 install -m 0644 pct.1 ${MAN1DIR}
68 gzip -9 ${MAN1DIR}/pct.1
69 install -m 0644 pct.conf.5 ${MAN5DIR}
70 gzip -9 ${MAN5DIR}/pct.conf.5
71 cd ${MAN5DIR}; ln -s pct.conf.5.gz ct.conf.5.gz
72 install -D -m 0644 10-pve-ct-inotify-limits.conf ${LIBDIR}/sysctl.d/10-pve-ct-inotify-limits.conf
73
74 pve-userns.seccomp: /usr/share/lxc/config/common.seccomp
75 cp $< $@
76 echo 'keyctl errno 38' >> $@
77
78 .PHONY: test
79 test:
80 make -C test test
81
82 .PHONY: clean
83 clean:
84 make -C test clean
85 make cleanup-docgen
86 rm -rf *.1 *.5 *.tmp *.bash-completion
87 rm -rf *.1 *.5 *.tmp *.zsh-completion
88 find . -name '*~' -exec rm {} ';'
89
90 .PHONY: distclean
91 distclean: clean
92