proxmox-widget-toolkit/Makefile

57 lines
1.3 KiB
Makefile
Raw Normal View History

include /usr/share/dpkg/pkg-info.mk
PACKAGE=proxmox-widget-toolkit
DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
DEV_DEB=$(PACKAGE)-dev_$(DEB_VERSION)_all.deb
DEBS=$(DEB) $(DEV_DEB)
DSC=$(PACKAGE)_$(DEB_VERSION).dsc
2017-01-30 11:57:12 +03:00
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
2017-01-30 11:57:12 +03:00
$(BUILDDIR): GITVERSION:=$(shell git rev-parse HEAD)
$(BUILDDIR):
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
cp -a src/ $(BUILDDIR).tmp
cp -a debian $(BUILDDIR).tmp/
echo "git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR).tmp/debian/SOURCE
mv $(BUILDDIR).tmp/ $(BUILDDIR)
2017-01-30 11:57:12 +03:00
.PHONY: deb
deb: $(DEBS)
$(DEBS): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEBS)
2017-01-30 11:57:12 +03:00
.PHONY: dsc
dsc: $(DSC)
$(MAKE) clean
$(MAKE) $(DSC)
lintian $(DSC)
$(DSC): $(BUILDDIR)
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
sbuild: $(DSC)
sbuild $(DSC)
2017-01-30 11:57:12 +03:00
.PHONY: lint
lint: $(JSSRC)
$(MAKE) -C src lint
2017-01-30 11:57:12 +03:00
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST)
tar cf - $(DEV_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist $(UPLOAD_DIST)
2017-01-30 11:57:12 +03:00
distclean: clean
clean:
$(MAKE) -C src clean
rm -rf $(PACKAGE)-[0-9]*/ *.tar.* *.dsc *.deb *.changes *.buildinfo *.build
2017-01-30 11:57:12 +03:00
.PHONY: dinstall
dinstall: $(DEBS)
dpkg -i $(DEBS)