]> git.proxmox.com Git - novnc-pve.git/blobdiff - Makefile
add DSC source package and fix its reported lintian errors
[novnc-pve.git] / Makefile
index 427ac9fe967ca62a64a707e21daddd9aad6ec6b3..6eea569f3f577789e7afd88685f0d817d4a3b2dc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,41 @@
+include /usr/share/dpkg/pkg-info.mk
+
 PACKAGE=novnc-pve
-VER=0.6
-PKGREL=4
 
 SRCDIR=novnc
 BUILDDIR=${SRCDIR}.tmp
 
-ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-
 GITVERSION:=$(shell git rev-parse HEAD)
 
-DEB=${PACKAGE}_${VER}-${PKGREL}_${ARCH}.deb
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
 
 all: ${DEB}
        @echo ${DEB}
 
-.PHONY: deb
-deb: ${DEB}
-${DEB}: | submodule
+${SRCDIR}/vnc.html: submodule
+${BUILDDIR}: $(SRCDIR)/vnc.html
        rm -rf ${BUILDDIR}
        cp -rpa ${SRCDIR} ${BUILDDIR}
        cp -a debian ${BUILDDIR}
        echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
-       cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
+
+.PHONY: deb
+deb: ${DEB}
+${DEB}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us
        lintian ${DEB}
        @echo ${DEB}
 
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -S -uc -us -d
+       lintian ${DSC}
+
 .PHONY: submodule
 submodule:
-       test -f "${SRCDIR}/vnc.html" || git submodule update --init
+       git submodule update --init
 
 .PHONY: download
 download ${SRCDIR}: