]> git.proxmox.com Git - proxmox-widget-toolkit.git/blame_incremental - Makefile
bump version to 4.2.3
[proxmox-widget-toolkit.git] / Makefile
... / ...
CommitLineData
1include /usr/share/dpkg/pkg-info.mk
2
3PACKAGE=proxmox-widget-toolkit
4
5DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
6DEV_DEB=$(PACKAGE)-dev_$(DEB_VERSION)_all.deb
7
8DEBS=$(DEB) $(DEV_DEB)
9DSC=$(PACKAGE)_$(DEB_VERSION).dsc
10
11BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
12
13$(BUILDDIR): GITVERSION:=$(shell git rev-parse HEAD)
14$(BUILDDIR):
15 rm -rf $(BUILDDIR) $(BUILDDIR).tmp
16 cp -a src/ $(BUILDDIR).tmp
17 cp -a debian $(BUILDDIR).tmp/
18 echo "git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR).tmp/debian/SOURCE
19 mv $(BUILDDIR).tmp/ $(BUILDDIR)
20
21.PHONY: deb
22deb: $(DEBS)
23$(DEBS): $(BUILDDIR)
24 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
25 lintian $(DEBS)
26
27.PHONY: dsc
28dsc: $(DSC)
29 $(MAKE) clean
30 $(MAKE) $(DSC)
31 lintian $(DSC)
32
33$(DSC): $(BUILDDIR)
34 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
35
36sbuild: $(DSC)
37 sbuild $(DSC)
38
39.PHONY: lint
40lint: $(JSSRC)
41 $(MAKE) -C src lint
42
43.PHONY: upload
44upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
45upload: $(DEBS)
46 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST)
47 tar cf - $(DEV_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist $(UPLOAD_DIST)
48
49distclean: clean
50clean:
51 $(MAKE) -C src clean
52 rm -rf $(PACKAGE)-[0-9]*/ *.tar.* *.dsc *.deb *.changes *.buildinfo *.build
53
54.PHONY: dinstall
55dinstall: $(DEBS)
56 dpkg -i $(DEBS)