]>
Commit | Line | Data |
---|---|---|
1 | PACKAGE=ceph | |
2 | VER != dpkg-parsechangelog -l changelog.Debian -Sversion | cut -d- -f1 | |
3 | PKGVER != dpkg-parsechangelog -l changelog.Debian -Sversion | |
4 | DEBREL=pve1 | |
5 | ||
6 | SRCDIR=ceph | |
7 | BUILDSRC=${SRCDIR}-${VER} | |
8 | ||
9 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) | |
10 | GITVERSION:=$(shell git rev-parse HEAD) | |
11 | ||
12 | DBG_DEBS=ceph-common-dbg_${PKGVER}_${ARCH}.deb \ | |
13 | ceph-fuse-dbg_${PKGVER}_${ARCH}.deb \ | |
14 | ceph-mds-dbg_${PKGVER}_${ARCH}.deb \ | |
15 | ceph-mgr-dbg_${PKGVER}_${ARCH}.deb \ | |
16 | ceph-mon-dbg_${PKGVER}_${ARCH}.deb \ | |
17 | ceph-osd-dbg_${PKGVER}_${ARCH}.deb \ | |
18 | ceph-test-dbg_${PKGVER}_${ARCH}.deb \ | |
19 | libcephfs2-dbg_${PKGVER}_${ARCH}.deb \ | |
20 | librados2-dbg_${PKGVER}_${ARCH}.deb \ | |
21 | libradosstriper1-dbg_${PKGVER}_${ARCH}.deb \ | |
22 | librbd1-dbg_${PKGVER}_${ARCH}.deb \ | |
23 | librgw2-dbg_${PKGVER}_${ARCH}.deb \ | |
24 | radosgw-dbg_${PKGVER}_${ARCH}.deb \ | |
25 | rbd-fuse-dbg_${PKGVER}_${ARCH}.deb \ | |
26 | rbd-mirror-dbg_${PKGVER}_${ARCH}.deb \ | |
27 | rbd-nbd-dbg_${PKGVER}_${ARCH}.deb | |
28 | ||
29 | MAIN_DEB=ceph_${PKGVER}_${ARCH}.deb | |
30 | DEBS_REST=ceph-base_${PKGVER}_${ARCH}.deb \ | |
31 | ceph-common_${PKGVER}_${ARCH}.deb \ | |
32 | ceph-fuse_${PKGVER}_${ARCH}.deb \ | |
33 | ceph-mds_${PKGVER}_${ARCH}.deb \ | |
34 | ceph-mgr_${PKGVER}_${ARCH}.deb \ | |
35 | ceph-mon_${PKGVER}_${ARCH}.deb \ | |
36 | ceph-osd_${PKGVER}_${ARCH}.deb \ | |
37 | ceph-resource-agents_${PKGVER}_${ARCH}.deb \ | |
38 | ceph-test_${PKGVER}_${ARCH}.deb \ | |
39 | libcephfs2_${PKGVER}_${ARCH}.deb \ | |
40 | libcephfs-dev_${PKGVER}_${ARCH}.deb \ | |
41 | libcephfs-java_${PKGVER}_all.deb \ | |
42 | libcephfs-jni_${PKGVER}_${ARCH}.deb \ | |
43 | librados2_${PKGVER}_${ARCH}.deb \ | |
44 | librados-dev_${PKGVER}_${ARCH}.deb \ | |
45 | libradosstriper1_${PKGVER}_${ARCH}.deb \ | |
46 | libradosstriper-dev_${PKGVER}_${ARCH}.deb \ | |
47 | librbd1_${PKGVER}_${ARCH}.deb \ | |
48 | librbd-dev_${PKGVER}_${ARCH}.deb \ | |
49 | librgw2_${PKGVER}_${ARCH}.deb \ | |
50 | librgw-dev_${PKGVER}_${ARCH}.deb \ | |
51 | python3-ceph-argparse_${PKGVER}_all.deb \ | |
52 | python3-cephfs_${PKGVER}_${ARCH}.deb \ | |
53 | python3-rados_${PKGVER}_${ARCH}.deb \ | |
54 | python3-rbd_${PKGVER}_${ARCH}.deb \ | |
55 | python3-rgw_${PKGVER}_${ARCH}.deb \ | |
56 | python3-ceph_${PKGVER}_${ARCH}.deb \ | |
57 | python3-cephfs_${PKGVER}_${ARCH}.deb \ | |
58 | python3-rados_${PKGVER}_${ARCH}.deb \ | |
59 | python3-rbd_${PKGVER}_${ARCH}.deb \ | |
60 | python3-rgw_${PKGVER}_${ARCH}.deb \ | |
61 | radosgw_${PKGVER}_${ARCH}.deb \ | |
62 | rados-objclass-dev_${PKGVER}_${ARCH}.deb \ | |
63 | rbd-fuse_${PKGVER}_${ARCH}.deb \ | |
64 | rbd-mirror_${PKGVER}_${ARCH}.deb \ | |
65 | rbd-nbd_${PKGVER}_${ARCH}.deb | |
66 | DEBS=$(MAIN_DEB) $(DEBS_REST) | |
67 | ||
68 | DSC=ceph_${PKGVER}.dsc | |
69 | ||
70 | all: ${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 | |
88 | deb: ${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 | |
96 | dsc: ${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 | |
103 | download: | |
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 | |
115 | upload: ${DEBS} | |
116 | tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product ceph-octopus --dist stretch --arch ${ARCH} | |
117 | ||
118 | distclean: clean | |
119 | ||
120 | .PHONY: clean | |
121 | clean: | |
122 | rm -rf ${BUILDSRC} ${BUILDSRC}.tmp *_all.deb *_${ARCH}.deb *.changes *.dsc *.buildinfo *.tar.gz | |
123 | ||
124 | .PHONY: dinstall | |
125 | dinstall: ${DEB} | |
126 | dpkg -i ${DEB} |