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