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
|
2016-05-20 18:18:46 +00:00
|
|
|
extraopts += -DWITH_CEPHFS_JAVA=ON
|
|
|
|
# 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
|
2014-07-29 22:38:18 +00:00
|
|
|
|
2011-03-20 07:23:22 +00:00
|
|
|
ifeq ($(DEB_HOST_ARCH), armel)
|
|
|
|
# armel supports ARMv4t or above instructions sets.
|
|
|
|
# libatomic-ops is only usable with Ceph for ARMv6 or above.
|
2016-05-20 18:18:46 +00:00
|
|
|
extraopts += -DWITH_ATOMIC_OPS=OFF
|
2011-03-20 07:23:22 +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
|
2010-08-02 16:15:34 +00:00
|
|
|
cp src/logrotate.conf debian/ceph.logrotate
|
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
|
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:
|
2012-12-12 22:06:16 +00:00
|
|
|
dh_installdocs -a --all ChangeLog
|
2016-04-22 13:07:58 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_installlogrotate:
|
|
|
|
dh_installlogrotate -pceph-base --name ceph
|
|
|
|
|
|
|
|
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
|
|
|
|
install -d -m0755 debian/ceph-common/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph.target debian/ceph-common/lib/systemd/system
|
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-02-11 17:59:15 +00:00
|
|
|
install -d -m0755 debian/ceph-base/lib/systemd/system
|
|
|
|
install -d -m0755 debian/ceph-mon/lib/systemd/system
|
|
|
|
install -d -m0755 debian/ceph-osd/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph-mon@.service debian/ceph-mon/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph-osd@.service debian/ceph-osd/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph-disk@.service debian/ceph-osd/lib/systemd/system
|
2016-02-16 19:56:34 +00:00
|
|
|
install -m0644 systemd/rbdmap.service debian/ceph-common/lib/systemd/system
|
2016-02-11 17:59:15 +00:00
|
|
|
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mon/lib/systemd/system/ceph-mon@.service
|
|
|
|
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-osd/lib/systemd/system/ceph-osd@.service
|
|
|
|
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-osd/lib/systemd/system/ceph-disk@.service
|
2016-04-22 13:07:58 +00:00
|
|
|
install -m0644 systemd/ceph-mon.target debian/ceph-mon/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph-osd.target debian/ceph-osd/lib/systemd/system
|
2015-09-05 13:14:15 +00:00
|
|
|
|
|
|
|
install -d -m0755 debian/ceph-mds/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph-mds@.service debian/ceph-mds/lib/systemd/system
|
|
|
|
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mds/lib/systemd/system/ceph-mds@.service
|
2016-04-22 13:07:58 +00:00
|
|
|
install -m0644 systemd/ceph-mds.target debian/ceph-mds/lib/systemd/system
|
2015-09-05 13:14:15 +00:00
|
|
|
|
2016-09-26 21:42:56 +00:00
|
|
|
install -d -m0755 debian/ceph-mgr/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph-mgr@.service debian/ceph-mgr/lib/systemd/system
|
|
|
|
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mgr/lib/systemd/system/ceph-mgr@.service
|
|
|
|
install -m0644 systemd/ceph-mgr.target debian/ceph-mgr/lib/systemd/system
|
|
|
|
|
2015-09-05 13:14:15 +00:00
|
|
|
install -d -m0755 debian/radosgw/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph-radosgw@.service debian/radosgw/lib/systemd/system
|
|
|
|
sed -i s./etc/sysconfig/./etc/default/.g debian/radosgw/lib/systemd/system/ceph-radosgw@.service
|
2016-04-22 13:07:58 +00:00
|
|
|
install -m0644 systemd/ceph-radosgw.target debian/radosgw/lib/systemd/system
|
2015-09-05 13:14:15 +00:00
|
|
|
|
2016-03-18 19:09:21 +00:00
|
|
|
install -d -m0755 debian/rbd-mirror/lib/systemd/system
|
|
|
|
install -m0644 systemd/ceph-rbd-mirror@.service debian/rbd-mirror/lib/systemd/system
|
|
|
|
sed -i s./etc/sysconfig/./etc/default/.g debian/rbd-mirror/lib/systemd/system/ceph-rbd-mirror@.service
|
2016-04-22 13:07:58 +00:00
|
|
|
install -m0644 systemd/ceph-rbd-mirror.target debian/rbd-mirror/lib/systemd/system
|
|
|
|
|
|
|
|
dh_installinit -p ceph-base --name ceph --no-start
|
|
|
|
dh_installinit -p radosgw --no-start
|
2016-03-18 19:09:21 +00:00
|
|
|
|
2016-05-20 15:45:20 +00:00
|
|
|
override_dh_systemd_start:
|
|
|
|
dh_systemd_start --no-restart-on-upgrade
|
2009-10-28 20:16:34 +00:00
|
|
|
|
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-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
|
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
|
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:
|
|
|
|
for binding in rados cephfs rbd; do \
|
|
|
|
dh_python2 -p python-$$binding; \
|
|
|
|
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:
|
|
|
|
for binding in rados cephfs rbd; do \
|
2016-08-26 02:40:18 +00:00
|
|
|
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
|