]> git.proxmox.com Git - corosync-pve.git/blobdiff - Makefile
bump version to 2.4.2-2~pve4+2
[corosync-pve.git] / Makefile
index 9cb30725773664939395632d035572086e79f983..a80e9ddc035685abf5b02fd32b7d3968f504695e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,48 +1,56 @@
-RELEASE=2.0
+RELEASE=4.2
 
-CSVERSION=1.4.1
-CSRELEASE=1
+# source from http://www.corosync.org
+
+CSVERSION=2.4.2
+CSRELEASE=2~pve4+2
 CSDIR=corosync-${CSVERSION}
-CSSRC=corosync-${CSVERSION}.orig.tar.gz
+CSSRC=corosync-${CSVERSION}.tar.gz
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+GITVERSION:=$(shell cat .git/refs/heads/master)
+
+DEB1 := corosync-pve_${CSVERSION}-${CSRELEASE}_${ARCH}.deb
 
-DEBS=                                                                  \
-       corosync-pve_${CSVERSION}-${CSRELEASE}_${ARCH}.deb              \
-       libcorosync4-pve_${CSVERSION}-${CSRELEASE}_${ARCH}.deb          \
+DEB2 := libcorosync4-pve_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
        libcorosync-pve-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb
 
+DEBS := $(DEB1) $(DEB2)
+
 all: ${DEBS}
        echo ${DEBS}
 
-${DEBS}: ${CSSRC}
-       echo ${DEBS}
+.PHONY: deb
+deb: $(DEB1)
+$(DEB2): $(DEB1)
+${DEB1}: ${CSSRC}
        rm -rf ${CSDIR}
        tar xf ${CSSRC} 
        cp -a debian ${CSDIR}/debian
-       cd ${CSDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
+       echo "git clone git://git.proxmox.com/git/corosync-pve.git\\ngit checkout ${GITVERSION}" >  ${CSDIR}/debian/SOURCE
 
-download:
-       rm -rf corosync-${CSVERSION} corosync-${CSVERSION}.orig.tar.gz
-       git clone git://corosync.org/corosync.git -b flatiron-1.4 corosync-${CSVERSION}
-       cd corosync-${CSVERSION}; ./autogen.sh
-       tar czf corosync-${CSVERSION}.orig.tar.gz corosync-${CSVERSION}/
+       cd ${CSDIR}; dpkg-buildpackage -b -us -uc
 
+.PHONY: download
+download:
+       rm -rf ${CSSRC} ${CSSRC}.tmp ${CSDIR}
+       # wget http://build.clusterlabs.org/corosync/releases/${CSSRC}
+       git clone https://github.com/corosync/corosync.git  -b needle ${CSDIR}
+       cd ${CSDIR}; git checkout v${CSVERSION}
+       cd ${CSDIR}; ./autogen.sh
+       tar czf ${CSSRC}.tmp ${CSDIR}
+       mv ${CSSRC}.tmp ${CSSRC}
 
 .PHONY: upload
 upload: ${DEBS}
-       umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw 
-       mkdir -p /pve/${RELEASE}/extra
-       rm -f /pve/${RELEASE}/extra/corosync*.deb
-       rm -f /pve/${RELEASE}/extra/libcorosync*.deb
-       rm -f /pve/${RELEASE}/extra/Packages*
-       cp ${DEBS} /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 - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist jessie --arch ${ARCH}
+
+distclean: clean
 
 .PHONY: clean
 clean:
        rm -rf *_${ARCH}.deb *.changes *.dsc ${CSDIR} corosync_${CSVERSION}-${CSRELEASE}.tar.gz
+       find . -name '*~' -exec rm {} ';'
 
 .PHONY: dinstall
 dinstall: ${DEBS}