[NearTree] Fix FTBFS, cleanup spec

Peter Robinson pbrobinson at fedoraproject.org
Sun Jun 29 08:34:11 UTC 2014


commit 79f860f3e57d7ec21272cfe628f573bbf9cf72f4
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Sun Jun 29 09:34:10 2014 +0100

    Fix FTBFS, cleanup spec

 NearTree.spec |   32 +++++++++++++-------------------
 1 files changed, 13 insertions(+), 19 deletions(-)
---
diff --git a/NearTree.spec b/NearTree.spec
index 0824af9..f248af2 100644
--- a/NearTree.spec
+++ b/NearTree.spec
@@ -1,6 +1,6 @@
 Name:           NearTree
 Version:        3.1.1
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        An API for finding nearest neighbors
 
 Group:          System Environment/Libraries
@@ -12,7 +12,6 @@ Source0:        http://downloads.sourceforge.net/project/neartree/neartree/NearT
 Patch0:         NearTree-3.1-fedora.patch
 # to fix libdir for lib64 architecture
 Patch1:         NearTree-3.1-lib64.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  libtool time CVector-devel
 
 %description
@@ -34,7 +33,7 @@ developing applications that use NearTree.
 %prep
 %setup -q
 %patch0 -p1 -b .fedora
-%if %{_lib} == lib64
+%if %{__isa_bits} == 64
 %patch1 -p1 -b .lib64
 %endif
 
@@ -46,36 +45,28 @@ tr -d \\r < README_NearTree.txt.orig > README_NearTree.txt
 make all CFLAGS="%{optflags} -ansi -pedantic -DCNEARTREE_SAFE_TRIANG=1" %{?_smp_mflags}
 
 %install
-rm -rf %{buildroot}
-
 make install CFLAGS="%{optflags} -ansi -pedantic -DCNEARTREE_SAFE_TRIANG=1" INSTALL_PREFIX="%{buildroot}%{_prefix}"
 
 # remove .la and .a files
-find %{buildroot} -name '*.la' -exec rm -f {} ';'
-find %{buildroot} -name '*.a' -exec rm -f {} ';'
+find %{buildroot} -name '*.la' -delete
+find %{buildroot} -name '*.a' -delete
 
 %check
-if [ "`gcc -dumpversion | cut -d \. -f 1-2`" = "4.4" ] ; then
-  # gcc-4.4.x may have a bug in -fcaller-saves
-  make tests CFLAGS="%{optflags} -fno-caller-saves -ansi -pedantic -DCNEARTREE_SAFE_TRIANG=1"
-else
-  make tests CFLAGS="%{optflags} -ansi -pedantic -DCNEARTREE_SAFE_TRIANG=1"
-fi
+# Fails on i686 for some reason
+%ifnarch %{ix86}
+make tests CFLAGS="%{optflags} -fno-caller-saves -ansi -pedantic -DCNEARTREE_SAFE_TRIANG=1"
+%endif
 
-%clean
-rm -rf %{buildroot}
 
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %files
-%defattr(-,root,root,-)
 %doc README_NearTree.html README_NearTree.txt lgpl.txt
 %{_libdir}/libCNearTree.so.*
 
 %files devel
-%defattr(-,root,root,-)
 %{_includedir}/CNearTree.h
 %{_includedir}/TNear.h
 %{_includedir}/rhrand.h
@@ -83,6 +74,9 @@ rm -rf %{buildroot}
 %{_libdir}/libCNearTree.so
 
 %changelog
+* Sat Jun 28 2014 Peter Robinson <pbrobinson at fedoraproject.org> 3.1.1-8
+- Fix FTBFS, cleanup spec
+
 * Fri Jun 06 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.1.1-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
@@ -103,7 +97,7 @@ rm -rf %{buildroot}
 
 * Fri Jan  6 2012 Takanori MATSUURA <t.matsuu at gmail.com> - 3.1.1-1
 - update to 3.1.1
-- add time to BuirdRequires
+- add time to BuildRequires
 
 * Wed Jun  8 2011 Takanori MATSUURA <t.matsuu at gmail.com> - 3.1-1
 - update to 3.1
@@ -136,7 +130,7 @@ rm -rf %{buildroot}
 * Tue Dec  8 2009 Takanori MATSUURA <t.matsuu at gmail.com> - 2.1.4-2
 - fit to Fedora Packaging Guidelines
 
-* Fri Dec  3 2009 Takanori MATSUURA <t.matsuu at gmail.com> - 2.1.4-1
+* Thu Dec  3 2009 Takanori MATSUURA <t.matsuu at gmail.com> - 2.1.4-1
 - update to 2.1.4
 
 * Wed Jul 29 2009 Takanori MATSUURA <t.matsuu at gmail.com> - 2.1.3-1


More information about the scm-commits mailing list