]> git.proxmox.com Git - proxmox-widget-toolkit.git/blob - Makefile
47c1cf1916fd0b59968d4737aebe5cb1e1c761fb
[proxmox-widget-toolkit.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=proxmox-widget-toolkit
4
5 DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
6 DEV_DEB=$(PACKAGE)-dev_$(DEB_VERSION)_all.deb
7
8 DEBS=$(DEB) $(DEV_DEB)
9 DSC=$(PACKAGE)_$(DEB_VERSION).dsc
10
11 BUILDDIR ?= $(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
22 deb: $(DEBS)
23 $(DEBS): $(BUILDDIR)
24 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
25 lintian $(DEBS)
26
27 .PHONY: dsc
28 dsc: $(DSC)
29 $(MAKE) clean
30 $(MAKE) $(DSC)
31 lintian $(DSC)
32
33 $(DSC): $(BUILDDIR)
34 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
35
36 sbuild: $(DSC)
37 sbuild $(DSC)
38
39 .PHONY: lint
40 lint: $(JSSRC)
41 $(MAKE) -C src lint
42
43 .PHONY: upload
44 upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
45 upload: $(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
49 distclean: clean
50 clean:
51 $(MAKE) -C src clean
52 rm -rf $(PACKAGE)-[0-9]*/ *.tar.* *.dsc *.deb *.changes *.buildinfo *.build
53
54 .PHONY: dinstall
55 dinstall: $(DEBS)
56 dpkg -i $(DEBS)