]> git.proxmox.com Git - corosync-pve.git/blame - Makefile
build: add new build artifacts to clean target
[corosync-pve.git] / Makefile
CommitLineData
3dbd0db6 1RELEASE=5.0
930e051d 2
07d9b3a0 3# source from http://www.corosync.org
aeb347a9 4
82342947 5CSVERSION=2.4.4
013929b6 6CSRELEASE=pve5
a56af624 7DEBRELEASE=3
930e051d 8CSDIR=corosync-${CSVERSION}
82342947 9CSSRC=corosync_${CSVERSION}.orig.tar.gz
930e051d
DM
10
11ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
5aa0e5ba 12GITVERSION:=$(shell cat .git/refs/heads/master)
930e051d 13
87af17c7
FG
14MAIN_DEB=corosync-pve_${CSVERSION}-${CSRELEASE}_all.deb
15
16OTHER_DEBS=\
571ea76e 17libcorosync4-pve_${CSVERSION}-${CSRELEASE}_all.deb \
a56af624
FG
18corosync_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
19corosync-notifyd_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
20corosync-qdevice_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
21corosync-qnetd_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
22corosync-doc_${CSVERSION}-${CSRELEASE}_all.deb \
23corosync-dev_${CSVERSION}-${CSRELEASE}_all.deb \
24libcfg6_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
25libcmap4_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
26libcorosync-common4_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
27libcpg4_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
28libquorum5_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
29libsam4_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
30libtotem-pg5_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
31libvotequorum8_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
32libcfg-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
33libcmap-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
34libcorosync-common-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
35libcpg-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
36libquorum-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
37libsam-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
38libtotem-pg-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
87af17c7
FG
39libvotequorum-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
40
41DBG_DEBS=\
42corosync-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
43corosync-notifyd-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
44corosync-qdevice-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
45corosync-qnetd-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
46libcfg6-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
47libcmap4-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
48libcorosync-common4-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
49libcpg4-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
50libquorum5-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
51libsam4-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
52libtotem-pg5-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
53libvotequorum8-dbgsym_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
54
55DEBS=${MAIN_DEB} ${OTHER_DEBS} ${DBG_DEBS}
153f62cc 56
fa002c64
FG
57DSC=corosync-pve_${CSVERSION}-${CSRELEASE}.dsc
58
930e051d
DM
59all: ${DEBS}
60 echo ${DEBS}
61
fa002c64
FG
62${CSDIR}: ${CSSRC} patches changelog.Debian
63 rm -rf $@ $@.tmp
64 mkdir $@.tmp
65 tar -C $@.tmp --strip-components=1 -xf ${CSSRC}
66 mv $@.tmp/debian/changelog $@.tmp/debian/changelog.org
67 cat changelog.Debian $@.tmp/debian/changelog.org > $@.tmp/debian/changelog
68 cd $@.tmp; ln -s ../patches patches
69 cd $@.tmp; quilt push -a
70 cd $@.tmp; rm -rf .pc ./patches
71 mv $@.tmp $@
72
2507e204 73.PHONY: deb
a56af624 74deb: ${DEBS}
87af17c7
FG
75${OTHER_DEBS} ${DBG_DEBS}: ${MAIN_DEB}
76${MAIN_DEB}: ${CSDIR}
a56af624 77 cd ${CSDIR}; dpkg-buildpackage -b -us -uc
930e051d 78
fa002c64
FG
79.PHONY: dsc
80dsc: ${DSC}
81${DSC}: ${CSDIR}
82 cd ${CSDIR}; dpkg-buildpackage -S -us -uc -d -nc
83
013101f0
DM
84.PHONY: download
85download:
df03257c 86 rm -rf ${CSSRC} ${CSSRC}.tmp ${CSDIR}
82342947 87 git clone https://salsa.debian.org/ha-team/corosync.git -b debian/${CSVERSION}-${DEBRELEASE} ${CSDIR}
d05fb358
DM
88 tar czf ${CSSRC}.tmp ${CSDIR}
89 mv ${CSSRC}.tmp ${CSSRC}
013101f0 90
930e051d
DM
91.PHONY: upload
92upload: ${DEBS}
bd751c12 93 tar cf - ${DEBS} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
930e051d 94
01f3ad04
DM
95distclean: clean
96
930e051d
DM
97.PHONY: clean
98clean:
dc3e3124 99 rm -rf *.deb *.changes *.dsc *.buildinfo ${CSDIR} *.debian.tar.xz
6e49b83c 100 find . -name '*~' -exec rm {} ';'
930e051d
DM
101
102.PHONY: dinstall
103dinstall: ${DEBS}
104 dpkg -i ${DEBS}