]>
Commit | Line | Data |
---|---|---|
1 | include /usr/share/dpkg/pkg-info.mk | |
2 | ||
3 | PACKAGE=proxmox-mailgateway | |
4 | ||
5 | BUILDDIR=$(PACKAGE)-$(DEB_VERSION) | |
6 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc | |
7 | ||
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 | |
11 | ||
12 | DEBS=$(DEB) $(CT_DEB) $(HEADER_DEB) | |
13 | ||
14 | all: $(DEB) | |
15 | ||
16 | .PHONY: deb | |
17 | deb $(CT_DEB) $(HEADER_DEB): $(DEB) | |
18 | ||
19 | $(BUILDDIR): debian | |
20 | rm -rf $@ $@.tmp | |
21 | mkdir -p $@.tmp/debian | |
22 | cp -a debian/ $@.tmp/ | |
23 | echo "git clone git://git.proxmox.com/git/proxmox-mailgateway.git\\ngit checkout $(shell git rev-parse HEAD)" > $@.tmp/debian/SOURCE | |
24 | mv $@.tmp $@ | |
25 | ||
26 | $(DEB): $(BUILDDIR) | |
27 | cd $(BUILDDIR); dpkg-buildpackage -b -uc -us | |
28 | lintian $(DEBS) | |
29 | ||
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 | ||
43 | .PHONY: upload | |
44 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) | |
45 | upload: $(DEBS) | |
46 | tar cf - $(DEBS)|ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST) | |
47 | ||
48 | clean: | |
49 | rm -rf $(PACKAGE)-[0-9]*/ | |
50 | rm -f $(PACKAGE)*.tar.* *.deb *.dsc *build *.buildinfo *.changes |