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