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