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