[NearTree/el6/master] Initial import (#545047).
tmatsuu
tmatsuu at fedoraproject.org
Fri Oct 22 06:58:08 UTC 2010
commit 20b251a810cdbf140de74f6ca44260c7404b9f68
Author: Takanori MATSUURA <t.matsuu at gmail.com>
Date: Fri Oct 22 15:58:06 2010 +0900
Initial import (#545047).
.gitignore | 1 +
NearTree-2.3.1-fedora.patch | 15 +++++++
NearTree-2.3.1-lib64.patch | 59 ++++++++++++++++++++++++++
NearTree.spec | 97 +++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
5 files changed, 173 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4667e55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/NearTree-2.3.1.tar.gz
diff --git a/NearTree-2.3.1-fedora.patch b/NearTree-2.3.1-fedora.patch
new file mode 100644
index 0000000..6abb4a2
--- /dev/null
+++ b/NearTree-2.3.1-fedora.patch
@@ -0,0 +1,15 @@
+--- NearTree-2.3.1/Makefile.fedora 2010-09-08 06:59:46.000000000 +0900
++++ NearTree-2.3.1/Makefile 2010-10-12 22:08:27.147897560 +0900
+@@ -112,10 +112,10 @@
+
+ COMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+ CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -release $(RELEASE) -no-undefined -rpath $(INSTALL_PREFIX)/lib
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -no-undefined -rpath $(INSTALL_PREFIX)/lib
+ BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+ CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
+-BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) -shared -I$(INSTALL_PREFIX)/include
++BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) -rdynamic -I$(INSTALL_PREFIX)/include
+ BUILD_COMMAND_STATIC = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -static-libtool-libs -I$(INSTALL_PREFIX)/include
+ INSTALL_COMMAND = $(LIBTOOL) --mode=install cp
+ INSTALL_FINISH_COMMAND = $(LIBTOOL) --mode=finish
diff --git a/NearTree-2.3.1-lib64.patch b/NearTree-2.3.1-lib64.patch
new file mode 100644
index 0000000..d8df74c
--- /dev/null
+++ b/NearTree-2.3.1-lib64.patch
@@ -0,0 +1,59 @@
+--- NearTree-2.3.1/Makefile.lib64 2010-10-12 22:09:51.877690098 +0900
++++ NearTree-2.3.1/Makefile 2010-10-12 22:10:24.358735534 +0900
+@@ -79,7 +79,7 @@
+ # Directories
+ #
+ ROOT = .
+-LIB = $(ROOT)/lib
++LIB = $(ROOT)/lib64
+ BIN = $(ROOT)/bin
+ SRC = $(ROOT)
+ INC = $(ROOT)
+@@ -112,7 +112,7 @@
+
+ COMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+ CPPCOMPILE_COMMAND = $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c
+-LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -no-undefined -rpath $(INSTALL_PREFIX)/lib
++LIBRARY_LINK_COMMAND = $(LIBTOOL) --mode=link $(CC) -version-info $(VERSION) -no-undefined -rpath $(INSTALL_PREFIX)/lib64
+ BUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(INCLUDES)
+ CPPBUILD_COMMAND_LOCAL = $(LIBTOOL) --mode=link $(CXX) -no-undefined $(CFLAGS) $(INCLUDES)
+ BUILD_COMMAND_DYNAMIC = $(LIBTOOL) --mode=link $(CC) -no-undefined $(CFLAGS) -rdynamic -I$(INSTALL_PREFIX)/include
+@@ -221,10 +221,10 @@
+ $(LIB)/libCNearTree.$(LIB_EXT) \
+ $(BIN)/CPPMain $(BIN)/CMain $(BIN)/CPPNearTreeTest $(BIN)/CNearTreeTest
+
+-install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib $(INSTALL_PREFIX)/include \
++install: all $(INSTALL_PREFIX) $(INSTALL_PREFIX)/lib64 $(INSTALL_PREFIX)/include \
+ $(INC) $(LIB)/libCNearTree.$(LIB_EXT) $(INC)/TNear.h $(INC)/CNearTree.h $(INC)/rhrand.h
+- $(INSTALL_COMMAND) $(LIB)/libCNearTree.$(LIB_EXT) $(INSTALL_PREFIX)/lib/libCNearTree.$(LIB_EXT)
+- $(INSTALL_FINISH_COMMAND) $(INSTALL_PREFIX)/lib/libCNearTree.$(LIB_EXT)
++ $(INSTALL_COMMAND) $(LIB)/libCNearTree.$(LIB_EXT) $(INSTALL_PREFIX)/lib64/libCNearTree.$(LIB_EXT)
++ $(INSTALL_FINISH_COMMAND) $(INSTALL_PREFIX)/lib64/libCNearTree.$(LIB_EXT)
+ -cp $(INSTALL_PREFIX)/include/TNear.h $(INSTALL_PREFIX)/include/TNear_old.h
+ -cp $(INSTALL_PREFIX)/include/CNearTree.h $(INSTALL_PREFIX)/include/CNearTree_old.h
+ cp $(INC)/TNear.h $(INSTALL_PREFIX)/include/TNear.h
+@@ -235,11 +235,11 @@
+ chmod 644 $(INSTALL_PREFIX)/include/rhrand.h
+ echo "Testing final install dynamic"
+ $(BUILD_COMMAND_DYNAMIC) $(INCLUDES) $(EXAMPLES)/CNearTreeTest.c \
+- -L$(INSTALL_PREFIX)/lib -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_dynamic
++ -L$(INSTALL_PREFIX)/lib64 -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_dynamic
+ $(BIN)/CNearTreeTest_dynamic
+ echo "Testing final install static"
+ $(BUILD_COMMAND_STATIC) $(INCLUDES) $(EXAMPLES)/CNearTreeTest.c \
+- -L$(INSTALL_PREFIX)/lib -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_static
++ -L$(INSTALL_PREFIX)/lib64 -lCNearTree $(CLIBRARIES) -o $(BIN)/CNearTreeTest_static
+ $(BIN)/CNearTreeTest_static
+
+
+@@ -250,8 +250,8 @@
+ $(INSTALL_PREFIX):
+ mkdir -p $(INSTALL_PREFIX)
+
+-$(INSTALL_PREFIX)/lib: $(INSTALL_PREFIX)
+- mkdir -p $(INSTALL_PREFIX)/lib
++$(INSTALL_PREFIX)/lib64: $(INSTALL_PREFIX)
++ mkdir -p $(INSTALL_PREFIX)/lib64
+
+ $(INSTALL_PREFIX)/bin: $(INSTALL_PREFIX)
+ mkdir -p $(INSTALL_PREFIX)/bin
diff --git a/NearTree.spec b/NearTree.spec
new file mode 100644
index 0000000..d56e33a
--- /dev/null
+++ b/NearTree.spec
@@ -0,0 +1,97 @@
+Name: NearTree
+Version: 2.3.1
+Release: 0.1%{?dist}
+Summary: An API for finding nearest neighbors
+
+Group: System Environment/Libraries
+License: LGPLv2+
+URL: http://neartree.sourceforge.net/
+Source0: http://downloads.sourceforge.net/project/neartree/neartree/NearTree-%{version}/NearTree-%{version}.tar.gz
+# library should not have version number in their name.
+# Sent to upstream but upstream cannot accept.
+Patch0: NearTree-2.3.1-fedora.patch
+# to fix libdir for lib64 architecture
+Patch1: NearTree-2.3.1-lib64.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: libtool CVector-devel
+
+%description
+This is a release of an API for finding nearest neighbors among
+points in spaces of arbitrary dimensions. This release provides a
+C++ template, TNear.h, and a C library, CNearTree.c, with
+example/test programs.
+
+%package devel
+Summary: Development tools for compiling programs using NearTree
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The NearTree-devel package includes the header and library files for
+developing applications that use NearTree.
+
+%prep
+%setup -q
+%patch0 -p1 -b .fedora
+%if %{_lib} == lib64
+%patch1 -p1 -b .lib64
+%endif
+
+# convert end of line code from CRFL to LF
+mv README_NearTree.txt README_NearTree.txt.orig
+tr -d \\r < README_NearTree.txt.orig > README_NearTree.txt
+
+%build
+make all CFLAGS="%{optflags} -DCNEARTREE_SAFE_TRIANG=1" %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+
+make install CFLAGS="%{optflags}" INSTALL_PREFIX="%{buildroot}%{_prefix}"
+
+# remove .la and .a files
+find %{buildroot} -name '*.la' -exec rm -f {} ';'
+find %{buildroot} -name '*.a' -exec rm -f {} ';'
+
+%check
+make tests
+
+%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
+%{_libdir}/libCNearTree.so
+
+
+%changelog
+* Mon Oct 18 2010 Takanori MATSUURA <t.matsuu at gmail.com> - 2.3.1-0.1
+- use "make all" instead of "make"
+- add %%check
+
+* Tue Oct 12 2010 Takanori MATSUURA <t.matsuu at gmail.com> - 2.3.1-0
+- update to 2.3.1
+
+* Wed Dec 9 2009 Takanori MATSUURA <t.matsuu at gmail.com> - 2.1.4-3
+- remove static library
+
+* 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
+- update to 2.1.4
+
+* Wed Jul 29 2009 Takanori MATSUURA <t.matsuu at gmail.com> - 2.1.3-1
+- initial build
diff --git a/sources b/sources
index e69de29..27eee2d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+46b6f68b6df51579e6ff365e8299d8e0 NearTree-2.3.1.tar.gz
More information about the scm-commits
mailing list