4 export DESTDIR
=$(CURDIR
)/debian
/tmp
6 export DEB_HOST_ARCH ?
= $(shell dpkg-architecture
-qDEB_HOST_ARCH
)
8 extraopts
+= -DUSE_CRYPTOPP
=OFF
-DWITH_OCF
=ON
-DWITH_LTTNG
=ON
-DWITH_PYTHON3
=ON
-DWITH_EMBEDDED
=OFF
9 extraopts
+= -DWITH_CEPHFS_JAVA
=ON
10 # assumes that ceph is exmpt from multiarch support, so we override the libdir.
11 extraopts
+= -DCMAKE_INSTALL_LIBDIR
=/usr
/lib
12 extraopts
+= -DCMAKE_INSTALL_LIBEXECDIR
=/usr
/lib
13 extraopts
+= -DCMAKE_INSTALL_SYSCONFDIR
=/etc
14 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
15 NUMJOBS
= $(patsubst parallel
=%,%,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
16 extraopts
+= -DBOOST_J
=$(NUMJOBS
)
19 ifeq ($(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
25 ifneq (,$(filter $(DEB_HOST_ARCH
), arm armel armhf arm64 i386 amd64 mips mipsel powerpc ppc64
))
26 # beast depends on libboost_context which only support the archs above
27 extraopts
+= -DWITH_RADOSGW_BEAST_FRONTEND
=ON
29 extraopts
+= -DWITH_RADOSGW_BEAST_FRONTEND
=OFF
33 dh
$@
--buildsystem
=cmake
--with javahelper
,python2
,python3
,systemd
--parallel
35 override_dh_auto_configure
:
37 dh_auto_configure
--buildsystem
=cmake
-- $(extraopts
) $(CEPH_EXTRA_CMAKE_ARGS
)
39 override_dh_auto_build
:
40 dh_auto_build
--buildsystem
=cmake
41 cp src
/init-radosgw debian
/radosgw.init
43 override_dh_auto_clean
:
44 dh_auto_clean
--buildsystem
=cmake
45 rm -f debian
/radosgw.init debian
/ceph.logrotate
47 override_dh_auto_install
:
48 dh_auto_install
--buildsystem
=cmake
--destdir
=$(DESTDIR
)
49 install -D
-m
644 udev
/50-rbd.rules
$(DESTDIR
)/lib
/udev
/rules.d
/50-rbd.rules
50 install -D
-m
644 udev
/95-ceph-osd.rules
$(DESTDIR
)/lib
/udev
/rules.d
/95-ceph-osd.rules
51 install -D
-m
644 udev
/60-ceph-by-parttypeuuid.rules
$(DESTDIR
)/lib
/udev
/rules.d
/60-ceph-by-parttypeuuid.rules
52 install -D
-m
644 src
/etc-rbdmap
$(DESTDIR
)/etc
/ceph
/rbdmap
54 # doc/changelog is a directory, which confuses dh_installchangelogs
55 override_dh_installchangelogs
:
56 dh_installchangelogs
--exclude doc
/changelog
58 override_dh_installdocs
:
59 dh_installdocs
-a
--all ChangeLog
61 override_dh_installlogrotate
:
62 cp src
/logrotate.conf debian
/ceph-common.logrotate
63 dh_installlogrotate
-pceph-common
65 override_dh_installinit
:
66 # dh_installinit is only set up to handle one upstart script
67 # per package, so do this ourselves
68 install -d
-m0755 debian
/ceph-base
/etc
/init
69 install -m0644 src
/upstart
/ceph-all.conf debian
/ceph-base
/etc
/init
70 install -d
-m0755 debian
/ceph-osd
/etc
/init
71 install -m0644 src
/upstart
/ceph-osd
*.conf debian
/ceph-osd
/etc
/init
72 install -m0644 src
/upstart
/ceph-disk.conf debian
/ceph-osd
/etc
/init
73 install -d
-m0755 debian
/ceph-mon
/etc
/init
74 install -m0644 src
/upstart
/ceph-mon
*.conf debian
/ceph-mon
/etc
/init
75 install -d
-m0755 debian
/ceph-common
/etc
/init
76 install -m0644 src
/upstart
/rbdmap.conf debian
/ceph-common
/etc
/init
77 install -d
-m0755 debian
/ceph-mds
/etc
/init
78 install -m0644 src
/upstart
/ceph-mds
*.conf debian
/ceph-mds
/etc
/init
79 install -d
-m0755 debian
/ceph-mgr
/etc
/init
80 install -m0644 src
/upstart
/ceph-mgr
*.conf debian
/ceph-mgr
/etc
/init
81 install -d
-m0755 debian
/radosgw
/etc
/init
82 install -m0644 src
/upstart
/radosgw
*.conf debian
/radosgw
/etc
/init
83 install -d
-m0755 debian
/rbd-mirror
/etc
/init
84 install -m0644 src
/upstart
/ceph-rbd-mirror
*.conf debian
/rbd-mirror
/etc
/init
85 # install the systemd stuff manually since we have funny service names
86 install -d
-m0755 debian
/ceph-common
/lib
/systemd
/system
87 install -m0644 systemd
/ceph.target debian
/ceph-common
/lib
/systemd
/system
88 install -d
-m0755 debian
/ceph-common
/etc
/default
89 install -m0644 etc
/default
/ceph debian
/ceph-common
/etc
/default
/
90 install -d
-m0755 debian
/ceph-common
/usr
/lib
/tmpfiles.d
91 install -m
0644 -D systemd
/ceph.tmpfiles.d debian
/ceph-common
/usr
/lib
/tmpfiles.d
/ceph.conf
93 install -d
-m0755 debian
/ceph-base
/lib
/systemd
/system
94 install -d
-m0755 debian
/ceph-mon
/lib
/systemd
/system
95 install -d
-m0755 debian
/ceph-osd
/lib
/systemd
/system
96 install -m0644 systemd
/ceph-mon@.service debian
/ceph-mon
/lib
/systemd
/system
97 install -m0644 systemd
/ceph-osd@.service debian
/ceph-osd
/lib
/systemd
/system
98 install -m0644 systemd
/ceph-disk@.service debian
/ceph-osd
/lib
/systemd
/system
99 install -m0644 systemd
/rbdmap.service debian
/ceph-common
/lib
/systemd
/system
100 sed
-i s.
/etc
/sysconfig
/.
/etc
/default
/.g debian
/ceph-mon
/lib
/systemd
/system
/ceph-mon@.service
101 sed
-i s.
/etc
/sysconfig
/.
/etc
/default
/.g debian
/ceph-osd
/lib
/systemd
/system
/ceph-osd@.service
102 sed
-i s.
/etc
/sysconfig
/.
/etc
/default
/.g debian
/ceph-osd
/lib
/systemd
/system
/ceph-disk@.service
103 install -m0644 systemd
/ceph-mon.target debian
/ceph-mon
/lib
/systemd
/system
104 install -m0644 systemd
/ceph-osd.target debian
/ceph-osd
/lib
/systemd
/system
106 install -d
-m0755 debian
/ceph-mds
/lib
/systemd
/system
107 install -m0644 systemd
/ceph-mds@.service debian
/ceph-mds
/lib
/systemd
/system
108 sed
-i s.
/etc
/sysconfig
/.
/etc
/default
/.g debian
/ceph-mds
/lib
/systemd
/system
/ceph-mds@.service
109 install -m0644 systemd
/ceph-mds.target debian
/ceph-mds
/lib
/systemd
/system
111 install -d
-m0755 debian
/ceph-fuse
/lib
/systemd
/system
112 install -m0644 systemd
/ceph-fuse@.service debian
/ceph-fuse
/lib
/systemd
/system
113 sed
-i s.
/etc
/sysconfig
/.
/etc
/default
/.g debian
/ceph-fuse
/lib
/systemd
/system
/ceph-fuse@.service
114 install -m0644 systemd
/ceph-fuse.target debian
/ceph-fuse
/lib
/systemd
/system
116 install -d
-m0755 debian
/ceph-mgr
/lib
/systemd
/system
117 install -m0644 systemd
/ceph-mgr@.service debian
/ceph-mgr
/lib
/systemd
/system
118 sed
-i s.
/etc
/sysconfig
/.
/etc
/default
/.g debian
/ceph-mgr
/lib
/systemd
/system
/ceph-mgr@.service
119 install -m0644 systemd
/ceph-mgr.target debian
/ceph-mgr
/lib
/systemd
/system
121 install -d
-m0755 debian
/radosgw
/lib
/systemd
/system
122 install -m0644 systemd
/ceph-radosgw@.service debian
/radosgw
/lib
/systemd
/system
123 sed
-i s.
/etc
/sysconfig
/.
/etc
/default
/.g debian
/radosgw
/lib
/systemd
/system
/ceph-radosgw@.service
124 install -m0644 systemd
/ceph-radosgw.target debian
/radosgw
/lib
/systemd
/system
126 install -d
-m0755 debian
/rbd-mirror
/lib
/systemd
/system
127 install -m0644 systemd
/ceph-rbd-mirror@.service debian
/rbd-mirror
/lib
/systemd
/system
128 sed
-i s.
/etc
/sysconfig
/.
/etc
/default
/.g debian
/rbd-mirror
/lib
/systemd
/system
/ceph-rbd-mirror@.service
129 install -m0644 systemd
/ceph-rbd-mirror.target debian
/rbd-mirror
/lib
/systemd
/system
131 dh_installinit
-p ceph-base
--name ceph
--no-start
132 dh_installinit
-p radosgw
--no-start
134 override_dh_systemd_start
:
135 dh_systemd_start
--no-restart-on-upgrade
138 dh_strip
-pceph-mds
--dbg-package
=ceph-mds-dbg
139 dh_strip
-pceph-fuse
--dbg-package
=ceph-fuse-dbg
140 dh_strip
-pceph-mgr
--dbg-package
=ceph-mgr-dbg
141 dh_strip
-pceph-mon
--dbg-package
=ceph-mon-dbg
142 dh_strip
-pceph-osd
--dbg-package
=ceph-osd-dbg
143 dh_strip
-pceph-fuse
--dbg-package
=ceph-fuse-dbg
144 dh_strip
-prbd-fuse
--dbg-package
=rbd-fuse-dbg
145 dh_strip
-prbd-mirror
--dbg-package
=rbd-mirror-dbg
146 dh_strip
-prbd-nbd
--dbg-package
=rbd-nbd-dbg
147 dh_strip
-pceph-common
--dbg-package
=ceph-common-dbg
148 dh_strip
-plibrados2
--dbg-package
=librados2-dbg
149 dh_strip
-plibradosstriper1
--dbg-package
=libradosstriper1-dbg
150 dh_strip
-plibrbd1
--dbg-package
=librbd1-dbg
151 dh_strip
-plibcephfs2
--dbg-package
=libcephfs2-dbg
152 dh_strip
-plibrgw2
--dbg-package
=librgw2-dbg
153 dh_strip
-pradosgw
--dbg-package
=radosgw-dbg
154 dh_strip
-pceph-test
--dbg-package
=ceph-test-dbg
156 override_dh_shlibdeps
:
157 dh_shlibdeps
-a
--exclude
=erasure-code
--exclude
=rados-classes
--exclude
=compressor
160 for binding in rados cephfs rbd rgw
; do \
161 dh_python2
-p python-
$$binding; \
163 dh_python2
-p ceph-common
164 dh_python2
-p ceph-base
165 dh_python2
-p ceph-osd
166 dh_python2
-p ceph-mgr
169 for binding in rados cephfs rbd rgw
; do \
170 dh_python3
-p python3-
$$binding; \
172 dh_python3
-p python3-ceph-argparse
175 override_dh_auto_test
:
177 .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