]> git.proxmox.com Git - pve-guest-common.git/blob - Makefile
buildsys: make build-dir generation atomic
[pve-guest-common.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=libpve-guest-common-perl
4
5 DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
6 DSC=$(PACKAGE)_$(DEB_VERSION).dsc
7
8 BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
9
10 all:
11
12 $(BUILDDIR):
13 rm -rf $@ $@.tmp
14 cp -a src $@.tmp
15 cp -a debian $@.tmp/
16 echo "git clone git://git.proxmox.com/git/pve-guest-common.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
17 mv $@.tmp $@
18
19 .PHONY: deb
20 deb: $(DEB)
21 $(DEB): $(BUILDDIR)
22 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
23 lintian $(DEB)
24
25 .PHONY: dsc
26 dsc: $(DSC)
27 $(DSC): $(BUILDDIR)
28 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d -nc
29 lintian $(DSC)
30
31 .PHONY: upload
32 upload: $(DEB)
33 tar cf - $(DEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist bullseye
34
35 distclean: clean
36
37 clean:
38 rm -rf $(BUILDDIR) *.deb *.dsc *.changes *.buildinfo *.tar.gz
39
40 .PHONY: dinstall
41 dinstall: $(DEB)
42 dpkg -i $(DEB)