]>
Commit | Line | Data |
---|---|---|
bf61be74 TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | ||
f76a2828 | 3 | PACKAGE=pve-container |
f76a2828 | 4 | |
0717611b | 5 | GITVERSION:=$(shell git rev-parse HEAD) |
d962762a | 6 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM) |
f76a2828 | 7 | |
d962762a WB |
8 | DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb |
9 | DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc | |
f76a2828 | 10 | |
d962762a | 11 | all: $(DEB) |
f76a2828 DM |
12 | |
13 | .PHONY: dinstall | |
d962762a WB |
14 | dinstall: $(DEB) |
15 | dpkg -i $(DEB) | |
f76a2828 | 16 | |
c98778d7 WB |
17 | $(BUILDDIR): src debian |
18 | rm -rf $(BUILDDIR) $(BUILDDIR).tmp; mkdir $(BUILDDIR).tmp | |
19 | cp -t $(BUILDDIR).tmp -a debian src/* | |
20 | echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout $(GITVERSION)" >$(BUILDDIR).tmp/debian/SOURCE | |
21 | mv $(BUILDDIR).tmp $(BUILDDIR) | |
74367edd | 22 | |
6535fcdb | 23 | .PHONY: deb |
d962762a WB |
24 | deb: $(DEB) |
25 | $(DEB): $(BUILDDIR) | |
26 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc | |
27 | lintian $(DEB) | |
f76a2828 | 28 | |
74367edd TL |
29 | |
30 | .PHONY: dsc | |
d962762a WB |
31 | dsc: $(DSC) |
32 | $(DSC): $(BUILDDIR) | |
f8a70ece | 33 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d |
d962762a | 34 | lintian $(DSC) |
74367edd | 35 | |
f8a70ece WB |
36 | .PHONY: sbuild |
37 | sbuild: $(DSC) | |
38 | sbuild $(DSC) | |
39 | ||
f76a2828 DM |
40 | .PHONY: clean |
41 | clean: | |
b0873372 | 42 | $(MAKE) -C src clean |
60cc27a5 TL |
43 | rm -rf $(PACKAGE)-[0-9]*/ |
44 | rm -f *.deb *.changes *.build *.buildinfo *.dsc $(PACKAGE)*.tar* | |
f76a2828 DM |
45 | |
46 | .PHONY: distclean | |
47 | distclean: clean | |
48 | ||
49 | .PHONY: upload | |
a2c70d78 | 50 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
d962762a | 51 | upload: $(DEB) |
a2c70d78 | 52 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) |