Skip to content

Commit

Permalink
debian/rules: build deb with cmake
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Jun 29, 2016
1 parent 457ddea commit a6e9379
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 deletions.
6 changes: 1 addition & 5 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ Vcs-Browser: https://github.com/ceph/ceph
Maintainer: Ceph Maintainers <ceph-maintainers@lists.ceph.com>
Uploaders: Ken Dreyer <kdreyer@redhat.com>,
Alfredo Deza <adeza@redhat.com>
Build-Depends: autoconf,
automake,
autotools-dev,
btrfs-tools,
Build-Depends: btrfs-tools,
cmake,
cpio,
cryptsetup-bin | cryptsetup,
cython,
debhelper (>= 8),
dh-autoreconf,
dh-python,
dh-systemd,
default-jdk,
Expand Down
2 changes: 1 addition & 1 deletion debian/libcephfs-java.jlibs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/java/libcephfs.jar
debian/tmp/usr/share/java/libcephfs.jar
33 changes: 11 additions & 22 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,34 @@ export DESTDIR=$(CURDIR)/debian/tmp

export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

extraopts += --with-ocf --with-nss
extraopts += --with-debug
extraopts += --enable-cephfs-java

# rocksdb is not packaged by anyone. build it if we can.
extraopts += --with-librocksdb-static=check
extraopts += -DUSE_CRYPTOPP=OFF -DWITH_OCF=ON -DWITH_LTTNG=ON
extraopts += -DWITH_CEPHFS_JAVA=ON
# assumes that ceph is exmpt from multiarch support, so we override the libdir.
extraopts += -DCMAKE_INSTALL_LIBDIR=/usr/lib

ifeq ($(DEB_HOST_ARCH), armel)
# armel supports ARMv4t or above instructions sets.
# libatomic-ops is only usable with Ceph for ARMv6 or above.
extraopts += --without-libatomic-ops
extraopts += -DWITH_ATOMIC_OPS=OFF
endif

%:
dh $@ --with javahelper,python2,autoreconf,systemd --parallel

override_dh_autoreconf:
dh_autoreconf ./autogen.sh
dh $@ --buildsystem=cmake --with javahelper,python2,systemd --parallel

override_dh_auto_configure:
dh_auto_configure -- $(extraopts) $(CEPH_EXTRA_CONFIGURE_ARGS)
dh_auto_configure --buildsystem=cmake -- $(extraopts) $(CEPH_EXTRA_CMAKE_ARGS)

override_dh_auto_build:
dh_auto_build
cp src/init-ceph debian/ceph-base.ceph.init
dh_auto_build --buildsystem=cmake
cp src/init-radosgw debian/radosgw.init
cp src/logrotate.conf debian/ceph.logrotate

override_dh_auto_clean:
dh_auto_clean
rm -f build-stamp configure-stamp
rm -f aclocal.m4 compile config.sub config.guess depcomp install-sh \
ltmain.sh missing
rm -f configure Makefile.in man/Makefile.in src/Makefile.in
rm -f src/acconfig.h.in
rm -f debian/ceph-base.ceph.init debian/radosgw.init debian/ceph.logrotate
dh_auto_clean --buildsystem=cmake
rm -f debian/radosgw.init debian/ceph.logrotate

override_dh_auto_install:
dh_auto_install --destdir=$(DESTDIR)
dh_auto_install --buildsystem=cmake --destdir=$(DESTDIR)
install -D -m 644 udev/50-rbd.rules $(DESTDIR)/lib/udev/rules.d/50-rbd.rules
install -D -m 644 udev/95-ceph-osd.rules $(DESTDIR)/lib/udev/rules.d/95-ceph-osd.rules
install -D -m 644 src/etc-rbdmap $(DESTDIR)/etc/ceph/rbdmap
Expand Down

0 comments on commit a6e9379

Please sign in to comment.