X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=1f0f54103d84fdb1d683646c57139a25dbf91966;hb=78e2a57c81a5ae9fa339f0a097eb23c38149f2ef;hp=50e83f6eed2b6739f3b9bb45141d4436beab6e44;hpb=6cab1417480262a841cc86365e456f20c63179e8;p=pve-cluster.git diff --git a/Makefile b/Makefile index 50e83f6..1f0f541 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,14 @@ -RELEASE=4.0 +include /usr/share/dpkg/pkg-info.mk +include /usr/share/dpkg/architecture.mk PACKAGE=pve-cluster -PKGVER=4.0 -PKGREL=11 -ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) -GITVERSION:=$(shell cat .git/refs/heads/master) - -DEB=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb -DBG_DEB=${PACKAGE}-dbg_${PKGVER}-${PKGREL}_${ARCH}.deb +GITVERSION:=$(shell git rev-parse HEAD) +DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb +DBGDEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb +PERL_APIVER := `perl -MConfig -e 'print $$Config{debian_abi}//$$Config{version};'` all: ${DEB} ${DBG_DEB} @@ -21,27 +19,22 @@ cpgtest: cpgtest.c dinstall: ${DEB} dpkg -i ${DEB} -.PHONY: ${DEB} ${DBG_DEB} -${DEB} ${DBG_DEB}: +.PHONY: deb +deb ${DBG_DEB}: ${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 + tar cf - ${DEB} ${DBG_DEB}| ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster --arch ${DEB_BUILD_ARCH} .PHONY: clean clean: - rm -rf *~ build *_${ARCH}.deb *.changes *.dsc ${CSDIR} + rm -rf *~ build *.deb *.changes *.dsc ${CSDIR} *.buildinfo