]> git.proxmox.com Git - pve-apiclient.git/blame - Makefile
add make target to copy and include files from pve-common - update Exception.pm
[pve-apiclient.git] / Makefile
CommitLineData
5a3b38c1 1PACKAGE=libpve-apiclient-perl
bf0c1ca6 2PKGVER=2.0
23002ffc 3PKGREL=4
5a3b38c1
DM
4
5DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
6
7DESTDIR=
8
d12f292e
DM
9PERL5DIR=${DESTDIR}/usr/share/perl5
10DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
5a3b38c1 11
d3e90048
DM
12PVE_COMMON_FILES= \
13 Exception.pm
14
5a3b38c1
DM
15all: ${DEB}
16
17.PHONY: deb
18deb ${DEB}:
19 rm -rf build
20 rsync -a debian build
21 make DESTDIR=./build install
22 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
23 lintian ${DEB}
24
25install:
d12f292e 26 install -D -m 0644 PVE/APIClient/LWP.pm ${PERL5DIR}/PVE/APIClient/LWP.pm
6700b151 27 install -m 0644 PVE/APIClient/Exception.pm ${PERL5DIR}/PVE/APIClient/Exception.pm
d12f292e
DM
28 install -d -m 755 ${DOCDIR}/examples
29 install -m 0755 examples/example1.pl ${DOCDIR}/examples
8291fb9a 30 install -m 0755 examples/example2.pl ${DOCDIR}/examples
21e68a8a 31 install -m 0755 examples/perftest1.pl ${DOCDIR}/examples
5a3b38c1 32
d3e90048
DM
33update-pve-common:
34 for i in ${PVE_COMMON_FILES}; do cp ../pve-common/src/PVE/$$i PVE/APIClient/; done
35 for i in ${PVE_COMMON_FILES}; do sed -i 's/PVE::/PVE::APIClient::/g' PVE/APIClient/$$i; done
36
5a3b38c1
DM
37.PHONY: upload
38upload: ${DEB}
bf0c1ca6 39 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist stretch
5a3b38c1
DM
40
41distclean: clean
42
43clean:
9c6d72b1 44 rm -rf ./build *.deb *.changes *.buildinfo
5a3b38c1 45 find . -name '*~' -exec rm {} ';'
2834772d
DM
46
47.PHONY: dinstall
48dinstall: ${DEB}
49 dpkg -i ${DEB}