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