]>
Commit | Line | Data |
---|---|---|
05466a9d | 1 | include /usr/share/dpkg/pkg-info.mk |
6a672919 | 2 | |
05466a9d | 3 | PACKAGE=pmg-api |
6a672919 | 4 | |
0d7181b2 | 5 | BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION) |
07cb898d | 6 | |
1e361608 | 7 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc |
1d825e5f | 8 | DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb |
9beff9f6 | 9 | |
05466a9d | 10 | REPOID = $(shell git rev-parse --short=8 HEAD) |
6a672919 | 11 | |
05466a9d TL |
12 | export PACKAGE |
13 | export REPOID | |
1d825e5f | 14 | export PMGVERSION = $(DEB_VERSION_UPSTREAM_REVISION) |
750e1872 | 15 | export PMGRELEASE = $(shell echo $(DEB_VERSION_UPSTREAM) | cut -c 1-3) |
b68dfb61 | 16 | |
0d7181b2 TL |
17 | $(BUILDDIR): src debian |
18 | rm -rf $@ $@.tmp | |
19 | cp -a src $@.tmp | |
20 | cp -a debian $@.tmp/ | |
21 | mv $@.tmp $@ | |
22 | ||
b68dfb61 | 23 | .PHONY: deb |
0d7181b2 TL |
24 | deb: $(DEB) |
25 | $(DEB): $(BUILDDIR) | |
1d825e5f TL |
26 | cd $(BUILDDIR); dpkg-buildpackage -b -us -uc |
27 | lintian $(DEB) | |
b68dfb61 | 28 | |
1e361608 TL |
29 | dsc: |
30 | rm -rf $(BUILDDIR) $(DSC) | |
31 | $(MAKE) $(DSC) | |
32 | lintian $(DSC) | |
33 | $(DSC): $(BUILDDIR) | |
34 | cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d | |
35 | ||
36 | sbuild: $(DSC) | |
37 | sbuild $< | |
38 | ||
b68dfb61 | 39 | .PHONY: upload |
750e1872 | 40 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
1d825e5f | 41 | upload: $(DEB) |
750e1872 | 42 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist $(UPLOAD_DIST) |
b68dfb61 | 43 | |
291abd89 DM |
44 | .PHONY: check |
45 | check: | |
3f324565 | 46 | $(MAKE) -C src/tests check |
291abd89 | 47 | |
05466a9d | 48 | .PHONY: clean distclean |
b68dfb61 | 49 | distclean: clean |
b68dfb61 | 50 | clean: |
f823e22d TL |
51 | rm -rf $(PACKAGE)-[0-9]*/ |
52 | rm -rf *.deb *.changes *.build *.buildinfo $(PACKAGE)*tar* *.dsc | |
b68dfb61 DM |
53 | |
54 | .PHONY: dinstall | |
1d825e5f TL |
55 | dinstall: $(DEB) |
56 | dpkg -i $(DEB) |