]> git.proxmox.com Git - pve-ha-manager.git/blobdiff - Makefile
Add missing Dependencies to pve-ha-simulator
[pve-ha-manager.git] / Makefile
index b406f3fea7d7f9272fe2dd9d48412a8653e66dd3..f33d3635f5d04e2239c093f538fa19592c4d0e39 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,51 +1,45 @@
-VERSION=2.0
+include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/architecture.mk
+
 PACKAGE=pve-ha-manager
 SIMPACKAGE=pve-ha-simulator
-PKGREL=5
 
 GITVERSION:=$(shell git rev-parse HEAD)
+BUILDDIR ?= ${PACKAGE}-${VERSION}
 
-ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-
-DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
-SIMDEB=${SIMPACKAGE}_${VERSION}-${PKGREL}_all.deb
-
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
+SIMDEB=${SIMPACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+SIMDSC=${SIMPACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
 
 all: deb
 
+${BUILDDIR}:
+       rm -rf ${BUILDDIR}
+       rsync -a src/ debian ${BUILDDIR}
+       echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
+
 .PHONY: dinstall
 dinstall: $(DEB) $(SIMDEB)
        dpkg -i ${DEB} ${SIMDEB}
 
-
-.PHONY: simdeb
-simdeb: ${SIMDEB}
-${SIMDEB}:
-       rm -rf build
-       mkdir build
-       rsync -a src/ build
-       rsync -a simdebian/ build/debian
-       cp changelog.Debian build/debian/changelog
-       echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
-       cd build; dpkg-buildpackage -rfakeroot -b -us -uc
-       lintian ${SIMDEB}
-
 .PHONY: deb
 deb: ${DEB} ${SIMDEB}
-${DEB}:
-       rm -rf build
-       mkdir build
-       rsync -a src/ build
-       rsync -a debian/ build/debian
-       cp changelog.Debian build/debian/changelog
-       echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
-       cd build; dpkg-buildpackage -rfakeroot -b -us -uc
+${DEB}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
        lintian ${DEB}
+       lintian ${SIMDEB}
+
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDDIR}
+       cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
+       lintian ${DSC}
 
 .PHONY: clean
 clean:
        make -C src clean
-       rm -rf build *.deb ${PACKAGE}-*.tar.gz *.changes *.buildinfo
+       rm -rf ${BUILDDIR} *.tar.gz *.dsc *.deb ${PACKAGE}-*.tar.gz *.changes *.buildinfo
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: distclean
@@ -53,5 +47,5 @@ distclean: clean
 
 .PHONY: upload
 upload: ${DEB} ${SIMDEB}
-       tar cf - ${DEB} ${SIMDEB}|ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
+       tar cf - ${DEB} ${SIMDEB}|ssh repoman@repo.proxmox.com -- upload --product pve --dist buster --arch ${ARCH}