X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=blobdiff_plain;f=Makefile;h=c5fe801d6b12e2cdfb8f0a48c4ad6c434e6bdffe;hp=4c9572a977eb2dd974f8f855db740ba2e8437473;hb=826591e032a3d2161abf21b5007f116431ecd22a;hpb=ca3269f4d89085a2bbbe5ebfdff08966416175d9 diff --git a/Makefile b/Makefile index 4c9572a..c5fe801 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,13 @@ DESTDIR= PERL5_DIR=${DESTDIR}/usr/share/perl5 LIB_DIR=${DESTDIR}/usr/share/${PACKAGE} +MAN1DIR=${DESTDIR}//usr/share/man/man1 DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE} BASHCOMPLDIR=${DESTDIR}/usr/share/bash-completion/completions/ PVE_COMMON_FILES= \ + Tools.pm \ + Syscall.pm \ CLIHandler.pm \ JSONSchema.pm \ PTY.pm \ @@ -19,6 +22,15 @@ PVE_COMMON_FILES= \ SafeSyslog.pm \ SectionConfig.pm \ +PVE_CLIENT_SOURCES= \ + PVE/APIClient/Helpers.pm \ + PVE/APIClient/Config.pm \ + PVE/APIClient/Commands/remote.pm \ + PVE/APIClient/Commands/config.pm \ + PVE/APIClient/Commands/lxc.pm \ + PVE/APIClient/Commands/list.pm \ + PVE/APIClient/Commands/GuestStatus.pm + all: ${DEB} .PHONY: deb @@ -29,23 +41,25 @@ deb ${DEB}: cd build; dpkg-buildpackage -rfakeroot -b -us -uc lintian ${DEB} -install: pve-api-definition.dat +pveclient.1-synopsis.adoc: pveclient ${PVE_CLIENT_SOURCES} + perl -I. ./pveclient printsynopsis > $@.tmp + mv $@.tmp $@ + +pveclient.1: pveclient.1-synopsis.adoc + a2x -f manpage pveclient.adoc + +install: pve-api-definition.dat pveclient.1 install -d -m 0755 ${PERL5_DIR}/PVE/APIClient # install library tools from pve-common 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/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 + for i in ${PVE_CLIENT_SOURCES}; do install -D -m 0644 $$i ${PERL5_DIR}/$$i; done 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 - + # install manual page + install -D -m 0644 pveclient.1 ${MAN1DIR}/pveclient.1 + gzip -9 ${MAN1DIR}/pveclient.1 update-pve-common: for i in ${PVE_COMMON_FILES}; do cp ../pve-common/src/PVE/$$i PVE/APIClient/; done @@ -66,6 +80,7 @@ distclean: clean clean: rm -rf ./build *.deb *.changes *.buildinfo + rm pveclient.1-synopsis.adoc pveclient.1 find . -name '*~' -exec rm {} ';' .PHONY: dinstall