2008-01-28 23:33:37 +00:00
|
|
|
#!/usr/bin/make -f
|
2009-05-11 18:01:50 +00:00
|
|
|
# -*- makefile -*-
|
2008-07-24 17:14:08 +00:00
|
|
|
export DH_VERBOSE=1
|
2010-11-30 17:13:54 +00:00
|
|
|
export DESTDIR=$(CURDIR)/debian/tmp
|
|
|
|
|
2011-03-20 07:23:22 +00:00
|
|
|
export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
2018-08-05 19:50:59 +00:00
|
|
|
ifneq (,$(findstring WITH_STATIC_LIBSTDCXX,$(CEPH_EXTRA_CMAKE_ARGS)))
|
|
|
|
# dh_auto_build sets LDFLAGS with `dpkg-buildflags --get LDFLAGS` on ubuntu,
|
|
|
|
# which makes the application aborts when the shared library throws
|
|
|
|
# exception, so strip this linker option,
|
|
|
|
# see http://tracker.ceph.com/issues/25209
|
|
|
|
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
|
|
|
|
endif
|
2019-06-13 08:28:29 +00:00
|
|
|
ifeq (,$(findstring WITH_SEASTAR,$(CEPH_EXTRA_CMAKE_ARGS)))
|
|
|
|
export CEPH_OSD_BASENAME = ceph-osd
|
|
|
|
else
|
|
|
|
export CEPH_OSD_BASENAME = crimson-osd
|
|
|
|
endif
|
2011-03-20 07:23:22 +00:00
|
|
|
|
2018-08-08 16:50:00 +00:00
|
|
|
extraopts += -DWITH_OCF=ON -DWITH_LTTNG=ON
|
|
|
|
extraopts += -DWITH_PYTHON3=ON -DWITH_MGR_DASHBOARD_FRONTEND=OFF
|
2018-02-27 08:42:48 +00:00
|
|
|
extraopts += -DWITH_CEPHFS_JAVA=ON
|
2018-08-08 16:50:00 +00:00
|
|
|
extraopts += -DWITH_CEPHFS_SHELL=ON
|
2018-02-27 08:42:48 +00:00
|
|
|
extraopts += -DWITH_SYSTEMD=ON -DCEPH_SYSTEMD_ENV_DIR=/etc/default
|
2016-05-20 18:18:46 +00:00
|
|
|
# assumes that ceph is exmpt from multiarch support, so we override the libdir.
|
|
|
|
extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib
|
2016-07-01 18:12:47 +00:00
|
|
|
extraopts += -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib
|
2016-06-24 20:35:30 +00:00
|
|
|
extraopts += -DCMAKE_INSTALL_SYSCONFDIR=/etc
|
2018-02-27 07:27:18 +00:00
|
|
|
extraopts += -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=/lib/systemd/system
|
2017-03-23 23:36:53 +00:00
|
|
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
extraopts += -DBOOST_J=$(NUMJOBS)
|
|
|
|
endif
|
2014-07-29 22:38:18 +00:00
|
|
|
|
2017-05-26 05:07:46 +00:00
|
|
|
ifneq (,$(filter $(DEB_HOST_ARCH), arm armel armhf arm64 i386 amd64 mips mipsel powerpc ppc64))
|
2017-11-26 20:46:26 +00:00
|
|
|
# libboost_context only support the archs above
|
|
|
|
extraopts += -DWITH_BOOST_CONTEXT=ON
|
2017-05-26 05:07:46 +00:00
|
|
|
else
|
2017-11-26 20:46:26 +00:00
|
|
|
extraopts += -DWITH_BOOST_CONTEXT=OFF
|
2017-05-26 05:07:46 +00:00
|
|
|
endif
|
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
%:
|
2016-08-19 02:31:40 +00:00
|
|
|
dh $@ --buildsystem=cmake --with javahelper,python2,python3,systemd --parallel
|
2009-05-11 18:01:50 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_auto_configure:
|
2016-12-02 19:05:20 +00:00
|
|
|
env | sort
|
2016-05-20 18:18:46 +00:00
|
|
|
dh_auto_configure --buildsystem=cmake -- $(extraopts) $(CEPH_EXTRA_CMAKE_ARGS)
|
2012-02-27 04:45:52 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_auto_build:
|
2016-05-20 18:18:46 +00:00
|
|
|
dh_auto_build --buildsystem=cmake
|
2011-09-26 18:04:25 +00:00
|
|
|
cp src/init-radosgw debian/radosgw.init
|
2009-05-11 18:01:50 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_auto_clean:
|
2016-05-20 18:18:46 +00:00
|
|
|
dh_auto_clean --buildsystem=cmake
|
|
|
|
rm -f debian/radosgw.init debian/ceph.logrotate
|
2010-11-30 17:13:54 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_auto_install:
|
2016-05-20 18:18:46 +00:00
|
|
|
dh_auto_install --buildsystem=cmake --destdir=$(DESTDIR)
|
2011-03-11 17:43:14 +00:00
|
|
|
install -D -m 644 udev/50-rbd.rules $(DESTDIR)/lib/udev/rules.d/50-rbd.rules
|
2015-10-30 17:33:36 +00:00
|
|
|
install -D -m 644 src/etc-rbdmap $(DESTDIR)/etc/ceph/rbdmap
|
2017-11-14 14:55:39 +00:00
|
|
|
install -D -m 644 etc/sysctl/90-ceph-osd.conf $(DESTDIR)/etc/sysctl.d/30-ceph-osd.conf
|
2018-06-27 20:17:29 +00:00
|
|
|
install -D -m 600 sudoers.d/ceph-osd-smartctl $(DESTDIR)/etc/sudoers.d/ceph-osd-smartctl
|
2008-01-28 23:33:37 +00:00
|
|
|
|
2019-10-03 21:24:39 +00:00
|
|
|
install -m 755 src/ceph-daemon $(DESTDIR)/usr/sbin/ceph-daemon
|
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
# doc/changelog is a directory, which confuses dh_installchangelogs
|
|
|
|
override_dh_installchangelogs:
|
|
|
|
dh_installchangelogs --exclude doc/changelog
|
|
|
|
|
|
|
|
override_dh_installdocs:
|
2016-04-22 13:07:58 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_installlogrotate:
|
2017-06-06 10:20:06 +00:00
|
|
|
cp src/logrotate.conf debian/ceph-common.logrotate
|
|
|
|
dh_installlogrotate -pceph-common
|
2016-05-20 15:45:20 +00:00
|
|
|
|
|
|
|
override_dh_installinit:
|
2015-09-05 13:14:15 +00:00
|
|
|
# install the systemd stuff manually since we have funny service names
|
2016-04-28 20:48:52 +00:00
|
|
|
install -d -m0755 debian/ceph-common/etc/default
|
|
|
|
install -m0644 etc/default/ceph debian/ceph-common/etc/default/
|
2015-09-06 18:18:16 +00:00
|
|
|
install -d -m0755 debian/ceph-common/usr/lib/tmpfiles.d
|
|
|
|
install -m 0644 -D systemd/ceph.tmpfiles.d debian/ceph-common/usr/lib/tmpfiles.d/ceph.conf
|
2015-09-05 13:14:15 +00:00
|
|
|
|
2016-04-22 13:07:58 +00:00
|
|
|
dh_installinit -p ceph-base --name ceph --no-start
|
|
|
|
dh_installinit -p radosgw --no-start
|
2016-03-18 19:09:21 +00:00
|
|
|
|
2017-07-07 16:18:27 +00:00
|
|
|
# NOTE: execute systemd helpers so they pickup dh_install'ed units and targets
|
|
|
|
dh_systemd_enable
|
2016-05-20 15:45:20 +00:00
|
|
|
dh_systemd_start --no-restart-on-upgrade
|
2009-10-28 20:16:34 +00:00
|
|
|
|
2017-07-07 16:18:27 +00:00
|
|
|
override_dh_systemd_enable:
|
|
|
|
# systemd enable done as part of dh_installinit
|
|
|
|
|
|
|
|
override_dh_systemd_start:
|
|
|
|
# systemd start done as part of dh_installinit
|
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_strip:
|
2012-07-03 16:20:35 +00:00
|
|
|
dh_strip -pceph-mds --dbg-package=ceph-mds-dbg
|
2016-10-19 00:20:34 +00:00
|
|
|
dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg
|
2016-09-26 21:42:56 +00:00
|
|
|
dh_strip -pceph-mgr --dbg-package=ceph-mgr-dbg
|
2016-02-11 17:59:15 +00:00
|
|
|
dh_strip -pceph-mon --dbg-package=ceph-mon-dbg
|
|
|
|
dh_strip -pceph-osd --dbg-package=ceph-osd-dbg
|
2018-01-09 14:37:15 +00:00
|
|
|
dh_strip -pceph-base --dbg-package=ceph-base-dbg
|
2013-02-01 04:35:26 +00:00
|
|
|
dh_strip -prbd-fuse --dbg-package=rbd-fuse-dbg
|
2016-02-04 07:44:10 +00:00
|
|
|
dh_strip -prbd-mirror --dbg-package=rbd-mirror-dbg
|
2018-12-29 08:50:44 +00:00
|
|
|
dh_strip -pceph-immutable-object-cache --dbg-package=ceph-immutable-object-cache-dbg
|
2015-11-13 09:31:00 +00:00
|
|
|
dh_strip -prbd-nbd --dbg-package=rbd-nbd-dbg
|
2011-09-27 17:02:47 +00:00
|
|
|
dh_strip -pceph-common --dbg-package=ceph-common-dbg
|
2019-02-03 16:28:37 +00:00
|
|
|
dh_strip -plibrados2 --dbg-package=librados2-dbg
|
2014-05-26 14:31:08 +00:00
|
|
|
dh_strip -plibradosstriper1 --dbg-package=libradosstriper1-dbg
|
2011-02-02 01:09:08 +00:00
|
|
|
dh_strip -plibrbd1 --dbg-package=librbd1-dbg
|
2016-10-24 14:03:01 +00:00
|
|
|
dh_strip -plibcephfs2 --dbg-package=libcephfs2-dbg
|
2016-02-03 22:44:02 +00:00
|
|
|
dh_strip -plibrgw2 --dbg-package=librgw2-dbg
|
2010-11-30 17:13:54 +00:00
|
|
|
dh_strip -pradosgw --dbg-package=radosgw-dbg
|
2012-11-07 00:23:18 +00:00
|
|
|
dh_strip -pceph-test --dbg-package=ceph-test-dbg
|
2018-01-09 15:40:06 +00:00
|
|
|
dh_strip -ppython-rados --dbg-package=python-rados-dbg
|
|
|
|
dh_strip -ppython3-rados --dbg-package=python3-rados-dbg
|
|
|
|
dh_strip -ppython-rbd --dbg-package=python-rbd-dbg
|
|
|
|
dh_strip -ppython3-rbd --dbg-package=python3-rbd-dbg
|
|
|
|
dh_strip -ppython-rgw --dbg-package=python-rgw-dbg
|
|
|
|
dh_strip -ppython3-rgw --dbg-package=python3-rgw-dbg
|
|
|
|
dh_strip -ppython-cephfs --dbg-package=python-cephfs-dbg
|
|
|
|
dh_strip -ppython3-cephfs --dbg-package=python3-cephfs-dbg
|
2009-10-28 20:16:34 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_shlibdeps:
|
2016-10-15 08:54:52 +00:00
|
|
|
dh_shlibdeps -a --exclude=erasure-code --exclude=rados-classes --exclude=compressor
|
2010-11-30 17:13:54 +00:00
|
|
|
|
2016-07-17 08:56:59 +00:00
|
|
|
override_dh_python2:
|
2016-12-01 16:31:36 +00:00
|
|
|
for binding in rados cephfs rbd rgw; do \
|
|
|
|
dh_python2 -p python-$$binding; \
|
2016-07-17 08:56:59 +00:00
|
|
|
done
|
|
|
|
dh_python2 -p ceph-common
|
|
|
|
dh_python2 -p ceph-base
|
|
|
|
dh_python2 -p ceph-osd
|
2016-10-15 08:54:52 +00:00
|
|
|
dh_python2 -p ceph-mgr
|
2018-08-16 01:32:22 +00:00
|
|
|
# batch-compile, and set up for delete, all the module files
|
|
|
|
dh_python2 -p ceph-mgr usr/lib/ceph/mgr
|
2019-11-01 07:01:16 +00:00
|
|
|
dh_python2 -p ceph-daemon
|
2016-07-17 08:56:59 +00:00
|
|
|
|
2016-08-19 02:31:40 +00:00
|
|
|
override_dh_python3:
|
2016-12-01 16:31:36 +00:00
|
|
|
for binding in rados cephfs rbd rgw; do \
|
|
|
|
dh_python3 -p python3-$$binding; \
|
2016-08-19 02:31:40 +00:00
|
|
|
done
|
|
|
|
dh_python3 -p python3-ceph-argparse
|
2019-07-10 12:07:44 +00:00
|
|
|
dh_python3 -p python3-ceph-common
|
2018-08-08 16:50:00 +00:00
|
|
|
dh_python3 -p cephfs-shell
|
2016-08-19 02:31:40 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
# do not run tests
|
|
|
|
override_dh_auto_test:
|
|
|
|
|
|
|
|
.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
|