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)
|
|
|
|
|
2016-11-05 01:10:08 +00:00
|
|
|
extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON -DWITH_PYTHON3=ON -DWITH_EMBEDDED=OFF
|
2018-02-27 08:42:48 +00:00
|
|
|
extraopts += -DWITH_CEPHFS_JAVA=ON
|
|
|
|
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
|
2013-02-14 01:30:19 +00:00
|
|
|
install -D -m 644 udev/95-ceph-osd.rules $(DESTDIR)/lib/udev/rules.d/95-ceph-osd.rules
|
2016-06-23 07:23:09 +00:00
|
|
|
install -D -m 644 udev/60-ceph-by-parttypeuuid.rules $(DESTDIR)/lib/udev/rules.d/60-ceph-by-parttypeuuid.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
|
2008-01-28 23:33:37 +00:00
|
|
|
|
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:
|
2013-07-30 20:31:35 +00:00
|
|
|
# dh_installinit is only set up to handle one upstart script
|
|
|
|
# per package, so do this ourselves
|
2016-02-11 17:59:15 +00:00
|
|
|
install -d -m0755 debian/ceph-base/etc/init
|
|
|
|
install -m0644 src/upstart/ceph-all.conf debian/ceph-base/etc/init
|
|
|
|
install -d -m0755 debian/ceph-osd/etc/init
|
|
|
|
install -m0644 src/upstart/ceph-osd*.conf debian/ceph-osd/etc/init
|
|
|
|
install -m0644 src/upstart/ceph-disk.conf debian/ceph-osd/etc/init
|
|
|
|
install -d -m0755 debian/ceph-mon/etc/init
|
|
|
|
install -m0644 src/upstart/ceph-mon*.conf debian/ceph-mon/etc/init
|
2014-04-01 21:39:02 +00:00
|
|
|
install -d -m0755 debian/ceph-common/etc/init
|
|
|
|
install -m0644 src/upstart/rbdmap.conf debian/ceph-common/etc/init
|
2013-07-30 20:31:35 +00:00
|
|
|
install -d -m0755 debian/ceph-mds/etc/init
|
2016-04-06 12:55:49 +00:00
|
|
|
install -m0644 src/upstart/ceph-mds*.conf debian/ceph-mds/etc/init
|
2016-09-26 21:42:56 +00:00
|
|
|
install -d -m0755 debian/ceph-mgr/etc/init
|
|
|
|
install -m0644 src/upstart/ceph-mgr*.conf debian/ceph-mgr/etc/init
|
2013-07-30 20:31:35 +00:00
|
|
|
install -d -m0755 debian/radosgw/etc/init
|
|
|
|
install -m0644 src/upstart/radosgw*.conf debian/radosgw/etc/init
|
2016-03-18 19:09:21 +00:00
|
|
|
install -d -m0755 debian/rbd-mirror/etc/init
|
|
|
|
install -m0644 src/upstart/ceph-rbd-mirror*.conf debian/rbd-mirror/etc/init
|
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
|
2010-11-30 17:13:54 +00:00
|
|
|
dh_strip -pceph-fuse --dbg-package=ceph-fuse-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
|
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
|
2011-03-05 21:29:20 +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
|
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
|
|
|
|
|
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
|