buildsys: cleanup and add target to build DSC
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 2 Apr 2019 09:36:13 +0000 (11:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 2 Apr 2019 09:36:13 +0000 (11:36 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
debian/control
debian/source/format [new file with mode: 0644]

index 15fd84d..21816ed 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@ VERSION=5.1
 PACKAGE=libpve-access-control
 PKGREL=5
 
+BUILDDIR ?= ${PACKAGE}-${VERSION}
+
 DESTDIR=
 PREFIX=/usr
 BINDIR=${PREFIX}/bin
@@ -20,6 +22,7 @@ ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell cat .git/refs/heads/master)
 
 DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
+DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
 
 # this requires package pve-doc-generator
 export NOVIEW=1
@@ -58,23 +61,32 @@ test:
        perl -I. ./pveum verifyapi
        perl -I. -T -e "use PVE::CLI::pveum; PVE::CLI::pveum->verify_api();"
 
+${BUILDDIR}:
+       rm -rf ${BUILDDIR}
+       rsync -a * ${BUILDDIR}
+       echo "git clone git://git.proxmox.com/git/pve-access-control.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
+
 .PHONY: deb
 deb: ${DEB}
-${DEB}:
-       rm -rf build
-       rsync -a * build
-       echo "git clone git://git.proxmox.com/git/pve-access-control.git\\ngit checkout ${GITVERSION}" >build/debian/SOURCE
-       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
+       lintian ${DSC}
+
 .PHONY: upload
 upload: ${DEB}
        tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
 
 .PHONY: clean
 clean:
+       rm -rf ${BUILDDIR}
        make cleanup-docgen
-       rm -rf build *.deb *.buildinfo *.changes
+       rm -rf *.deb *.buildinfo *.changes ${PACKAGE}*.tar.gz *.dsc
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: distclean
index a174d02..2622c9e 100644 (file)
@@ -10,13 +10,12 @@ Build-Depends: debhelper (>= 9.0.0~),
                perl (>= 5.10.0-19),
                pve-cluster,
                pve-doc-generator (>= 5.3-3),
-Standards-Version: 3.9.5
+Standards-Version: 3.9.8
 Homepage: http://www.proxmox.com
 
 Package: libpve-access-control
 Architecture: any
 Depends: libauthen-pam-perl,
-         libc6 (>= 2.3),
          libcrypt-openssl-random-perl,
          libcrypt-openssl-rsa-perl,
          libjson-perl,
@@ -29,6 +28,7 @@ Depends: libauthen-pam-perl,
          libwww-perl,
          perl (>= 5.6.0-16),
          pve-cluster (>= 5.0-34),
+         ${misc:Depends},
          ${perl:Depends},
 Description: Proxmox VE access control library
  This package contains the role based user management and access
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..d3827e7
--- /dev/null
@@ -0,0 +1 @@
+1.0