]> git.proxmox.com Git - pve-zsync.git/blobdiff - Makefile
Revert "fix: check for incremental sync snapshot."
[pve-zsync.git] / Makefile
index 4b6518c03ae1f1db099330fcd8a5b26d165c570f..d5bbe9787f64a0fff8ad133f612595b3e21a58b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
-RELEASE=5.3
+include /usr/share/dpkg/pkg-info.mk
 
-VERSION=1.7
 PACKAGE=pve-zsync
-PKGREL=3
 
 DESTDIR=
 SBINDIR=${DESTDIR}/usr/sbin
@@ -10,12 +8,12 @@ MAN8DIR=${DESTDIR}/usr/share/man/man8
 DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
 WORKDIR=${DESTDIR}/var/lib/pve-zsync
 
-BUILDDIR=build
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
 
-ARCH=all
 GITVERSION:=$(shell git rev-parse HEAD)
 
-DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
 
 all:
 
@@ -24,7 +22,7 @@ dinstall: deb
        dpkg -i ${DEB}
 
 pve-zsync.8: pve-zsync
-       ./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r ${RELEASE} -n pve-zsync - pve-zsync.8
+       ./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r ${DEB_VERSION_UPSTREAM} -n pve-zsync - pve-zsync.8
 
 .PHONY: install
 install: pve-zsync.8
@@ -34,19 +32,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
@@ -55,4 +61,4 @@ distclean: clean
 
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch
+       tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload --product pve --dist buster