Improve compatibility with new CMake macro

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-07-04 10:09:43 +02:00
parent bc00f0444d
commit ebd76695e4
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E
1 changed files with 4 additions and 13 deletions

View File

@ -72,24 +72,17 @@ gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%autosetup -p1
%build
if test ! -e "obj"; then
mkdir obj
fi
pushd obj
%cmake .. \
%cmake \
-DUNIT_TESTING=ON \
-DCLIENT_TESTING=ON \
-DSERVER_TESTING=ON \
-DGLOBAL_CLIENT_CONFIG="%{_sysconfdir}/libssh/libssh_client.config" \
-DGLOBAL_BIND_CONFIG="%{_sysconfdir}/libssh/libssh_server.config"
%make_build VERBOSE=1
popd
%cmake_build
%install
make DESTDIR=%{buildroot} install/fast -C obj
%cmake_install
install -d -m755 %{buildroot}%{_sysconfdir}/libssh
install -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/libssh/libssh_client.config
install -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/libssh/libssh_server.config
@ -115,9 +108,7 @@ popd
%ldconfig_scriptlets
%check
pushd obj
ctest --output-on-failure
popd
%ctest
%files
%doc AUTHORS BSD ChangeLog README