[Build] Now build externally, out of the source directory.

This commit is contained in:
Denis Arnaud 2011-12-05 00:24:14 +01:00
parent b9e7b05b68
commit ae96f79b8c
1 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,6 @@
#
%global mydocs __tmp_docdir
%global mybuild _tmp_builddir
#
Name: stdair
Version: 0.45.0
@ -61,12 +62,17 @@ online (http://%{name}.org).
%build
%cmake .
mkdir -p %{mybuild}
pushd %{mybuild}
%cmake ..
make %{?_smp_mflags}
popd
%install
rm -rf $RPM_BUILD_ROOT
pushd %{mybuild}
make install DESTDIR=$RPM_BUILD_ROOT
popd
# Fix some permissions
find $RPM_BUILD_ROOT%{_libexecdir}/%{name} -type f -name '*.sh' -exec chmod +x {} \;
@ -76,7 +82,9 @@ mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{mydocs}
rm -f %{mydocs}/html/installdox
%check
pushd %{mybuild}
ctest
popd
%clean
rm -rf $RPM_BUILD_ROOT