]> git.proxmox.com Git - pve-client.git/blobdiff - Makefile
use SectionConfig for PVE::APIClient::Config
[pve-client.git] / Makefile
index f32776ea88254bd1c651fcd36267df3bf8e46eaf..71b56e17f65526e125e81027ff110dfc3f97ed88 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,9 @@ DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
 
 DESTDIR=
 
 
 DESTDIR=
 
-PERL5DIR=${DESTDIR}/usr/share/perl5
+LIB_DIR=${DESTDIR}/usr/share/${PACKAGE}
 DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
 DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
+BASHCOMPLDIR=${DESTDIR}/usr/share/bash-completion/completions/
 
 all: ${DEB}
 
 
 all: ${DEB}
 
@@ -20,17 +21,34 @@ deb ${DEB}:
        lintian ${DEB}
 
 install:  pve-api-definition.js
        lintian ${DEB}
 
 install:  pve-api-definition.js
-       install -D -m 0644 PVE/APIClient/Helpers.pm ${PERL5DIR}/PVE/APIClient/Helpers.pm
-       install -D -m 0644 pve-api-definition.js ${DESTDIR}/usr/share/${PACKAGE}/pve-api-definition.js
+       install -d -m 0755 ${LIB_DIR}/PVE
+       # 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
+       # 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/help.pm ${LIB_DIR}/PVE/APIClient/Commands/help.pm
+       install -D -m 0644 pve-api-definition.js ${LIB_DIR}/pve-api-definition.js
        install -D -m 0755 pveclient ${DESTDIR}/usr/bin/pveclient
        install -D -m 0755 pveclient ${DESTDIR}/usr/bin/pveclient
+       install -D -m 0644 pveclient.bash-completion ${BASHCOMPLDIR}/pveclient
+
 
 pve-api-definition.js:
        ./extractapi.pl > pve-api-definition.js.tmp
        mv pve-api-definition.js.tmp pve-api-definition.js
 
 
 pve-api-definition.js:
        ./extractapi.pl > pve-api-definition.js.tmp
        mv pve-api-definition.js.tmp pve-api-definition.js
 
-.PHONY: upload
-upload: ${DEB}
-       tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist stretch
+#.PHONY: upload
+#upload: ${DEB}
+#      tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist stretch
 
 distclean: clean
 
 
 distclean: clean