]> git.proxmox.com Git - pve-container.git/blame - src/Makefile
pct: use separate class for CLIHandler (src/PVE/CLI/pct.pm)
[pve-container.git] / src / Makefile
CommitLineData
f76a2828
DM
1PACKAGE=pve-container
2
3PREFIX=${DESTDIR}/usr
4BINDIR=${PREFIX}/bin
5SBINDIR=${PREFIX}/sbin
6MANDIR=${PREFIX}/share/man
7DOCDIR=${PREFIX}/share/doc/${PACKAGE}
bf9f492f
DM
8LXC_SCRIPT_DIR=${PREFIX}/share/lxc
9LXC_TMPL_DIR=${LXC_SCRIPT_DIR}/templates
10LXC_HOOK_DIR=${LXC_SCRIPT_DIR}/hooks
11LXC_COMMON_CONFIG_DIR=${LXC_SCRIPT_DIR}/config/common.conf.d
f76a2828
DM
12PODDIR=${DOCDIR}/pod
13MAN1DIR=${MANDIR}/man1/
81bee809 14MAN5DIR=${MANDIR}/man5/
68e8f3c5 15BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
f76a2828
DM
16export PERLDIR=${PREFIX}/share/perl5
17
18all:
19
20%.1.gz: %.1.pod
21 rm -f $@
22 cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@
23
81bee809
DM
24%.5.gz: %.5.pod
25 rm -f $@
26 cat $<|pod2man -n $* -s 5 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@
27
f76a2828 28pct.1.pod: pct
9beee926 29 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->generate_pod_manpage();" >$@
f76a2828 30
81bee809
DM
31pct.conf.5.pod: gen-pct-conf-pod.pl PVE/LXC.pm
32 perl -I. ./gen-pct-conf-pod.pl >$@
33
f76a2828 34.PHONY: install
9beee926
DM
35install: pct lxc-pve.conf lxc-pve-prestart-hook lxc-pve-mount-hook lxc-pve-poststop-hook lxcnetaddbr pct.1.pod pct.1.gz pct.conf.5.pod pct.conf.5.gz pve-update-lxc-config pct.bash-completion
36 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}
42 install -d ${LXC_HOOK_DIR}
deaf7667 43 install -m 0755 lxc-pve-prestart-hook ${LXC_HOOK_DIR}
bf9f492f 44 install -m 0755 lxc-pve-mount-hook ${LXC_HOOK_DIR}
32e6d659 45 install -m 0755 lxc-pve-poststop-hook ${LXC_HOOK_DIR}
bf9f492f
DM
46 install -d ${LXC_COMMON_CONFIG_DIR}
47 install -m 0644 lxc-pve.conf ${LXC_COMMON_CONFIG_DIR}/01-pve.conf
68e8f3c5 48 install -m 0644 -D pct.bash-completion ${BASHCOMPLDIR}/pct
f76a2828
DM
49 make -C PVE install
50 install -d ${MAN1DIR}
81bee809 51 install -d ${MAN5DIR}
f76a2828
DM
52 install -d ${PODDIR}
53 install -m 0644 pct.1.gz ${MAN1DIR}
f76a2828 54 install -m 0644 pct.1.pod ${PODDIR}
81bee809
DM
55 install -m 0644 pct.conf.5.pod ${PODDIR}
56 install -m 0644 pct.conf.5.gz ${MAN5DIR}
f76a2828 57
1e180f97
DM
58.PHONY: test
59test:
60 make -C test test
61
f76a2828
DM
62.PHONY: clean
63clean:
1e180f97 64 make -C test clean
f76a2828
DM
65 rm -rf *.1.pod *.1.gz
66 find . -name '*~' -exec rm {} ';'
67
68.PHONY: distclean
69distclean: clean
70