]>
Commit | Line | Data |
---|---|---|
1 | include /usr/share/dpkg/pkg-info.mk | |
2 | ||
3 | PACKAGE=libpve-guest-common-perl | |
4 | ||
5 | DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb | |
6 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc | |
7 | ||
8 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION) | |
9 | ||
10 | all: | |
11 | ||
12 | $(BUILDDIR): | |
13 | rm -rf $@ $@.tmp | |
14 | cp -a src $@.tmp | |
15 | cp -a debian $@.tmp/ | |
16 | echo "git clone git://git.proxmox.com/git/pve-guest-common.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE | |
17 | mv $@.tmp $@ | |
18 | ||
19 | .PHONY: deb | |
20 | deb: $(DEB) | |
21 | $(DEB): $(BUILDDIR) | |
22 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc | |
23 | lintian $(DEB) | |
24 | ||
25 | .PHONY: dsc | |
26 | dsc: | |
27 | $(MAKE) $(DSC) | |
28 | lintian $(DSC) | |
29 | ||
30 | $(DSC): $(BUILDDIR) | |
31 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d -nc | |
32 | ||
33 | sbuild: $(DSC) | |
34 | sbuild $(DSC) | |
35 | ||
36 | .PHONY: upload | |
37 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) | |
38 | upload: $(DEB) | |
39 | tar cf - $(DEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) | |
40 | ||
41 | distclean: clean | |
42 | clean: | |
43 | rm -rf $(PACKAGE)-[0-9]*/ *.deb *.dsc *.changes *.buildinfo *.build $(PACKAGE)*.tar* | |
44 | ||
45 | .PHONY: dinstall | |
46 | dinstall: $(DEB) | |
47 | dpkg -i $(DEB) |