]> git.proxmox.com Git - pve-firewall.git/blame_incremental - Makefile
bump version to 5.0.7
[pve-firewall.git] / Makefile
... / ...
CommitLineData
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
3
4PACKAGE=pve-firewall
5
6BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
7GITVERSION:=$(shell git rev-parse HEAD)
8
9DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
10DSC=$(PACKAGE)_$(DEB_VERSION).dsc
11DEB2=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
12DEBS=$(DEB) $(DEB2)
13
14all: $(DEBS)
15
16.PHONY: dinstall
17dinstall: $(DEB)
18 dpkg -i $<
19
20$(BUILDDIR):
21 rm -rf $(BUILDDIR)
22 rsync -a src/ debian $(BUILDDIR)
23 echo "git clone git://git.proxmox.com/git/pve-firewall.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
24
25.PHONY: deb
26deb: $(DEBS)
27$(DEB2): $(DEB)
28$(DEB): $(BUILDDIR)
29 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
30 lintian $(DEBS)
31
32.PHONY: dsc
33dsc:
34 rm -rf $(DSC) $(BUILDDIR)
35 $(MAKE) $(DSC)
36 lintian $(DSC)
37
38$(DSC): $(BUILDDIR)
39 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
40
41sbuild: $(DSC)
42 sbuild $(DSC)
43
44check:
45 make -C test check
46
47.PHONY: clean distclean
48distclean: clean
49clean:
50 make -C src clean
51 make -C test clean
52 rm -rf *.deb *.dsc *.changes *.build *.buildinfo $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar*
53
54.PHONY: upload
55upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
56upload: $(DEBS)
57 tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)