X-Git-Url: https://git.proxmox.com/?p=pve-cluster.git;a=blobdiff_plain;f=Makefile;h=ea4c36a8aa032a75f051a8df0775bad1db0349fa;hp=0586cf4a3c378f1b3e123d6ecc131c19a9edf4a6;hb=b5e2b244dd794e982811e37bff05c7559b800087;hpb=22c1bf565506e6e41b9a11751c39b90f0fb3115c diff --git a/Makefile b/Makefile index 0586cf4..ea4c36a 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,18 @@ -RELEASE=4.2 +include /usr/share/dpkg/pkg-info.mk +include /usr/share/dpkg/architecture.mk PACKAGE=pve-cluster -PKGVER=4.0 -PKGREL=42 -ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) -GITVERSION:=$(shell cat .git/refs/heads/master) +GITVERSION:=$(shell git rev-parse HEAD) -DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb -DBG_DEB=${PACKAGE}-dbg_${PKGVER}-${PKGREL}_${ARCH}.deb +DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb +LIBDEB = libpve-cluster-perl_${DEB_VERSION_UPSTREAM_REVISION}_all.deb +LIBDEB += libpve-cluster-api-perl_${DEB_VERSION_UPSTREAM_REVISION}_all.deb +DBGDEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb +DEBS = ${DEB} ${DBG_DEB} ${LIBDEB} +PERL_APIVER := `perl -MConfig -e 'print $$Config{debian_abi}//$$Config{version};'` all: ${DEB} ${DBG_DEB} @@ -18,31 +20,25 @@ cpgtest: cpgtest.c gcc -Wall cpgtest.c $(shell pkg-config --cflags --libs libcpg libqb) -o cpgtest .PHONY: dinstall -dinstall: ${DEB} - dpkg -i ${DEB} +dinstall: ${DEB} ${LIBDEB} + dpkg -i $^ .PHONY: deb -deb ${DEB} ${DBG_DEB}: +deb ${DBG_DEB} ${LIBDEB}: ${DEB} +${DEB}: rm -f *.deb rm -rf build - rsync -a --exclude .svn data/ build + cp -a data build cp -a debian build/debian echo "git clone git://git.proxmox.com/git/pve-cluster.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE - cd build; ./autogen.sh cd build; dpkg-buildpackage -rfakeroot -b -us -uc lintian ${DEB} .PHONY: upload -upload: ${DEB} ${DBG_DEB} - umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw - mkdir -p /pve/${RELEASE}/extra - rm -f /pve/${RELEASE}/extra/${PACKAGE}*.deb - rm -f /pve/${RELEASE}/extra/Packages* - cp ${DEB} ${DBG_DEB} /pve/${RELEASE}/extra - cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz - umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro +upload: ${DEBS} + tar cf - ${DEBS} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye --arch ${DEB_BUILD_ARCH} .PHONY: clean clean: - rm -rf *~ build *_${ARCH}.deb *.changes *.dsc ${CSDIR} + rm -rf *~ build *.deb *.changes *.dsc *.buildinfo