X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=blobdiff_plain;f=Makefile;h=4c9572a977eb2dd974f8f855db740ba2e8437473;hp=b37b3fe53573fbb806d386dac038a1fa88861491;hb=ca3269f4d89085a2bbbe5ebfdff08966416175d9;hpb=4cedebf640a4b4862a98eb492ddb2f3c56222677 diff --git a/Makefile b/Makefile index b37b3fe..4c9572a 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,19 @@ DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb DESTDIR= +PERL5_DIR=${DESTDIR}/usr/share/perl5 LIB_DIR=${DESTDIR}/usr/share/${PACKAGE} DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE} BASHCOMPLDIR=${DESTDIR}/usr/share/bash-completion/completions/ +PVE_COMMON_FILES= \ + CLIHandler.pm \ + JSONSchema.pm \ + PTY.pm \ + RESTHandler.pm \ + SafeSyslog.pm \ + SectionConfig.pm \ + all: ${DEB} .PHONY: deb @@ -21,29 +30,30 @@ deb ${DEB}: lintian ${DEB} install: pve-api-definition.dat - install -d -m 0755 ${LIB_DIR}/PVE + install -d -m 0755 ${PERL5_DIR}/PVE/APIClient # install library tools from pve-common - install -m 0644 PVE/Tools.pm ${LIB_DIR}/PVE - install -m 0644 PVE/SafeSyslog.pm ${LIB_DIR}/PVE - install -m 0644 PVE/Exception.pm ${LIB_DIR}/PVE - install -m 0644 PVE/JSONSchema.pm ${LIB_DIR}/PVE - install -m 0644 PVE/RESTHandler.pm ${LIB_DIR}/PVE - install -m 0644 PVE/CLIHandler.pm ${LIB_DIR}/PVE - install -m 0644 PVE/PTY.pm ${LIB_DIR}/PVE - install -m 0644 PVE/SectionConfig.pm ${LIB_DIR}/PVE + for i in ${PVE_COMMON_FILES}; do install -m 0644 PVE/APIClient/$$i ${PERL5_DIR}/PVE/APIClient; done # install pveclient - install -D -m 0644 PVE/APIClient/Helpers.pm ${LIB_DIR}/PVE/APIClient/Helpers.pm - install -D -m 0644 PVE/APIClient/Config.pm ${LIB_DIR}/PVE/APIClient/Config.pm - install -D -m 0644 PVE/APIClient/Commands/remote.pm ${LIB_DIR}/PVE/APIClient/Commands/remote.pm - install -D -m 0644 PVE/APIClient/Commands/lxc.pm ${LIB_DIR}/PVE/APIClient/Commands/lxc.pm - install -D -m 0644 PVE/APIClient/Commands/config.pm ${LIB_DIR}/PVE/APIClient/Commands/config.pm - install -D -m 0644 PVE/APIClient/Commands/list.pm ${LIB_DIR}/PVE/APIClient/Commands/list.pm - install -D -m 0644 PVE/APIClient/Commands/GuestStatus.pm ${LIB_DIR}/PVE/APIClient/Commands/GuestStatus.pm + install -D -m 0644 PVE/APIClient/Tools.pm ${PERL5_DIR}/PVE/APIClient/Tools.pm + install -D -m 0644 PVE/APIClient/Helpers.pm ${PERL5_DIR}/PVE/APIClient/Helpers.pm + install -D -m 0644 PVE/APIClient/Config.pm ${PERL5_DIR}/PVE/APIClient/Config.pm + install -D -m 0644 PVE/APIClient/Commands/remote.pm ${PERL5_DIR}/PVE/APIClient/Commands/remote.pm + install -D -m 0644 PVE/APIClient/Commands/lxc.pm ${PERL5_DIR}/PVE/APIClient/Commands/lxc.pm + install -D -m 0644 PVE/APIClient/Commands/config.pm ${PERL5_DIR}/PVE/APIClient/Commands/config.pm + install -D -m 0644 PVE/APIClient/Commands/list.pm ${PERL5_DIR}/PVE/APIClient/Commands/list.pm + install -D -m 0644 PVE/APIClient/Commands/GuestStatus.pm ${PERL5_DIR}/PVE/APIClient/Commands/GuestStatus.pm install -D -m 0644 pve-api-definition.dat ${LIB_DIR}/pve-api-definition.dat install -D -m 0755 pveclient ${DESTDIR}/usr/bin/pveclient install -D -m 0644 pveclient.bash-completion ${BASHCOMPLDIR}/pveclient +update-pve-common: + for i in ${PVE_COMMON_FILES}; do cp ../pve-common/src/PVE/$$i PVE/APIClient/; done + for i in ${PVE_COMMON_FILES}; do sed -i 's/PVE::/PVE::APIClient::/g' PVE/APIClient/$$i; done + # Remove INotify from CLIHandler.pm + sed -i 's/use PVE::APIClient::INotify;//' PVE/APIClient/CLIHandler.pm + + pve-api-definition.dat: ./extractapi.pl > pve-api-definition.dat.tmp mv pve-api-definition.dat.tmp pve-api-definition.dat