]>
Commit | Line | Data |
---|---|---|
0d462fc0 TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | include /usr/share/dpkg/architecture.mk | |
bb272dd3 DM |
3 | |
4 | PACKAGE=pve-firewall | |
5 | ||
22b180a1 | 6 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION) |
4382be0a | 7 | GITVERSION:=$(shell git rev-parse HEAD) |
bb272dd3 | 8 | |
22b180a1 TL |
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 | |
05018f6e | 12 | DEBS=$(DEB) $(DEB2) |
bb272dd3 | 13 | |
05018f6e | 14 | all: $(DEBS) |
bb272dd3 DM |
15 | |
16 | .PHONY: dinstall | |
e59c8fd1 TL |
17 | dinstall: $(DEB) |
18 | dpkg -i $< | |
bb272dd3 | 19 | |
5d223aa3 TL |
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 | |
bb272dd3 DM |
24 | |
25 | .PHONY: deb | |
05018f6e WB |
26 | deb: $(DEBS) |
27 | $(DEB2): $(DEB) | |
e59c8fd1 | 28 | $(DEB): $(BUILDDIR) |
5d223aa3 TL |
29 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc |
30 | lintian $(DEBS) | |
bb272dd3 | 31 | |
95ed90a9 | 32 | .PHONY: dsc |
68a0d958 TL |
33 | dsc: |
34 | rm -rf $(DSC) $(BUILDDIR) | |
35 | $(MAKE) $(DSC) | |
36 | lintian $(DSC) | |
37 | ||
5d223aa3 TL |
38 | $(DSC): $(BUILDDIR) |
39 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d | |
68a0d958 TL |
40 | |
41 | sbuild: $(DSC) | |
42 | sbuild $(DSC) | |
95ed90a9 | 43 | |
43be6155 | 44 | check: |
ebb20753 DM |
45 | make -C test check |
46 | ||
43be6155 TL |
47 | .PHONY: clean distclean |
48 | distclean: clean | |
49 | clean: | |
3f665549 | 50 | make -C src clean |
ebb20753 | 51 | make -C test clean |
8fca2e97 | 52 | rm -rf *.deb *.dsc *.changes *.build *.buildinfo $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar* |
bb272dd3 DM |
53 | |
54 | .PHONY: upload | |
a6d4c650 | 55 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
05018f6e | 56 | upload: $(DEBS) |
a6d4c650 | 57 | tar cf - $(DEBS) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH) |