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