]>
Commit | Line | Data |
---|---|---|
f76a2828 DM |
1 | PACKAGE=pve-container |
2 | ||
3 | PREFIX=${DESTDIR}/usr | |
4 | BINDIR=${PREFIX}/bin | |
1e1fad99 | 5 | LIBDIR=${PREFIX}/lib |
f76a2828 DM |
6 | SBINDIR=${PREFIX}/sbin |
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 | |
12 | LXC_COMMON_CONFIG_DIR=${LXC_SCRIPT_DIR}/config/common.conf.d | |
bb453632 | 13 | SERVICEDIR=${DESTDIR}/lib/systemd/system |
f76a2828 DM |
14 | PODDIR=${DOCDIR}/pod |
15 | MAN1DIR=${MANDIR}/man1/ | |
81bee809 | 16 | MAN5DIR=${MANDIR}/man5/ |
68e8f3c5 | 17 | BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/ |
f76a2828 DM |
18 | export PERLDIR=${PREFIX}/share/perl5 |
19 | ||
5bdebcfa DM |
20 | # this require package pve-doc-generator |
21 | export NOVIEW=1 | |
22 | include /usr/share/pve-doc-generator/pve-doc-generator.mk | |
81bee809 | 23 | |
5bdebcfa | 24 | all: |
f76a2828 | 25 | |
068adb4e | 26 | pct.bash-completion: |
6c2e9377 | 27 | PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->generate_bash_completions();" >$@.tmp |
dc2ba725 | 28 | mv $@.tmp $@ |
068adb4e | 29 | |
a9333515 FG |
30 | .PHONY: check |
31 | check: test | |
32 | make -C test | |
33 | ||
f76a2828 | 34 | .PHONY: install |
5bdebcfa | 35 | install: pct lxc-pve.conf lxc-pve-prestart-hook lxc-pve-autodev-hook lxc-pve-poststop-hook lxcnetaddbr pct.1 pct.conf.5 pve-update-lxc-config pct.bash-completion |
6c2e9377 | 36 | PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->verify_api();" |
f76a2828 DM |
37 | install -d ${SBINDIR} |
38 | install -m 0755 pct ${SBINDIR} | |
4968d0f7 | 39 | install -m 0755 pve-update-lxc-config ${SBINDIR} |
bf9f492f DM |
40 | install -d ${LXC_SCRIPT_DIR} |
41 | install -m 0755 lxcnetaddbr ${LXC_SCRIPT_DIR} | |
1e1fad99 | 42 | install -m 0755 lxc-pve-reboot-trigger ${LXC_SCRIPT_DIR} |
395139e2 | 43 | install -m 0755 pve-container-stop-wrapper ${LXC_SCRIPT_DIR} |
1e1fad99 WB |
44 | install -d -m0755 ${SERVICEDIR}/lxc@.service.d |
45 | install -m0644 pve-reboot.conf ${SERVICEDIR}/lxc@.service.d/ | |
395139e2 FG |
46 | install -m0644 pve-container@.service ${SERVICEDIR}/ |
47 | install -m0644 'system-pve\x2dcontainer.slice' ${SERVICEDIR}/ | |
bf9f492f | 48 | install -d ${LXC_HOOK_DIR} |
deaf7667 | 49 | install -m 0755 lxc-pve-prestart-hook ${LXC_HOOK_DIR} |
50df544c | 50 | install -m 0755 lxc-pve-autodev-hook ${LXC_HOOK_DIR} |
32e6d659 | 51 | install -m 0755 lxc-pve-poststop-hook ${LXC_HOOK_DIR} |
bf9f492f DM |
52 | install -d ${LXC_COMMON_CONFIG_DIR} |
53 | install -m 0644 lxc-pve.conf ${LXC_COMMON_CONFIG_DIR}/01-pve.conf | |
68e8f3c5 | 54 | install -m 0644 -D pct.bash-completion ${BASHCOMPLDIR}/pct |
f76a2828 DM |
55 | make -C PVE install |
56 | install -d ${MAN1DIR} | |
81bee809 | 57 | install -d ${MAN5DIR} |
5bdebcfa DM |
58 | install -m 0644 pct.1 ${MAN1DIR} |
59 | gzip -9 ${MAN1DIR}/pct.1 | |
60 | install -m 0644 pct.conf.5 ${MAN5DIR} | |
61 | gzip -9 ${MAN5DIR}/pct.conf.5 | |
167db1d1 | 62 | cd ${MAN5DIR}; ln -s pct.conf.5.gz ct.conf.5.gz |
f76a2828 | 63 | |
1e180f97 DM |
64 | .PHONY: test |
65 | test: | |
66 | make -C test test | |
67 | ||
f76a2828 DM |
68 | .PHONY: clean |
69 | clean: | |
1e180f97 | 70 | make -C test clean |
5bdebcfa DM |
71 | make cleanup-docgen |
72 | rm -rf *.1 *.5 *.tmp *.bash-completion | |
f76a2828 DM |
73 | find . -name '*~' -exec rm {} ';' |
74 | ||
75 | .PHONY: distclean | |
76 | distclean: clean | |
77 |