]> git.proxmox.com Git - corosync-pve.git/blob - Makefile
buildsys: make job safety
[corosync-pve.git] / Makefile
1 RELEASE=4.2
2
3 # source from http://www.corosync.org
4
5 CSVERSION=2.4.0
6 CSRELEASE=1
7 CSDIR=corosync-${CSVERSION}
8 CSSRC=corosync-${CSVERSION}.tar.gz
9
10 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
11 GITVERSION:=$(shell cat .git/refs/heads/master)
12
13 DEB1 := corosync-pve_${CSVERSION}-${CSRELEASE}_${ARCH}.deb
14
15 DEB2 := libcorosync4-pve_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
16 libcorosync-pve-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb
17
18 DEBS := $(DEB1) $(DEB2)
19
20 all: ${DEBS}
21 echo ${DEBS}
22
23 $(DEB2): $(DEB1)
24
25 ${DEB1}: ${CSSRC}
26 rm -rf ${CSDIR}
27 tar xf ${CSSRC}
28 cp -a debian ${CSDIR}/debian
29 echo "git clone git://git.proxmox.com/git/corosync-pve.git\\ngit checkout ${GITVERSION}" > ${CSDIR}/debian/SOURCE
30
31 cd ${CSDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
32
33 .PHONY: download
34 download:
35 rm -rf ${CSSRC} ${CSSRC}.tmp ${CSDIR}
36 # wget http://build.clusterlabs.org/corosync/releases/${CSSRC}
37 git clone https://github.com/corosync/corosync.git -b needle ${CSDIR}
38 #cd ${CSDIR}; git checkout v${CSVERSION}
39 cd ${CSDIR}; ./autogen.sh
40 tar czf ${CSSRC}.tmp ${CSDIR}
41 mv ${CSSRC}.tmp ${CSSRC}
42
43 .PHONY: upload
44 upload: ${DEBS}
45 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload
46
47 distclean: clean
48
49 .PHONY: clean
50 clean:
51 rm -rf *_${ARCH}.deb *.changes *.dsc ${CSDIR} corosync_${CSVERSION}-${CSRELEASE}.tar.gz
52 find . -name '*~' -exec rm {} ';'
53
54 .PHONY: dinstall
55 dinstall: ${DEBS}
56 dpkg -i ${DEBS}