]> git.proxmox.com Git - pve-apiclient.git/blame - Makefile
buildsys: cleanup deb/dsc targets
[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 17$(BUILDSRC):
1b023462
TL
18 rm -rf $@ $@.tmp
19 cp -a src $@.tmp
20 cp -a debian $@.tmp/
21 echo "git clone git://git.proxmox.com/git/pve-apiclient.git\\ngit checkout $(GITVERSION)" >$@.tmp/debian/SOURCE
22 mv $@.tmp $@
2d805336 23
5a3b38c1 24.PHONY: deb
727d396e 25deb $(DEB): $(BUILDSRC)
4b2de6c1 26 cd $(BUILDSRC); dpkg-buildpackage -b -us -uc
727d396e 27 lintian $(DEB)
5a3b38c1 28
2d805336 29.PHONY: dsc
4b2de6c1
TL
30dsc: $(DSC)
31$(DSC): $(BUILDSRC)
32 cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d
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)