]> git.proxmox.com Git - pve-network.git/blame - Makefile
buildsys: improve DSC target & add sbuild convenience target
[pve-network.git] / Makefile
CommitLineData
efe14cf0 1include /usr/share/dpkg/pkg-info.mk
0399edbb 2
efe14cf0 3PACKAGE=libpve-network-perl
0399edbb 4
0af69e3b 5BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
0399edbb 6
0af69e3b
TL
7DEB=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION)_all.deb
8DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM_REVISION).dsc
0399edbb
AD
9
10all:
0af69e3b 11 $(MAKE) -C PVE
0399edbb
AD
12
13.PHONY: dinstall
14dinstall: deb
0af69e3b 15 dpkg -i $(DEB)
0399edbb 16
0af69e3b
TL
17$(BUILDDIR): PVE debian
18 rm -rf $(BUILDDIR)
19 rsync -a * $(BUILDDIR)
20 echo "git clone git://git.proxmox.com/git/pve-network.git\\ngit checkout $(shell git rev-parse HEAD)" > $(BUILDDIR)/debian/SOURCE
0399edbb
AD
21
22.PHONY: deb
0af69e3b
TL
23deb: $(DEB)
24$(DEB): $(BUILDDIR)
25 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
26 lintian $(DEB)
0399edbb
AD
27
28.PHONY: dsc
ed8c931c
TL
29dsc: clean
30 $(MAKE) $(DSC)
31 lintian $(DSC)
32
0af69e3b 33$(DSC): $(BUILDDIR)
1867144b 34 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
ed8c931c
TL
35
36sbuild: $(DSC)
37 sbuild $(DSC)
0399edbb
AD
38
39.PHONY: clean distclean
40distclean: clean
41clean:
ed8c931c 42 rm -rf *~ *.deb *.changes $(PACKAGE)-[0-9]*/ $(PACKAGE)*.tar* *.build *.buildinfo *.dsc
0399edbb 43
82f6b09f
AD
44.PHONY: test
45test:
46 $(MAKE) -C test
0399edbb
AD
47
48.PHONY: install
49install:
0af69e3b 50 $(MAKE) -C PVE install
0399edbb
AD
51
52.PHONY: upload
0af69e3b
TL
53upload: $(DEB)
54 tar cf - $(DEB)|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye