X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=2829539594829afaa6075c200e4c8448bb97a686;hb=6e7cef49231efa0f8919ed75ffba03afb96e3c62;hp=c1ae57c40c2831796ef926475b871b856f7fde2f;hpb=8df08859c4a8eabf7c0a0757aee5e116c53e05f9;p=pve-manager.git diff --git a/Makefile b/Makefile index c1ae57c4..28295395 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,17 @@ -include /usr/share/dpkg/pkg-info.mk -include /usr/share/dpkg/architecture.mk +include /usr/share/dpkg/default.mk include defines.mk -export PVERELEASE=$(DEB_VERSION_UPSTREAM) -export VERSION=$(DEB_VERSION_UPSTREAM_REVISION) - -DESTDIR= - -SUBDIRS = aplinfo PVE bin www services configs network-hooks test - -GITVERSION:=$(shell git rev-parse --short=16 HEAD) - +export PVERELEASE = $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d. -f1-2) +export VERSION = $(DEB_VERSION_UPSTREAM_REVISION) BUILDDIR = $(PACKAGE)-$(DEB_VERSION_UPSTREAM) +DSC=$(PACKAGE)_$(DEB_VERSION).dsc DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb +DESTDIR= +SUBDIRS = aplinfo PVE bin www services configs network-hooks test + all: $(SUBDIRS) set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i; done @@ -25,10 +21,7 @@ check: bin test www $(MAKE) -C test check $(MAKE) -C www check -.PHONY: dinstall -dinstall: $(DEB) - dpkg -i $(DEB) - +GITVERSION:=$(shell git rev-parse --short=16 HEAD) $(BUILDDIR): rm -rf $@ $@.tmp mkdir $@.tmp @@ -37,17 +30,26 @@ $(BUILDDIR): echo "REPOID_GENERATED=$(GITVERSION)" > $@.tmp/debian/rules.env mv $@.tmp $@ -.PHONY: deb +.PHONY: deb dsc deb: $(DEB) $(DEB): $(BUILDDIR) cd $(BUILDDIR); dpkg-buildpackage -b -us -uc lintian $(DEB) +dsc: + rm -rf $(BUILDDIR) $(DSC) + $(MAKE) $(DSC) + lintian $(DSC) +$(DSC): $(BUILDDIR) + cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d + +sbuild: $(DSC) + sbuild $< + .PHONY: upload -upload: $(DEB) check - # check if working directory is clean - git diff --exit-code --stat && git diff --exit-code --stat --staged - tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye +upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) +upload: $(DEB) + tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST) .PHONY: install install: vzdump-hook-script.pl @@ -67,5 +69,9 @@ distclean: clean .PHONY: clean clean: set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done - rm -f country.dat *.deb *.buildinfo *.changes + rm -f $(PACKAGE)*.tar* country.dat *.deb *.dsc *.build *.buildinfo *.changes rm -rf dest $(PACKAGE)-[0-9]*/ + +.PHONY: dinstall +dinstall: $(DEB) + dpkg -i $(DEB)