]>
Commit | Line | Data |
---|---|---|
f76a2828 DM |
1 | PACKAGE=pve-container |
2 | ||
3 | PREFIX=${DESTDIR}/usr | |
4 | BINDIR=${PREFIX}/bin | |
1e1fad99 | 5 | LIBDIR=${PREFIX}/lib |
500ebd9a | 6 | SBINDIR=${PREFIX}/sbin |
f76a2828 DM |
7 | MANDIR=${PREFIX}/share/man |
8 | DOCDIR=${PREFIX}/share/doc/${PACKAGE} | |
bf9f492f DM |
9 | LXC_SCRIPT_DIR=${PREFIX}/share/lxc |
10 | LXC_TMPL_DIR=${LXC_SCRIPT_DIR}/templates | |
11 | LXC_HOOK_DIR=${LXC_SCRIPT_DIR}/hooks | |
059f7bb4 WB |
12 | LXC_CONFIG_DIR=${LXC_SCRIPT_DIR}/config |
13 | LXC_COMMON_CONFIG_DIR=${LXC_CONFIG_DIR}/common.conf.d | |
4776d83a | 14 | LXC_USERNS_CONFIG_DIR=${LXC_CONFIG_DIR}/userns.conf.d |
bb453632 | 15 | SERVICEDIR=${DESTDIR}/lib/systemd/system |
f76a2828 DM |
16 | PODDIR=${DOCDIR}/pod |
17 | MAN1DIR=${MANDIR}/man1/ | |
81bee809 | 18 | MAN5DIR=${MANDIR}/man5/ |
68e8f3c5 | 19 | BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/ |
fdb24446 | 20 | ZSHCOMPLDIR=${PREFIX}/share/zsh/vendor-completions/ |
f76a2828 DM |
21 | export PERLDIR=${PREFIX}/share/perl5 |
22 | ||
5bdebcfa DM |
23 | # this require package pve-doc-generator |
24 | export NOVIEW=1 | |
25 | include /usr/share/pve-doc-generator/pve-doc-generator.mk | |
81bee809 | 26 | |
5bdebcfa | 27 | all: |
f76a2828 | 28 | |
068adb4e | 29 | pct.bash-completion: |
6c2e9377 | 30 | PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->generate_bash_completions();" >$@.tmp |
dc2ba725 | 31 | mv $@.tmp $@ |
068adb4e | 32 | |
fdb24446 CE |
33 | pct.zsh-completion: |
34 | PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->generate_zsh_completions();" >$@.tmp | |
35 | mv $@.tmp $@ | |
36 | ||
a9333515 FG |
37 | .PHONY: check |
38 | check: test | |
39 | make -C test | |
40 | ||
f76a2828 | 41 | .PHONY: install |
cc9967d2 TL |
42 | install: pct lxc-pve.conf pct.1 pct.conf.5 pct.bash-completion pct.zsh-completion \ |
43 | pve-userns.seccomp pve-container@.service pve-container-debug@.service \ | |
44 | lxc-pve-prestart-hook lxc-pve-autodev-hook lxc-pve-poststop-hook lxcnetaddbr | |
6c2e9377 | 45 | PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->verify_api();" |
500ebd9a WB |
46 | install -d ${SBINDIR} |
47 | install -m 0755 pct ${SBINDIR} | |
bf9f492f DM |
48 | install -d ${LXC_SCRIPT_DIR} |
49 | install -m 0755 lxcnetaddbr ${LXC_SCRIPT_DIR} | |
395139e2 | 50 | install -m 0755 pve-container-stop-wrapper ${LXC_SCRIPT_DIR} |
e4072072 | 51 | install -d -m0755 ${SERVICEDIR} |
395139e2 | 52 | install -m0644 pve-container@.service ${SERVICEDIR}/ |
cc9967d2 | 53 | install -m0644 pve-container-debug@.service ${SERVICEDIR}/ |
395139e2 | 54 | install -m0644 'system-pve\x2dcontainer.slice' ${SERVICEDIR}/ |
bf9f492f | 55 | install -d ${LXC_HOOK_DIR} |
deaf7667 | 56 | install -m 0755 lxc-pve-prestart-hook ${LXC_HOOK_DIR} |
50df544c | 57 | install -m 0755 lxc-pve-autodev-hook ${LXC_HOOK_DIR} |
32e6d659 | 58 | install -m 0755 lxc-pve-poststop-hook ${LXC_HOOK_DIR} |
059f7bb4 WB |
59 | install -d ${LXC_CONFIG_DIR} |
60 | install -m 0644 pve-userns.seccomp ${LXC_CONFIG_DIR}/pve-userns.seccomp | |
bf9f492f DM |
61 | install -d ${LXC_COMMON_CONFIG_DIR} |
62 | install -m 0644 lxc-pve.conf ${LXC_COMMON_CONFIG_DIR}/01-pve.conf | |
4776d83a WB |
63 | install -d ${LXC_USERNS_CONFIG_DIR} |
64 | install -m 0644 lxc-pve-userns.conf ${LXC_USERNS_CONFIG_DIR}/01-pve.conf | |
68e8f3c5 | 65 | install -m 0644 -D pct.bash-completion ${BASHCOMPLDIR}/pct |
fdb24446 | 66 | install -m 0644 -D pct.zsh-completion ${ZSHCOMPLDIR}/_pct |
f76a2828 DM |
67 | make -C PVE install |
68 | install -d ${MAN1DIR} | |
81bee809 | 69 | install -d ${MAN5DIR} |
5bdebcfa DM |
70 | install -m 0644 pct.1 ${MAN1DIR} |
71 | gzip -9 ${MAN1DIR}/pct.1 | |
72 | install -m 0644 pct.conf.5 ${MAN5DIR} | |
73 | gzip -9 ${MAN5DIR}/pct.conf.5 | |
167db1d1 | 74 | cd ${MAN5DIR}; ln -s pct.conf.5.gz ct.conf.5.gz |
02209345 | 75 | install -D -m 0644 10-pve-ct-inotify-limits.conf ${LIBDIR}/sysctl.d/10-pve-ct-inotify-limits.conf |
f76a2828 | 76 | |
059f7bb4 WB |
77 | pve-userns.seccomp: /usr/share/lxc/config/common.seccomp |
78 | cp $< $@ | |
79 | echo 'keyctl errno 38' >> $@ | |
80 | ||
1e180f97 DM |
81 | .PHONY: test |
82 | test: | |
83 | make -C test test | |
84 | ||
f76a2828 DM |
85 | .PHONY: clean |
86 | clean: | |
1e180f97 | 87 | make -C test clean |
5bdebcfa | 88 | make cleanup-docgen |
b0873372 | 89 | rm -f *.1 *.5 *.tmp *.bash-completion *.bash-completion |
f76a2828 DM |
90 | |
91 | .PHONY: distclean | |
92 | distclean: clean | |
93 |