]>
Commit | Line | Data |
---|---|---|
1 | include /usr/share/dpkg/pkg-info.mk | |
2 | ||
3 | PACKAGE=pve-container | |
4 | ||
5 | GITVERSION:=$(shell git rev-parse HEAD) | |
6 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM) | |
7 | ||
8 | DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb | |
9 | DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc | |
10 | ||
11 | all: $(DEB) | |
12 | ||
13 | .PHONY: dinstall | |
14 | dinstall: $(DEB) | |
15 | dpkg -i $(DEB) | |
16 | ||
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) | |
22 | ||
23 | .PHONY: deb | |
24 | deb: $(DEB) | |
25 | $(DEB): $(BUILDDIR) | |
26 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc | |
27 | lintian $(DEB) | |
28 | ||
29 | ||
30 | .PHONY: dsc | |
31 | dsc: $(DSC) | |
32 | $(DSC): $(BUILDDIR) | |
33 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d | |
34 | lintian $(DSC) | |
35 | ||
36 | .PHONY: sbuild | |
37 | sbuild: $(DSC) | |
38 | sbuild $(DSC) | |
39 | ||
40 | .PHONY: clean | |
41 | clean: | |
42 | $(MAKE) -C src clean | |
43 | rm -rf $(PACKAGE)-[0-9]*/ | |
44 | rm -f *.deb *.changes *.build *.buildinfo *.dsc $(PACKAGE)*.tar* | |
45 | ||
46 | .PHONY: distclean | |
47 | distclean: clean | |
48 | ||
49 | .PHONY: upload | |
50 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) | |
51 | upload: $(DEB) | |
52 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) |