]> git.proxmox.com Git - proxmox-mailgateway.git/blame - Makefile
buildsys: only get git revision if actually used
[proxmox-mailgateway.git] / Makefile
CommitLineData
5366f438 1include /usr/share/dpkg/pkg-info.mk
de416bd6 2
40718fe1 3PACKAGE=proxmox-mailgateway
de416bd6 4
9e737667 5BUILDDIR=$(PACKAGE)-$(DEB_VERSION)
bfa4d89c 6DSC=$(PACKAGE)_$(DEB_VERSION).dsc
9e737667 7
ca650092
SI
8DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
9CT_DEB=$(PACKAGE)-container_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
10HEADER_DEB=pve-headers_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
49a2b3c9 11
ca650092 12DEBS=$(DEB) $(CT_DEB) $(HEADER_DEB)
de416bd6 13
ca650092 14all: $(DEB)
de416bd6 15
49a2b3c9 16.PHONY: deb
ca650092 17deb $(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
34dsc: $(DSC)
35 $(MAKE) clean
36 $(MAKE) $(DSC)
37 lintian $(DSC)
38
39.PHONY: sbuild
40sbuild: $(DSC)
41 sbuild $(DSC)
42
b2771293 43.PHONY: upload
ced2d8a7 44upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
ca650092 45upload: $(DEBS)
4399103a 46 tar cf - $(DEBS)|ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST)
de416bd6
DM
47
48clean:
bfa4d89c 49 rm -rf $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar.* *.deb *.dsc *build *.buildinfo *.changes
de416bd6 50 find . -name '*~' -exec rm {} ';'