]> git.proxmox.com Git - pve-apiclient.git/commitdiff
Add "make dsc" target
authorRhonda D'Vine <rhonda@proxmox.com>
Fri, 28 Dec 2018 17:24:05 +0000 (18:24 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 3 Jan 2019 07:49:52 +0000 (08:49 +0100)
This target is required to make the package build automatically.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
Makefile

index ec67f2d5239e5370cba490209a070118eaa1ae9b..7401d08da273510ab459dd62ddbd2285ef9e49be 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@ PACKAGE=libpve-apiclient-perl
 PKGVER=2.0
 PKGREL=4
 
 PKGVER=2.0
 PKGREL=4
 
+BUILDSRC := $(PACKAGE)-$(PKGVER)
 DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
 DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
+DSC=${PACKAGE}_${PKGVER}-${PKGREL}.dsc
 
 DESTDIR=
 
 
 DESTDIR=
 
@@ -12,16 +14,25 @@ DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
 PVE_COMMON_FILES=              \
        Exception.pm
 
 PVE_COMMON_FILES=              \
        Exception.pm
 
+
 all: ${DEB}
 
 all: ${DEB}
 
+.PHONY: $(BUILDSRC)
+$(BUILDSRC):
+       rm -rf $(BUILDSRC)
+       rsync -a debian $(BUILDSRC)
+       make DESTDIR=./$(BUILDSRC) install
+
 .PHONY: deb
 .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}
 
        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
 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:
 distclean: clean
 
 clean:
-       rm -rf ./build *.deb *.changes *.buildinfo
+       rm -rf ./$(BUILDSRC) *.deb *.changes *.buildinfo *.dsc *.tar.gz
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: dinstall
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: dinstall