From 8b0c72207caffcb2fe3a2d440e249aba33da14e2 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 22 May 2019 21:03:05 +0200 Subject: [PATCH] buildsys: use dpkg-dev makefile helpers for pkg info Signed-off-by: Thomas Lamprecht --- Makefile | 16 +++++++--------- changelog.Debian => debian/changelog | 0 2 files changed, 7 insertions(+), 9 deletions(-) rename changelog.Debian => debian/changelog (100%) diff --git a/Makefile b/Makefile index fba83b4..9bf8734 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,15 @@ -RELEASE=5.0 +include /usr/share/dpkg/pkg-info.mk +include /usr/share/dpkg/architecture.mk PACKAGE=criu -PKGVER=3.11 -DEBREL=2~bpo90 SRCDIR=criu SRCTAR=${SRCDIR}.tgz -ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) GITVERSION:=$(shell cat .git/refs/heads/master) -DEB1=${PACKAGE}_${PKGVER}-${DEBREL}_$(ARCH).deb -DEB_DBG=${PACKAGE}-dbgsym_${PKGVER}-${DEBREL}_$(ARCH).deb +DEB1=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb +DEB_DBG=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb DEBS=$(DEB1) $(DEB_DBG) all: ${DEBS} @@ -23,7 +21,7 @@ $(DEB1): $(SRCTAR) rm -rf ${SRCDIR} tar xf ${SRCTAR} mv ${SRCDIR}/debian/changelog ${SRCDIR}/debian/changelog.org - cat changelog.Debian ${SRCDIR}/debian/changelog.org > ${SRCDIR}/debian/changelog + cat debian/changelog ${SRCDIR}/debian/changelog.org > ${SRCDIR}/debian/changelog echo "git clone git://git.proxmox.com/git/criu.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE cd ${SRCDIR}; dpkg-buildpackage -b -us -uc lintian ${DEBS} @@ -38,13 +36,13 @@ download: .PHONY: upload upload: ${DEBS} - tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH} + tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${DEB_BUILD_ARCH} distclean: clean .PHONY: clean clean: - rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc *.buildinfo + rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${DEB_BUILD_ARCH}.deb *.changes *.dsc *.buildinfo find . -name '*~' -exec rm {} ';' .PHONY: dinstall diff --git a/changelog.Debian b/debian/changelog similarity index 100% rename from changelog.Debian rename to debian/changelog -- 2.39.2