]> git.proxmox.com Git - pve-apiclient.git/blame - Makefile
separate packaging and source build system
[pve-apiclient.git] / Makefile
CommitLineData
7147fbfe
TL
1include /usr/share/dpkg/default.mk
2
5a3b38c1 3PACKAGE=libpve-apiclient-perl
5a3b38c1 4
7147fbfe
TL
5BUILDSRC := $(PACKAGE)-$(DEB_VERSION)
6DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
7DSC=$(PACKAGE)_$(DEB_VERSION).dsc
5a3b38c1
DM
8
9DESTDIR=
727d396e
TL
10PERL5DIR=$(DESTDIR)/usr/share/perl5
11DOCDIR=$(DESTDIR)/usr/share/doc/$(PACKAGE)
5a3b38c1 12
2689bc84 13GITVERSION:=$(shell git rev-parse HEAD)
2d805336 14
727d396e 15all: $(DEB)
5a3b38c1 16
2d805336
RV
17.PHONY: $(BUILDSRC)
18$(BUILDSRC):
1b023462
TL
19 rm -rf $@ $@.tmp
20 cp -a src $@.tmp
21 cp -a debian $@.tmp/
22 echo "git clone git://git.proxmox.com/git/pve-apiclient.git\\ngit checkout $(GITVERSION)" >$@.tmp/debian/SOURCE
23 mv $@.tmp $@
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 35.PHONY: upload
727d396e
TL
36upload: $(DEB)
37 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pmg,pve --dist bullseye
5a3b38c1
DM
38
39distclean: clean
5a3b38c1 40clean:
f5310c07 41 rm -rf $(PACKAGE)-[0-9]*/ *.deb *.changes *.buildinfo *.build *.dsc *.tar.*
2834772d
DM
42
43.PHONY: dinstall
727d396e
TL
44dinstall: $(DEB)
45 dpkg -i $(DEB)