]> git.proxmox.com Git - pve-apiclient.git/blame - Makefile
d/control: define compat level via build-depends and raise to 13
[pve-apiclient.git] / Makefile
CommitLineData
5a3b38c1 1PACKAGE=libpve-apiclient-perl
b6ce5c27
RV
2PKGVER=$(shell dpkg-parsechangelog -Sversion | cut -d- -f1)
3PKGREL=$(shell dpkg-parsechangelog -Sversion | cut -d- -f2)
5a3b38c1 4
2d805336 5BUILDSRC := $(PACKAGE)-$(PKGVER)
727d396e
TL
6DEB=$(PACKAGE)_$(PKGVER)-$(PKGREL)_all.deb
7DSC=$(PACKAGE)_$(PKGVER)-$(PKGREL).dsc
5a3b38c1
DM
8
9DESTDIR=
10
727d396e
TL
11PERL5DIR=$(DESTDIR)/usr/share/perl5
12DOCDIR=$(DESTDIR)/usr/share/doc/$(PACKAGE)
5a3b38c1 13
2689bc84 14GITVERSION:=$(shell git rev-parse HEAD)
2d805336 15
727d396e 16all: $(DEB)
5a3b38c1 17
2d805336
RV
18.PHONY: $(BUILDSRC)
19$(BUILDSRC):
20 rm -rf $(BUILDSRC)
21 rsync -a debian $(BUILDSRC)
22 make DESTDIR=./$(BUILDSRC) install
727d396e 23 echo "git clone git://git.proxmox.com/git/pve-apiclient.git\\ngit checkout $(GITVERSION)" > $(BUILDSRC)/debian/SOURCE
2d805336 24
5a3b38c1 25.PHONY: deb
727d396e 26deb $(DEB): $(BUILDSRC)
2d805336 27 cd $(BUILDSRC); dpkg-buildpackage -rfakeroot -b -us -uc
727d396e 28 lintian $(DEB)
5a3b38c1 29
2d805336
RV
30.PHONY: dsc
31dsc: $(BUILDSRC)
32 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
727d396e 33 lintian $(DSC)
2d805336 34
5a3b38c1 35install:
727d396e
TL
36 install -D -m 0644 PVE/APIClient/LWP.pm $(PERL5DIR)/PVE/APIClient/LWP.pm
37 install -m 0644 PVE/APIClient/Exception.pm $(PERL5DIR)/PVE/APIClient/Exception.pm
38 install -d -m 755 $(DOCDIR)/examples
39 install -m 0755 examples/example1.pl $(DOCDIR)/examples
40 install -m 0755 examples/example2.pl $(DOCDIR)/examples
41 install -m 0755 examples/perftest1.pl $(DOCDIR)/examples
5a3b38c1
DM
42
43.PHONY: upload
727d396e
TL
44upload: $(DEB)
45 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist bullseye
5a3b38c1
DM
46
47distclean: clean
48
49clean:
2d805336 50 rm -rf ./$(BUILDSRC) *.deb *.changes *.buildinfo *.dsc *.tar.gz
2834772d
DM
51
52.PHONY: dinstall
727d396e
TL
53dinstall: $(DEB)
54 dpkg -i $(DEB)