[stdair] [Build] Now build externally, out of the source directory.
Denis Arnaud
denisarnaud at fedoraproject.org
Sun Dec 4 23:24:25 UTC 2011
commit ae96f79b8c70980d4bfcef8ac0823538f86ac2dc
Author: Denis Arnaud <denis.arnaud_fedora at m4x.org>
Date: Mon Dec 5 00:24:14 2011 +0100
[Build] Now build externally, out of the source directory.
stdair.spec | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/stdair.spec b/stdair.spec
index 1276795..1c6208a 100644
--- a/stdair.spec
+++ b/stdair.spec
@@ -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
More information about the scm-commits
mailing list