]> git.proxmox.com Git - libpve-u2f-server-perl.git/blobdiff - Makefile
bump version to 1.2.0
[libpve-u2f-server-perl.git] / Makefile
index 9b68e0279cd2ac0ef09ca263ae9f5b4f9fd653f5..c98fdbb03941222535a7c9abc3628bb0e649aa89 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ include /usr/share/dpkg/architecture.mk
 
 PACKAGE=libpve-u2f-server-perl
 
-BUILDSRC := $(PACKAGE)-$(DEB_VERSION)
+BUILDDIR := $(PACKAGE)-$(DEB_VERSION)
 
 DESTDIR=
 PREFIX=/usr
@@ -48,8 +48,7 @@ install: PVE/U2F.pm U2F.so
        install -D -m 0644 PVE/U2F.pm $(DESTDIR)$(PERLDIR)/PVE/U2F.pm
        install -D -m 0644 -s U2F.so $(DESTDIR)$(PERLSODIR)/PVE/U2F/U2F.so
 
-.PHONY: $(BUILDSRC)
-$(BUILDSRC):
+$(BUILDDIR):
        rm -rf $@ $@.tmp
        mkdir $@.tmp
        cp -a debian Makefile PVE U2F.xs base64.h $@.tmp/
@@ -58,24 +57,31 @@ $(BUILDSRC):
 
 .PHONY: deb
 deb: $(DEB)
-$(DEB): $(BUILDSRC)
-       cd $(BUILDSRC); dpkg-buildpackage -b -us -uc
+$(DEB): $(BUILDDIR)
+       cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
        lintian $(DEB)
 
 .PHONY: dsc
 dsc: $(DSC)
-$(DSC): $(BUILDSRC)
-       cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc
+       rm -rf $(BUILDDIR) $(DSC)
+       $(MAKE) $(DSC)
        lintian $(DSC)
 
+$(DSC): $(BUILDDIR)
+       cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
+
+sbuild: $(DSC)
+       sbuild $(DSC)
+
 .PHONY: clean
 clean:
-       rm -rf *~ $(BUILDSRC) *.deb *.changes *.buildinfo *.dsc *.tar.gz
+       rm -rf *~ $(PACKAGE)-[0-9]*/ *.deb *.changes *.buildinfo *.build *.dsc $(PACKAGE)*.tar*
 
 .PHONY: distclean
 distclean: clean
 
 
 .PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
 upload: $(DEB)
-       tar cf - $(DEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist bullseye --arch $(DEB_HOST_ARCH)
+       tar cf - $(DEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)