Accepting request 367854 from home:scarabeus_iv:branches:devel:tools:building

- Update macros to allow redefinition of builddir not to be build
  (found 1 upstream that already has build with actually some
   distributed files)

OBS-URL: https://build.opensuse.org/request/show/367854
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=241
This commit is contained in:
Martin Pluskal 2016-03-08 07:29:07 +00:00 committed by Git OBS Bridge
parent f0f5b03a55
commit 9a2e27e36f
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Mar 7 21:09:56 UTC 2016 - tchvatal@suse.com
- Update macros to allow redefinition of builddir not to be build
(found 1 upstream that already has build with actually some
distributed files)
-------------------------------------------------------------------
Thu Feb 18 09:00:40 UTC 2016 - olaf@aepfle.de

View File

@ -3,12 +3,13 @@
#
%__cmake %{_bindir}/cmake
%__ctest %{_bindir}/ctest
%__builddir build
%cmake \
find . -name CMakeLists.txt \\\
-exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \
mkdir -p build \
cd build \
mkdir -p %__builddir \
cd %__builddir \
%__cmake .. \\\
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
@ -38,9 +39,9 @@
%__make %{?_smp_mflags} VERBOSE=1
%cmake_install \
%__make VERBOSE=1 DESTDIR=%{buildroot} install/fast -C build
%__make VERBOSE=1 DESTDIR=%{buildroot} install/fast -C %__builddir
%ctest \
cd build \
cd %__builddir \
%__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} \
cd ..