From 2d805336297a1e6ab6666b1e9d0291c74b2ad986 Mon Sep 17 00:00:00 2001 From: Rhonda D'Vine Date: Fri, 28 Dec 2018 18:24:05 +0100 Subject: [PATCH] Add "make dsc" target This target is required to make the package build automatically. Signed-off-by: Rhonda D'Vine --- Makefile | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ec67f2d..7401d08 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,9 @@ PACKAGE=libpve-apiclient-perl PKGVER=2.0 PKGREL=4 +BUILDSRC := $(PACKAGE)-$(PKGVER) DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb +DSC=${PACKAGE}_${PKGVER}-${PKGREL}.dsc DESTDIR= @@ -12,16 +14,25 @@ DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE} PVE_COMMON_FILES= \ Exception.pm + all: ${DEB} +.PHONY: $(BUILDSRC) +$(BUILDSRC): + rm -rf $(BUILDSRC) + rsync -a debian $(BUILDSRC) + make DESTDIR=./$(BUILDSRC) install + .PHONY: deb -deb ${DEB}: - rm -rf build - rsync -a debian build - make DESTDIR=./build install - cd build; dpkg-buildpackage -rfakeroot -b -us -uc +deb ${DEB}: $(BUILDSRC) + cd $(BUILDSRC); dpkg-buildpackage -rfakeroot -b -us -uc lintian ${DEB} +.PHONY: dsc +dsc: $(BUILDSRC) + cd $(BUILDSRC); dpkg-buildpackage -S -us -uc -d -nc + lintian ${DSC} + install: install -D -m 0644 PVE/APIClient/LWP.pm ${PERL5DIR}/PVE/APIClient/LWP.pm install -m 0644 PVE/APIClient/Exception.pm ${PERL5DIR}/PVE/APIClient/Exception.pm @@ -41,7 +52,7 @@ upload: ${DEB} distclean: clean clean: - rm -rf ./build *.deb *.changes *.buildinfo + rm -rf ./$(BUILDSRC) *.deb *.changes *.buildinfo *.dsc *.tar.gz find . -name '*~' -exec rm {} ';' .PHONY: dinstall -- 2.39.2