]> git.proxmox.com Git - ceph.git/blob - Makefile
bump version to 18.2.2-pve1
[ceph.git] / Makefile
1 PACKAGE=ceph
2
3 VER != dpkg-parsechangelog -l changelog.Debian -Sversion | cut -d- -f1
4 PKGVER != dpkg-parsechangelog -l changelog.Debian -Sversion
5
6 DEBREL=pve1
7
8 SRCDIR=ceph
9 BUILDSRC=${SRCDIR}-${VER}
10
11 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
12 GITVERSION:=$(shell git rev-parse HEAD)
13
14 DBG_DEBS=ceph-common-dbg_${PKGVER}_${ARCH}.deb \
15 ceph-fuse-dbg_${PKGVER}_${ARCH}.deb \
16 ceph-mds-dbg_${PKGVER}_${ARCH}.deb \
17 ceph-mgr-dbg_${PKGVER}_${ARCH}.deb \
18 ceph-mon-dbg_${PKGVER}_${ARCH}.deb \
19 ceph-osd-dbg_${PKGVER}_${ARCH}.deb \
20 ceph-test-dbg_${PKGVER}_${ARCH}.deb \
21 libcephfs2-dbg_${PKGVER}_${ARCH}.deb \
22 librados2-dbg_${PKGVER}_${ARCH}.deb \
23 libradosstriper1-dbg_${PKGVER}_${ARCH}.deb \
24 librbd1-dbg_${PKGVER}_${ARCH}.deb \
25 librgw2-dbg_${PKGVER}_${ARCH}.deb \
26 radosgw-dbg_${PKGVER}_${ARCH}.deb \
27 rbd-fuse-dbg_${PKGVER}_${ARCH}.deb \
28 rbd-mirror-dbg_${PKGVER}_${ARCH}.deb \
29 rbd-nbd-dbg_${PKGVER}_${ARCH}.deb
30
31 MAIN_DEB=ceph_${PKGVER}_${ARCH}.deb
32 DEBS_REST=ceph-base_${PKGVER}_${ARCH}.deb \
33 ceph-common_${PKGVER}_${ARCH}.deb \
34 ceph-fuse_${PKGVER}_${ARCH}.deb \
35 ceph-mds_${PKGVER}_${ARCH}.deb \
36 ceph-mgr_${PKGVER}_${ARCH}.deb \
37 ceph-mon_${PKGVER}_${ARCH}.deb \
38 ceph-osd_${PKGVER}_${ARCH}.deb \
39 ceph-resource-agents_${PKGVER}_${ARCH}.deb \
40 ceph-test_${PKGVER}_${ARCH}.deb \
41 libcephfs2_${PKGVER}_${ARCH}.deb \
42 libcephfs-dev_${PKGVER}_${ARCH}.deb \
43 libcephfs-java_${PKGVER}_all.deb \
44 libcephfs-jni_${PKGVER}_${ARCH}.deb \
45 librados2_${PKGVER}_${ARCH}.deb \
46 librados-dev_${PKGVER}_${ARCH}.deb \
47 libradosstriper1_${PKGVER}_${ARCH}.deb \
48 libradosstriper-dev_${PKGVER}_${ARCH}.deb \
49 librbd1_${PKGVER}_${ARCH}.deb \
50 librbd-dev_${PKGVER}_${ARCH}.deb \
51 librgw2_${PKGVER}_${ARCH}.deb \
52 librgw-dev_${PKGVER}_${ARCH}.deb \
53 python3-ceph-argparse_${PKGVER}_all.deb \
54 python3-cephfs_${PKGVER}_${ARCH}.deb \
55 python3-rados_${PKGVER}_${ARCH}.deb \
56 python3-rbd_${PKGVER}_${ARCH}.deb \
57 python3-rgw_${PKGVER}_${ARCH}.deb \
58 python3-ceph_${PKGVER}_${ARCH}.deb \
59 python3-cephfs_${PKGVER}_${ARCH}.deb \
60 python3-rados_${PKGVER}_${ARCH}.deb \
61 python3-rbd_${PKGVER}_${ARCH}.deb \
62 python3-rgw_${PKGVER}_${ARCH}.deb \
63 radosgw_${PKGVER}_${ARCH}.deb \
64 rados-objclass-dev_${PKGVER}_${ARCH}.deb \
65 rbd-fuse_${PKGVER}_${ARCH}.deb \
66 rbd-mirror_${PKGVER}_${ARCH}.deb \
67 rbd-nbd_${PKGVER}_${ARCH}.deb
68 DEBS=$(MAIN_DEB) $(DEBS_REST)
69
70 DSC=ceph_${PKGVER}.dsc
71
72 all: ${DEBS} ${DBG_DEBS}
73 @echo ${DEBS}
74 @echo ${DBG_DEBS}
75
76 ${BUILDSRC}: ${SRCDIR} patches
77 rm -rf $@
78 mkdir $@.tmp
79 rsync -ra ${SRCDIR}/ $@.tmp
80 cd $@.tmp; ln -s ../patches patches
81 cd $@.tmp; quilt push -a
82 cd $@.tmp; rm -rf .pc ./patches
83 echo "git clone git://git.proxmox.com/git/ceph.git\\ngit checkout ${GITVERSION}" > $@.tmp/debian/SOURCE
84 echo "debian/SOURCE" >> $@.tmp/debian/docs
85 echo "${GITVERSION}\\n${VER}" > $@.tmp/src/.git_version
86 cp changelog.Debian $@.tmp/debian/changelog
87 mv $@.tmp $@
88
89 .PHONY: deb
90 deb: ${DEBS} ${DBG_DEBS}
91 ${DEBS_REST} ${DBG_DEBS}: $(MAIN_DEB)
92 $(MAIN_DEB): ${BUILDSRC}
93 cd ${BUILDSRC}; dpkg-buildpackage -b -uc -us
94 lintian ${DEBS}
95 @echo ${DEBS}
96
97 .PHONY: dsc
98 dsc: ${DSC}
99 ${DSC}: ${BUILDSRC}
100 cd ${BUILDSRC}; dpkg-buildpackage -S -uc -us -d -nc
101 @echo ${DSC}
102
103 # NOTE: always downloads latest version!
104 .PHONY: download
105 download:
106 rm -rf ${SRCDIR}.tmp ${SRCDIR}
107 dgit -cdgit-distro.ceph.archive-query=aptget: -cdgit-distro.ceph.mirror=http://download.ceph.com/debian-reef -cdgit-distro.ceph.git-check=false --apt-get:--option=Dir::Etc::Trusted=${CURDIR}/upstream-key.asc -d ceph clone ceph jammy ./${SRCDIR}.tmp
108 @echo "WARNING"
109 @echo "Check output above for verification errors!"
110 @echo "WARNING"
111 rm -rf ${SRCDIR}.tmp/.git
112 find ${SRCDIR}.tmp/ -type f -name '.gitignore' -delete
113 mv ${SRCDIR}.tmp/debian/changelog ${SRCDIR}.tmp/changelog.upstream
114 mv ${SRCDIR}.tmp ${SRCDIR}
115
116 .PHONY: upload
117 upload: ${DEBS}
118 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product ceph-pacific --dist bullseye --arch ${ARCH}
119
120 distclean: clean
121
122 .PHONY: clean
123 clean:
124 rm -rf ${BUILDSRC} ${BUILDSRC}.tmp *_all.deb *_${ARCH}.deb *.changes *.dsc *.buildinfo *.tar.gz
125
126 .PHONY: dinstall
127 dinstall: ${DEB}
128 dpkg -i ${DEB}