]>
Commit | Line | Data |
---|---|---|
1d5643c4 TL |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | ||
51419183 | 3 | PACKAGE=ifupdown2 |
51419183 AD |
4 | |
5 | SRCDIR=ifupdown2 | |
4fb10245 | 6 | BUILDDIR=$(SRCDIR)-$(DEB_VERSION) |
51419183 | 7 | |
51419183 AD |
8 | GITVERSION:=$(shell git rev-parse HEAD) |
9 | ||
e668a427 TL |
10 | ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz |
11 | DSC=$(PACKAGE)_$(DEB_VERSION).dsc | |
4fb10245 | 12 | DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb |
51419183 | 13 | |
6e7ad15f TL |
14 | all: $(DEB) |
15 | @echo $(DEB) | |
51419183 AD |
16 | |
17 | .PHONY: submodule | |
18 | submodule: | |
6e7ad15f | 19 | test -f "$(SRCDIR)/debian/changelog" || git submodule update --init |
51419183 | 20 | |
6e7ad15f TL |
21 | buildir: $(BUILDDIR) |
22 | $(BUILDDIR): submodule | |
c4159c1c TL |
23 | rm -rf $@ $@.tmp |
24 | cp -a $(SRCDIR)/ $@.tmp/ | |
25 | rm -rf $@.tmp/debian | |
26 | cp -a debian $@.tmp/ | |
27 | mv $@.tmp $@ | |
08415f37 | 28 | |
e668a427 | 29 | .PHONY: deb dsc |
6e7ad15f TL |
30 | deb: $(DEB) |
31 | $(DEB): $(BUILDDIR) | |
e668a427 TL |
32 | cd $(BUILDDIR); dpkg-buildpackage -b -uc -us |
33 | ||
34 | $(ORIG_SRC_TAR): $(BUILDDIR) | |
35 | tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR) | |
36 | ||
37 | dsc: $(DSC) | |
38 | $(DSC): $(BUILDDIR) $(ORIG_SRC_TAR) | |
39 | cd $(BUILDDIR); dpkg-buildpackage -S -uc -us -d | |
51419183 | 40 | |
3a7603f0 TL |
41 | sbuild: $(DSC) |
42 | sbuild $(DSC) | |
43 | ||
51419183 | 44 | .PHONY: upload |
a5071898 | 45 | upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) |
6e7ad15f | 46 | upload: $(DEB) |
a5071898 | 47 | tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST) |
51419183 | 48 | |
6e7ad15f | 49 | .PHONY: distclean clean |
51419183 | 50 | distclean: clean |
51419183 | 51 | clean: |
e668a427 | 52 | rm -rf $(PACKAGE)-*/ *.deb *.dsc *.changes *.buildinfo *.build $(PACKAGE)*.tar.* |
51419183 AD |
53 | |
54 | .PHONY: dinstall | |
55 | dinstall: deb | |
6e7ad15f | 56 | dpkg -i $(DEB) |