example2.pl: add a second example
[pve-apiclient.git] / Makefile
CommitLineData
5a3b38c1
DM
1PACKAGE=libpve-apiclient-perl
2PKGVER=1.0
d12f292e 3PKGREL=2
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
DM
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:
d12f292e
DM
23 install -D -m 0644 PVE/APIClient/LWP.pm ${PERL5DIR}/PVE/APIClient/LWP.pm
24 install -d -m 755 ${DOCDIR}/examples
25 install -m 0755 examples/example1.pl ${DOCDIR}/examples
8291fb9a 26 install -m 0755 examples/example2.pl ${DOCDIR}/examples
5a3b38c1
DM
27
28.PHONY: upload
29upload: ${DEB}
30 tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload
31
32distclean: clean
33
34clean:
35 rm -rf ./build *.deb *.changes
36 find . -name '*~' -exec rm {} ';'
2834772d
DM
37
38.PHONY: dinstall
39dinstall: ${DEB}
40 dpkg -i ${DEB}