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