]> git.proxmox.com Git - pve-client.git/blame - Makefile
install missing file PVE/APIClient/Config.pm
[pve-client.git] / Makefile
CommitLineData
e4f88921
DM
1PACKAGE=pve-client
2PKGVER=0.1
3PKGREL=1
4
5DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
6
7DESTDIR=
8
565bbc73 9LIB_DIR=${DESTDIR}/usr/share/${PACKAGE}
e4f88921 10DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
dce6ecbc 11BASHCOMPLDIR=${DESTDIR}/usr/share/bash-completion/completions/
e4f88921
DM
12
13all: ${DEB}
14
15.PHONY: deb
16deb ${DEB}:
17 rm -rf build
18 rsync -a debian build
19 make DESTDIR=./build install
20 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
21 lintian ${DEB}
22
23install: pve-api-definition.js
565bbc73
DM
24 install -d -m 0755 ${LIB_DIR}/PVE
25 # install library tools from pve-common
26 install -m 0644 PVE/Tools.pm ${LIB_DIR}/PVE
27 install -m 0644 PVE/SafeSyslog.pm ${LIB_DIR}/PVE
28 install -m 0644 PVE/Exception.pm ${LIB_DIR}/PVE
29 install -m 0644 PVE/JSONSchema.pm ${LIB_DIR}/PVE
30 install -m 0644 PVE/RESTHandler.pm ${LIB_DIR}/PVE
31 install -m 0644 PVE/CLIHandler.pm ${LIB_DIR}/PVE
32 # install pveclient
33 install -D -m 0644 PVE/APIClient/Helpers.pm ${LIB_DIR}/PVE/APIClient/Helpers.pm
f211e13f 34 install -D -m 0644 PVE/APIClient/Config.pm ${LIB_DIR}/PVE/APIClient/Config.pm
565bbc73 35 install -D -m 0644 PVE/APIClient/Commands/remote.pm ${LIB_DIR}/PVE/APIClient/Commands/remote.pm
adf285bf 36 install -D -m 0644 PVE/APIClient/Commands/lxc.pm ${LIB_DIR}/PVE/APIClient/Commands/lxc.pm
565bbc73 37 install -D -m 0644 pve-api-definition.js ${LIB_DIR}/pve-api-definition.js
e4f88921 38 install -D -m 0755 pveclient ${DESTDIR}/usr/bin/pveclient
f507a398 39 install -D -m 0644 pveclient.bash-completion ${BASHCOMPLDIR}/pveclient
dce6ecbc 40
e4f88921
DM
41
42pve-api-definition.js:
43 ./extractapi.pl > pve-api-definition.js.tmp
44 mv pve-api-definition.js.tmp pve-api-definition.js
45
81ddc6f6
DM
46#.PHONY: upload
47#upload: ${DEB}
48# tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist stretch
e4f88921
DM
49
50distclean: clean
51
52clean:
53 rm -rf ./build *.deb *.changes *.buildinfo
54 find . -name '*~' -exec rm {} ';'
55
56.PHONY: dinstall
57dinstall: ${DEB}
58 dpkg -i ${DEB}