From 627130a2164950d086379a7190576e4b64cda9b5 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sun, 31 Mar 2019 15:52:20 +0200 Subject: [PATCH] buildsys: add dsc target Signed-off-by: Thomas Lamprecht --- Makefile | 23 ++++++++++++++++------- debian/control | 4 +++- debian/source/format | 1 + 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 debian/source/format diff --git a/Makefile b/Makefile index 4b6518c..996c39a 100644 --- a/Makefile +++ b/Makefile @@ -10,12 +10,13 @@ MAN8DIR=${DESTDIR}/usr/share/man/man8 DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE} WORKDIR=${DESTDIR}/var/lib/pve-zsync -BUILDDIR=build +BUILDDIR ?= ${PACKAGE}-${VERSION} ARCH=all GITVERSION:=$(shell git rev-parse HEAD) DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb +DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc all: @@ -34,19 +35,27 @@ install: pve-zsync.8 install -d ${MAN8DIR} install -m 0644 pve-zsync.8 ${MAN8DIR}/pve-zsync.8 install -d ${DOCDIR} - echo "git clone git://git.proxmox.com/git/pve-zsync.git\\ngit checkout ${GITVERSION}" > ${DOCDIR}/SOURCE + +${BUILDDIR}: + rm -rf ${BUILDDIR} + rsync -a * ${BUILDDIR} + echo "git clone git://git.proxmox.com/git/dab.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE .PHONY: deb deb: ${DEB} -${DEB}: - rm -rf ${BUILDDIR} - rsync -a * build - cd build; dpkg-buildpackage -b -us -uc +${DEB}: ${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc lintian ${DEB} +.PHONY: dsc +dsc: ${DSC} +${DSC}:${BUILDDIR} + cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc + lintian ${DSC} + .PHONY: clean clean: - rm -rf ${BUILDDIR} *.deb *.buildinfo *.changes + rm -rf ${BUILDDIR} *.deb *.dsc ${PACKAGE}*.tar.gz *.buildinfo *.changes find . -name '*~' -exec rm {} ';' .PHONY: distclean diff --git a/debian/control b/debian/control index 50597b4..c29f1bb 100644 --- a/debian/control +++ b/debian/control @@ -2,12 +2,14 @@ Source: pve-zsync Section: perl Priority: optional Maintainer: Proxmox Support Team -Standards-Version: 3.8.4 +Build-Depends: debhelper (>= 10~) +Standards-Version: 3.9.8 Package: pve-zsync Section: perl Priority: optional Architecture: all Depends: ${perl:Depends}, + ${misc:Depends} Description: Proxmox VE ZFS syncing tool Tool for automated syncing of ZFS subvolumes and pools. diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0