]> git.proxmox.com Git - pve-client.git/blame - Makefile
add debian package files
[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
9PERL5DIR=${DESTDIR}/usr/share/perl5
10DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
11
12all: ${DEB}
13
14.PHONY: deb
15deb ${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
22install: pve-api-definition.js
23 install -D -m 0644 PVE/APIClient/Helpers.pm ${PERL5DIR}/PVE/APIClient/Helpers.pm
24 install -D -m 0644 pve-api-definition.js ${DESTDIR}/usr/share/${PACKAGE}/pve-api-definition.js
25 install -D -m 0755 pveclient ${DESTDIR}/usr/bin/pveclient
26
27pve-api-definition.js:
28 ./extractapi.pl > pve-api-definition.js.tmp
29 mv pve-api-definition.js.tmp pve-api-definition.js
30
31.PHONY: upload
32upload: ${DEB}
33 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist stretch
34
35distclean: clean
36
37clean:
38 rm -rf ./build *.deb *.changes *.buildinfo
39 find . -name '*~' -exec rm {} ';'
40
41.PHONY: dinstall
42dinstall: ${DEB}
43 dpkg -i ${DEB}