done
%endif
-./autogen.sh
-
%if %{with lowmem_builder}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS --param ggc-min-expand=20 --param ggc-min-heapsize=32768"
%endif
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
-%{configure} CPPFLAGS="$java_inc" \
- --prefix=/usr \
- --libexecdir=%{_libexecdir} \
- --localstatedir=%{_localstatedir} \
- --sysconfdir=%{_sysconfdir} \
+export CPPFLAGS="$java_inc"
+export CFLAGS="$RPM_OPT_FLAGS"
+export CXXFLAGS="$RPM_OPT_FLAGS"
+
+mkdir build
+cd build
+cmake .. \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
+ -DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
+ -DCMAKE_INSTALL_LOCALSTATEDIR=%{_localstatedir} \
+ -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
+ -DCMAKE_INSTALL_MANDIR=%{_mandir} \
+ -DCMAKE_INSTALL_DOCDIR=%{_docdir}/ceph \
+ -DWITH_MANPAGE=ON \
+ -DWITH_SYSTEMD=ON \
%if 0%{?rhel} && ! 0%{?centos}
- --enable-subman \
-%endif
- --with-systemdsystemunitdir=%_unitdir \
- --docdir=%{_docdir}/ceph \
- --with-man-pages \
- --mandir="%_mandir" \
- --with-nss \
- --without-cryptopp \
- --with-debug \
-%if 0%{with cephfs_java}
- --enable-cephfs-java \
+ -DWITH_SUBMAN=ON \
%endif
%if 0%{with xio}
- --enable-xio \
+ -DWITH_XIO=ON \
+%endif
+%if 0%{with cephfs_java}
+ -DWITH_CEPHFS_JAVA=ON \
%endif
%if 0%{with selinux}
- --with-selinux \
+ -DWITH_SELINUX=ON \
%endif
- --with-librocksdb-static=check \
- --with-radosgw \
-%if %{without lttng}
- --without-lttng \
- --without-babeltrace \
+%if %{with lttng}
+ -DWITH_LTTNG=ON \
+ -DHAVE_BABELTRACE=ON \
+%else
+ -DWITH_LTTNG=OFF \
+ -DHAVE_BABELTRACE=OFF \
%endif
- $CEPH_EXTRA_CONFIGURE_ARGS \
- %{?_with_ocf} \
-%if %{without tcmalloc}
- --without-tcmalloc \
+ $CEPH_EXTRA_CMAKE_ARGS \
+%if 0%{with ocf}
+ -DWITH_OCF=ON
%endif
- CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
%if %{with lowmem_builder}
%if 0%{?jobs} > 8
%if 0%{with tests}
%check
# run in-tree unittests
-make %{?_smp_mflags} check
+cd build
+ctest %{?_smp_mflags}
%endif
%install
+pushd build
make DESTDIR=%{buildroot} install
-find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
+# we have dropped sysvinit bits
+rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
+popd
install -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
%if 0%{?fedora} || 0%{?rhel}
install -m 0644 -D etc/sysconfig/ceph %{buildroot}%{_sysconfdir}/sysconfig/ceph