]> git.proxmox.com Git - pve-omping.git/blobdiff - Makefile
buildsys: restructure and allow to build DSC
[pve-omping.git] / Makefile
index 4b564c82a4a9aee9e8028ae82d8f813e39594ec8..3fb2d51f5db0d1d9a9883316b0d5f339bd7dda64 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,17 +7,35 @@ PKGSRC=${PACKAGE}_${DEB_VERSION_UPSTREAM}.orig.tar.gz
 
 GITVERSION:=$(shell cat .git/refs/heads/master)
 
-DEBS= ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
+DBGDEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
+
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
+
+DEBS=${DEB} ${DBGDEB}
 
 all: ${DEBS}
 
-${DEBS}: ${PKGSRC}
+.PHONY: ${PKGDIR}
+${PKGDIR}: ${PKGSRC}
        rm -rf ${PKGDIR}
        tar xf ${PKGSRC}
        rm -rf ${PKGDIR}/debian
        cp -a debian ${PKGDIR}/debian
        echo "git clone git://git.proxmox.com/git/pve-omping.git\\ngit checkout ${GITVERSION}" > ${PKGDIR}/debian/SOURCE
+
+.PHONY: deb
+deb: ${DEBS}
+${DBGDEB}: ${DEB}
+${DEB}: ${PKGDIR}
        cd ${PKGDIR}; dpkg-buildpackage -b -us -uc
+       lintian ${DEB}
+
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${PKGDIR}
+       cd ${PKGDIR}; dpkg-buildpackage -S -us -uc -d
+       lintian ${DSC}
 
 .PHONY: upload
 upload: ${DEBS}
@@ -30,5 +48,5 @@ clean:
        rm -rf *~ *_${DEB_BUILD_ARCH}.deb *.changes *.dsc *.buildinfo ${PKGDIR}
 
 .PHONY: dinstall
-dinstall: ${DEBS}
-       dpkg -i ${DEBS}
+dinstall: ${DEB}
+       dpkg -i ${DEB}