Fix cmake build

This commit is contained in:
Sérgio M. Basto 2020-08-02 18:44:27 +01:00
parent 4a4938ffa1
commit b3e0f475c4
1 changed files with 14 additions and 18 deletions

View File

@ -1,3 +1,5 @@
%undefine __cmake_in_source_build
Name: schroot
Version: 1.6.10
Release: 14%{?dist}
@ -24,7 +26,7 @@ Patch18: Unmount-everything-that-we-can-instead-of-giving-up.patch
Patch19: fix-killprocs.patch
Patch20: fix-bash-completion.patch
BuildRequires: gcc-c++
BuildRequires: gcc-c++
BuildRequires: pam-devel
BuildRequires: boost-devel
BuildRequires: lockdev-devel
@ -91,14 +93,7 @@ more functionality.
%build
#./bootstrap
#configure LIBS="-lboost_program_options -lboost_system -lboost_regex" --disable-rpath --enable-static --disable-shared --enable-dchroot --disable-silent-rules || ( cat config.log && exit 1 )
#--with systemd --buildsystem=cmake
mkdir -p build
pushd build
#cmake -LH ..
# schroot now use cmake
%cmake3 \
-Ddebug=OFF -Ddchroot=OFF -Ddchroot-dsa=OFF \
-Dbash_completion_dir=/usr/share/bash-completion/completions \
@ -107,15 +102,14 @@ pushd build
-Duuid=ON \
-DBTRFS_EXECUTABLE=/sbin/btrfs \
-DLVCREATE_EXECUTABLE=/sbin/lvcreate \
-DLVREMOVE_EXECUTABLE=/sbin/lvremove \
..
-DLVREMOVE_EXECUTABLE=/sbin/lvremove
#-DSCHROOT_LIBEXEC_DIR=/$(LIBDIR)/schroot \
%make_build VERBOSE=1
%cmake_build
#make doc
popd
%install
%make_install -C build DESTDIR=$RPM_BUILD_ROOT
%cmake_install
install -d -m 755 %{buildroot}%{_unitdir}
install -pm644 %{SOURCE1} %{buildroot}%{_unitdir}
@ -132,11 +126,12 @@ rm $RPM_BUILD_ROOT%{_libdir}/libsbuild.a
%find_lang %{name}
%check
pushd build
# cmake3 on epel don't have ctest
#fakeroot ctest -V
fakeroot make -C build test V=1 || :
popd
%if 0%{?rhel} == 7
fakeroot %cmake test V=1 || :
%else
fakeroot %ctest || :
%endif
%files -f %{name}.lang
%license COPYING
@ -199,6 +194,7 @@ popd
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.10-14
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
- Fix cmake build
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.10-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild