]>
Commit | Line | Data |
---|---|---|
5366f438 | 1 | include /usr/share/dpkg/pkg-info.mk |
de416bd6 | 2 | |
40718fe1 | 3 | PACKAGE=proxmox-mailgateway |
de416bd6 | 4 | |
9e737667 | 5 | BUILDDIR=$(PACKAGE)-$(DEB_VERSION) |
bfa4d89c | 6 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc |
9e737667 | 7 | |
ca650092 SI |
8 | DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb |
9 | CT_DEB=$(PACKAGE)-container_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb | |
10 | HEADER_DEB=pve-headers_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb | |
49a2b3c9 | 11 | |
ca650092 | 12 | DEBS=$(DEB) $(CT_DEB) $(HEADER_DEB) |
de416bd6 | 13 | |
ca650092 | 14 | all: $(DEB) |
de416bd6 | 15 | |
49a2b3c9 | 16 | .PHONY: deb |
ca650092 | 17 | deb $(CT_DEB) $(HEADER_DEB): $(DEB) |
9e737667 SI |
18 | |
19 | $(BUILDDIR): debian | |
20 | rm -rf $@ $@.tmp | |
21 | mkdir -p $@.tmp/debian | |
22 | cp -a debian/ $@.tmp/ | |
1f11c557 | 23 | echo "git clone git://git.proxmox.com/git/proxmox-mailgateway.git\\ngit checkout $(shell git rev-parse HEAD)" > $@.tmp/debian/SOURCE |
9e737667 SI |
24 | mv $@.tmp $@ |
25 | ||
26 | $(DEB): $(BUILDDIR) | |
27 | cd $(BUILDDIR); dpkg-buildpackage -b -uc -us | |
ca650092 | 28 | lintian $(DEBS) |
de416bd6 | 29 | |
bfa4d89c SI |
30 | $(DSC): $(BUILDDIR) |
31 | cd $(BUILDDIR); dpkg-buildpackage -S -uc -us | |
32 | ||
33 | .PHONY:dsc | |
34 | dsc: $(DSC) | |
35 | $(MAKE) clean | |
36 | $(MAKE) $(DSC) | |
37 | lintian $(DSC) | |
38 | ||
39 | .PHONY: sbuild | |
40 | sbuild: $(DSC) | |
41 | sbuild $(DSC) | |
42 | ||
b2771293 | 43 | .PHONY: upload |
ced2d8a7 | 44 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
ca650092 | 45 | upload: $(DEBS) |
4399103a | 46 | tar cf - $(DEBS)|ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST) |
de416bd6 DM |
47 | |
48 | clean: | |
bfa4d89c | 49 | rm -rf $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar.* *.deb *.dsc *build *.buildinfo *.changes |
de416bd6 | 50 | find . -name '*~' -exec rm {} ';' |