]> git.proxmox.com Git - pve-apiclient.git/blame - Makefile
Add "make dsc" target
[pve-apiclient.git] / Makefile
CommitLineData
5a3b38c1 1PACKAGE=libpve-apiclient-perl
bf0c1ca6 2PKGVER=2.0
23002ffc 3PKGREL=4
5a3b38c1 4
2d805336 5BUILDSRC := $(PACKAGE)-$(PKGVER)
5a3b38c1 6DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
2d805336 7DSC=${PACKAGE}_${PKGVER}-${PKGREL}.dsc
5a3b38c1
DM
8
9DESTDIR=
10
d12f292e
DM
11PERL5DIR=${DESTDIR}/usr/share/perl5
12DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
5a3b38c1 13
d3e90048
DM
14PVE_COMMON_FILES= \
15 Exception.pm
16
2d805336 17
5a3b38c1
DM
18all: ${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
27deb ${DEB}: $(BUILDSRC)
28 cd $(BUILDSRC); dpkg-buildpackage -rfakeroot -b -us -uc
5a3b38c1
DM
29 lintian ${DEB}
30
2d805336
RV
31.PHONY: dsc
32dsc: $(BUILDSRC)
33 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
34 lintian ${DSC}
35
5a3b38c1 36install:
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
44update-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
49upload: ${DEB}
bf0c1ca6 50 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist stretch
5a3b38c1
DM
51
52distclean: clean
53
54clean:
2d805336 55 rm -rf ./$(BUILDSRC) *.deb *.changes *.buildinfo *.dsc *.tar.gz
5a3b38c1 56 find . -name '*~' -exec rm {} ';'
2834772d
DM
57
58.PHONY: dinstall
59dinstall: ${DEB}
60 dpkg -i ${DEB}