Improve compatibility with new CMake macro
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
2722d9d6ae
commit
a8a0affb4c
40
dnf.spec
40
dnf.spec
@ -263,39 +263,33 @@ Systemd units that can periodically download package upgrades and apply them.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
mkdir build-py2
|
|
||||||
mkdir build-py3
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
pushd build-py2
|
%global _vpath_builddir build-py2
|
||||||
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python2} -DDNF_VERSION=%{version}
|
%cmake -DPYTHON_DESIRED:FILEPATH=%{__python2} -DDNF_VERSION=%{version}
|
||||||
%make_build
|
%cmake_build
|
||||||
make doc-man
|
%cmake_build --target doc-man
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
pushd build-py3
|
%global _vpath_builddir build-py3
|
||||||
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python3} -DDNF_VERSION=%{version}
|
%cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} -DDNF_VERSION=%{version}
|
||||||
%make_build
|
%cmake_build
|
||||||
make doc-man
|
%cmake_build --target doc-man
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
pushd build-py2
|
%global _vpath_builddir build-py2
|
||||||
%make_install
|
%cmake_install
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
pushd build-py3
|
%global _vpath_builddir build-py3
|
||||||
%make_install
|
%cmake_install
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
@ -352,15 +346,13 @@ ln -sr %{buildroot}%{confdir}/vars %{buildroot}%{_sysconfdir}/yum/vars
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
pushd build-py2
|
%global _vpath_builddir build-py2
|
||||||
ctest -VV
|
%ctest
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
pushd build-py3
|
%global _vpath_builddir build-py3
|
||||||
ctest -VV
|
%ctest
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user