]> git.proxmox.com Git - pve-firewall.git/blob - Makefile
74be3787801f8291111e7a7770dae7784d3a78d4
[pve-firewall.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3
4 PACKAGE=pve-firewall
5
6 BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
7 GITVERSION:=$(shell git rev-parse HEAD)
8
9 DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
10 DSC=$(PACKAGE)_$(DEB_VERSION).dsc
11 DEB2=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
12 DEBS=$(DEB) $(DEB2)
13
14 all: $(DEBS)
15
16 .PHONY: dinstall
17 dinstall: deb
18 dpkg -i $(DEBS)
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
26 deb: $(DEBS)
27 $(DEB2): $(DEB)
28 $(DEB): $(BUILDDIR) check
29 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
30 lintian $(DEBS)
31
32 .PHONY: dsc
33 dsc:
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
41 sbuild: $(DSC)
42 sbuild $(DSC)
43
44 .PHONY: check
45 check:
46 make -C test check
47
48 .PHONY: clean distclean
49 distclean: clean
50 clean:
51 make -C src clean
52 make -C test clean
53 rm -rf *.deb *.dsc *.changes *.build *.buildinfo $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar*
54
55 .PHONY: upload
56 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
57 upload: $(DEBS)
58 tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)