]> git.proxmox.com Git - ifupdown2.git/blob - Makefile
bump version to 3.2.0-1+pmx8
[ifupdown2.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=ifupdown2
4
5 SRCDIR=ifupdown2
6 BUILDDIR=$(SRCDIR)-$(DEB_VERSION)
7
8 GITVERSION:=$(shell git rev-parse HEAD)
9
10 ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
11 DSC=$(PACKAGE)_$(DEB_VERSION).dsc
12 DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
13
14 all: $(DEB)
15 @echo $(DEB)
16
17 .PHONY: submodule
18 submodule:
19 test -f "$(SRCDIR)/debian/changelog" || git submodule update --init
20
21 buildir: $(BUILDDIR)
22 $(BUILDDIR): submodule
23 rm -rf $@ $@.tmp
24 cp -a $(SRCDIR)/ $@.tmp/
25 rm -rf $@.tmp/debian
26 cp -a debian $@.tmp/
27 mv $@.tmp $@
28
29 .PHONY: deb dsc
30 deb: $(DEB)
31 $(DEB): $(BUILDDIR)
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
40
41 sbuild: $(DSC)
42 sbuild $(DSC)
43
44 .PHONY: upload
45 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
46 upload: $(DEB)
47 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST)
48
49 .PHONY: distclean clean
50 distclean: clean
51 clean:
52 rm -rf $(PACKAGE)-*/ *.deb *.dsc *.changes *.buildinfo *.build $(PACKAGE)*.tar.*
53
54 .PHONY: dinstall
55 dinstall: deb
56 dpkg -i $(DEB)