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