]> git.proxmox.com Git - pve-apiclient.git/blob - Makefile
03c9f65c6c6f9956e4b39f8a44b6a1624a8058e3
[pve-apiclient.git] / Makefile
1 PACKAGE=libpve-apiclient-perl
2 PKGVER=2.0
3 PKGREL=3
4
5 DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
6
7 DESTDIR=
8
9 PERL5DIR=${DESTDIR}/usr/share/perl5
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:
23 install -D -m 0644 PVE/APIClient/LWP.pm ${PERL5DIR}/PVE/APIClient/LWP.pm
24 install -m 0644 PVE/APIClient/Exception.pm ${PERL5DIR}/PVE/APIClient/Exception.pm
25 install -d -m 755 ${DOCDIR}/examples
26 install -m 0755 examples/example1.pl ${DOCDIR}/examples
27 install -m 0755 examples/example2.pl ${DOCDIR}/examples
28 install -m 0755 examples/perftest1.pl ${DOCDIR}/examples
29
30 .PHONY: upload
31 upload: ${DEB}
32 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist stretch
33
34 distclean: clean
35
36 clean:
37 rm -rf ./build *.deb *.changes *.buildinfo
38 find . -name '*~' -exec rm {} ';'
39
40 .PHONY: dinstall
41 dinstall: ${DEB}
42 dpkg -i ${DEB}