]> git.proxmox.com Git - ceph.git/blame - ceph/debian/rules
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / debian / rules
CommitLineData
7c673cae
FG
1#!/usr/bin/make -f
2# -*- makefile -*-
3export DH_VERBOSE=1
4export DESTDIR=$(CURDIR)/debian/tmp
5
6export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
7
8extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_EMBEDDED=OFF
9extraopts += -DWITH_CEPHFS_JAVA=ON
10# assumes that ceph is exmpt from multiarch support, so we override the libdir.
11extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib
12extraopts += -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib
13extraopts += -DCMAKE_INSTALL_SYSCONFDIR=/etc
14ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
15 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
16 extraopts += -DBOOST_J=$(NUMJOBS)
17endif
18
19ifeq ($(DEB_HOST_ARCH), armel)
20 # armel supports ARMv4t or above instructions sets.
21 # libatomic-ops is only usable with Ceph for ARMv6 or above.
22 extraopts += -DWITH_ATOMIC_OPS=OFF
23endif
24
25%:
26 dh $@ --buildsystem=cmake --with javahelper,python2,python3,systemd --parallel
27
28override_dh_auto_configure:
29 env | sort
30 dh_auto_configure --buildsystem=cmake -- $(extraopts) $(CEPH_EXTRA_CMAKE_ARGS)
31
32override_dh_auto_build:
33 dh_auto_build --buildsystem=cmake
34 cp src/init-radosgw debian/radosgw.init
35
36override_dh_auto_clean:
37 dh_auto_clean --buildsystem=cmake
38 rm -f debian/radosgw.init debian/ceph.logrotate
39
40override_dh_auto_install:
41 dh_auto_install --buildsystem=cmake --destdir=$(DESTDIR)
42 install -D -m 644 udev/50-rbd.rules $(DESTDIR)/lib/udev/rules.d/50-rbd.rules
43 install -D -m 644 udev/95-ceph-osd.rules $(DESTDIR)/lib/udev/rules.d/95-ceph-osd.rules
44 install -D -m 644 udev/60-ceph-by-parttypeuuid.rules $(DESTDIR)/lib/udev/rules.d/60-ceph-by-parttypeuuid.rules
45 install -D -m 644 src/etc-rbdmap $(DESTDIR)/etc/ceph/rbdmap
46
47# doc/changelog is a directory, which confuses dh_installchangelogs
48override_dh_installchangelogs:
49 dh_installchangelogs --exclude doc/changelog
50
51override_dh_installdocs:
52 dh_installdocs -a --all ChangeLog
53
54override_dh_installlogrotate:
55 cp src/logrotate.conf debian/ceph-base.ceph.logrotate
56 dh_installlogrotate -pceph-base --name=ceph
57
58override_dh_installinit:
59 # dh_installinit is only set up to handle one upstart script
60 # per package, so do this ourselves
61 install -d -m0755 debian/ceph-base/etc/init
62 install -m0644 src/upstart/ceph-all.conf debian/ceph-base/etc/init
63 install -d -m0755 debian/ceph-osd/etc/init
64 install -m0644 src/upstart/ceph-osd*.conf debian/ceph-osd/etc/init
65 install -m0644 src/upstart/ceph-disk.conf debian/ceph-osd/etc/init
66 install -d -m0755 debian/ceph-mon/etc/init
67 install -m0644 src/upstart/ceph-mon*.conf debian/ceph-mon/etc/init
68 install -d -m0755 debian/ceph-common/etc/init
69 install -m0644 src/upstart/rbdmap.conf debian/ceph-common/etc/init
70 install -d -m0755 debian/ceph-mds/etc/init
71 install -m0644 src/upstart/ceph-mds*.conf debian/ceph-mds/etc/init
72 install -d -m0755 debian/ceph-mgr/etc/init
73 install -m0644 src/upstart/ceph-mgr*.conf debian/ceph-mgr/etc/init
74 install -d -m0755 debian/radosgw/etc/init
75 install -m0644 src/upstart/radosgw*.conf debian/radosgw/etc/init
76 install -d -m0755 debian/rbd-mirror/etc/init
77 install -m0644 src/upstart/ceph-rbd-mirror*.conf debian/rbd-mirror/etc/init
78 # install the systemd stuff manually since we have funny service names
79 install -d -m0755 debian/ceph-common/lib/systemd/system
80 install -m0644 systemd/ceph.target debian/ceph-common/lib/systemd/system
81 install -d -m0755 debian/ceph-common/etc/default
82 install -m0644 etc/default/ceph debian/ceph-common/etc/default/
83 install -d -m0755 debian/ceph-common/usr/lib/tmpfiles.d
84 install -m 0644 -D systemd/ceph.tmpfiles.d debian/ceph-common/usr/lib/tmpfiles.d/ceph.conf
85
86 install -d -m0755 debian/ceph-base/lib/systemd/system
87 install -d -m0755 debian/ceph-mon/lib/systemd/system
88 install -d -m0755 debian/ceph-osd/lib/systemd/system
89 install -m0644 systemd/ceph-mon@.service debian/ceph-mon/lib/systemd/system
90 install -m0644 systemd/ceph-osd@.service debian/ceph-osd/lib/systemd/system
91 install -m0644 systemd/ceph-disk@.service debian/ceph-osd/lib/systemd/system
92 install -m0644 systemd/rbdmap.service debian/ceph-common/lib/systemd/system
93 sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mon/lib/systemd/system/ceph-mon@.service
94 sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-osd/lib/systemd/system/ceph-osd@.service
95 sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-osd/lib/systemd/system/ceph-disk@.service
96 install -m0644 systemd/ceph-mon.target debian/ceph-mon/lib/systemd/system
97 install -m0644 systemd/ceph-osd.target debian/ceph-osd/lib/systemd/system
98
99 install -d -m0755 debian/ceph-mds/lib/systemd/system
100 install -m0644 systemd/ceph-mds@.service debian/ceph-mds/lib/systemd/system
101 sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mds/lib/systemd/system/ceph-mds@.service
102 install -m0644 systemd/ceph-mds.target debian/ceph-mds/lib/systemd/system
103
104 install -d -m0755 debian/ceph-fuse/lib/systemd/system
105 install -m0644 systemd/ceph-fuse@.service debian/ceph-fuse/lib/systemd/system
106 sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-fuse/lib/systemd/system/ceph-fuse@.service
107 install -m0644 systemd/ceph-fuse.target debian/ceph-fuse/lib/systemd/system
108
109 install -d -m0755 debian/ceph-mgr/lib/systemd/system
110 install -m0644 systemd/ceph-mgr@.service debian/ceph-mgr/lib/systemd/system
111 sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mgr/lib/systemd/system/ceph-mgr@.service
112 install -m0644 systemd/ceph-mgr.target debian/ceph-mgr/lib/systemd/system
113
114 install -d -m0755 debian/radosgw/lib/systemd/system
115 install -m0644 systemd/ceph-radosgw@.service debian/radosgw/lib/systemd/system
116 sed -i s./etc/sysconfig/./etc/default/.g debian/radosgw/lib/systemd/system/ceph-radosgw@.service
117 install -m0644 systemd/ceph-radosgw.target debian/radosgw/lib/systemd/system
118
119 install -d -m0755 debian/rbd-mirror/lib/systemd/system
120 install -m0644 systemd/ceph-rbd-mirror@.service debian/rbd-mirror/lib/systemd/system
121 sed -i s./etc/sysconfig/./etc/default/.g debian/rbd-mirror/lib/systemd/system/ceph-rbd-mirror@.service
122 install -m0644 systemd/ceph-rbd-mirror.target debian/rbd-mirror/lib/systemd/system
123
124 dh_installinit -p ceph-base --name ceph --no-start
125 dh_installinit -p radosgw --no-start
126
127override_dh_systemd_start:
128 dh_systemd_start --no-restart-on-upgrade
129
130override_dh_strip:
131 dh_strip -pceph-mds --dbg-package=ceph-mds-dbg
132 dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg
133 dh_strip -pceph-mgr --dbg-package=ceph-mgr-dbg
134 dh_strip -pceph-mon --dbg-package=ceph-mon-dbg
135 dh_strip -pceph-osd --dbg-package=ceph-osd-dbg
136 dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg
137 dh_strip -prbd-fuse --dbg-package=rbd-fuse-dbg
138 dh_strip -prbd-mirror --dbg-package=rbd-mirror-dbg
139 dh_strip -prbd-nbd --dbg-package=rbd-nbd-dbg
140 dh_strip -pceph-common --dbg-package=ceph-common-dbg
141 dh_strip -plibrados2 --dbg-package=librados2-dbg
142 dh_strip -plibradosstriper1 --dbg-package=libradosstriper1-dbg
143 dh_strip -plibrbd1 --dbg-package=librbd1-dbg
144 dh_strip -plibcephfs2 --dbg-package=libcephfs2-dbg
145 dh_strip -plibrgw2 --dbg-package=librgw2-dbg
146 dh_strip -pradosgw --dbg-package=radosgw-dbg
147 dh_strip -pceph-test --dbg-package=ceph-test-dbg
148
149override_dh_shlibdeps:
150 dh_shlibdeps -a --exclude=erasure-code --exclude=rados-classes --exclude=compressor
151
152override_dh_python2:
153 for binding in rados cephfs rbd rgw; do \
154 dh_python2 -p python-$$binding; \
155 done
156 dh_python2 -p ceph-common
157 dh_python2 -p ceph-base
158 dh_python2 -p ceph-osd
159 dh_python2 -p ceph-mgr
160
161override_dh_python3:
162 for binding in rados cephfs rbd rgw; do \
163 dh_python3 -p python3-$$binding; \
164 done
165 dh_python3 -p python3-ceph-argparse
166
167# do not run tests
168override_dh_auto_test:
169
170.PHONY: override_dh_autoreconf override_dh_auto_configure override_dh_auto_build override_dh_auto_clean override_dh_auto_install override_dh_installdocs override_dh_installlogrotate override_dh_installinit override_dh_systemd_start override_dh_strip override_dh_auto_test