]>
Commit | Line | Data |
---|---|---|
84734a52 JB |
1 | # TODO: CUDA support, MPI (on bconds) |
2 | # | |
3 | # Conditional build: | |
8a4c0f2d | 4 | %bcond_without openmp # OpenMP support |
84734a52 | 5 | # |
68353b89 JB |
6 | Summary: FLANN - Fast Library for Approximate Nearest Neighbours |
7 | Summary(pl.UTF-8): FLANN - szybka biblioteka do przybliżonego wyszukiwania najbliższych sąsiadów | |
8 | Name: flann | |
6238bbc2 JR |
9 | Version: 1.9.1 |
10 | Release: 1 | |
68353b89 JB |
11 | License: BSD |
12 | Group: Libraries | |
6238bbc2 JR |
13 | Source0: https://github.com/mariusmuja/flann/archive/%{version}/%{name}-%{version}.tar.gz |
14 | # Source0-md5: 73adef1c7bf8e8b978987e7860926ea6 | |
68353b89 JB |
15 | Patch0: %{name}-python.patch |
16 | URL: http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN | |
17 | BuildRequires: cmake >= 2.6 | |
8a4c0f2d | 18 | %{?with_openmp:BuildRequires: gcc-c++ >= 6:4.2} |
b40b9a8d | 19 | BuildRequires: gtest-devel |
68353b89 | 20 | BuildRequires: hdf5-devel |
7ef77888 | 21 | BuildRequires: latex2html |
8a4c0f2d | 22 | %{?with_openmp:BuildRequires: libgomp-devel} |
68353b89 | 23 | BuildRequires: libstdc++-devel |
68353b89 JB |
24 | BuildRequires: python >= 1:2.5 |
25 | BuildRequires: python-devel >= 1:2.5 | |
26 | BuildRequires: rpmbuild(macros) >= 1.605 | |
6238bbc2 | 27 | BuildRequires: texlive-format-pdflatex |
7ef77888 | 28 | BuildRequires: texlive-latex |
6238bbc2 | 29 | BuildRequires: texlive-latex-bibtex |
7ef77888 | 30 | BuildRequires: texlive-makeindex |
68353b89 JB |
31 | BuildRequires: unzip |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
68353b89 JB |
34 | %description |
35 | FLANN is a library for performing fast approximate nearest neighbour | |
36 | searches in high dimensional spaces. It contains a collection of | |
37 | algorithms we found to work best for nearest neighbour search and a | |
38 | system for automatically choosing the best algorithm and optimum | |
39 | parameters depending on the dataset. | |
40 | ||
41 | FLANN is written in C++ and contains bindings for the following | |
42 | languages: C, MATLAB and Python. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | FLANN (Fast Library for Approximage Nearest Neighbours) to biblioteka | |
46 | do wykonywania szybkich przybliżonych wyszukiwań najbliższych sąsiadów | |
47 | w przestrzeniach o wielu wymiarach. Zawiera zbiór algorytmów, które | |
48 | sprawdzają się najlepiej w tym zastosowaniu oraz system automatycznego | |
49 | wyboru najlepszego algorytmu oraz optymalnych parametrów w zależności | |
50 | od zbioru danych. | |
51 | ||
52 | Biblioteka FLANN została napisana w C++ i zawiera dowiązania dla | |
53 | następujących języków: C, MATLAB i Python. | |
54 | ||
55 | %package devel | |
56 | Summary: Header files for FLANN libraries | |
57 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek FLANN | |
58 | Group: Development/Libraries | |
59 | Requires: %{name} = %{version}-%{release} | |
60 | Requires: hdf5-devel | |
b40b9a8d | 61 | Requires: gtest-devel |
68353b89 | 62 | Requires: libstdc++-devel |
68353b89 JB |
63 | |
64 | %description devel | |
65 | Header files for FLANN libraries. | |
66 | ||
67 | %description devel -l pl.UTF-8 | |
68 | Pliki nagłówkowe bibliotek FLANN. | |
69 | ||
70 | %package static | |
71 | Summary: Static FLANN libraries | |
72 | Summary(pl.UTF-8): Statyczne biblioteki FLANN | |
73 | Group: Development/Libraries | |
74 | Requires: %{name}-devel = %{version}-%{release} | |
75 | ||
76 | %description static | |
77 | Static FLANN libraries. | |
78 | ||
79 | %description static -l pl.UTF-8 | |
80 | Statyczne biblioteki FLANN. | |
81 | ||
68353b89 JB |
82 | %package -n python-flann |
83 | Summary: Python binding for FLANN library | |
84 | Summary(pl.UTF-8): Dowiązania Pythona do biblioteki FLANN | |
85 | Group: Libraries/Python | |
86 | Requires: %{name} = %{version}-%{release} | |
87 | ||
88 | %description -n python-flann | |
89 | Python binding for FLANN library. | |
90 | ||
91 | %description -n python-flann -l pl.UTF-8 | |
92 | Dowiązania Pythona do biblioteki FLANN. | |
93 | ||
94 | %prep | |
6238bbc2 | 95 | %setup -q |
68353b89 JB |
96 | %patch0 -p1 |
97 | ||
98 | %build | |
99 | install -d build | |
100 | cd build | |
101 | %cmake .. \ | |
6238bbc2 | 102 | -DBUILD_MATLAB_BINDINGS:BOOL=OFF \ |
84734a52 | 103 | -DBUILD_CUDA_LIB=OFF \ |
8a4c0f2d | 104 | %{!?with_openmp:-DUSE_OPENMP=OFF} |
68353b89 JB |
105 | |
106 | %{__make} | |
6238bbc2 | 107 | %{__make} -C doc pdf |
68353b89 JB |
108 | |
109 | %install | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %{__make} -C build install \ | |
113 | DESTDIR=$RPM_BUILD_ROOT | |
114 | ||
115 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/flann_example_* | |
116 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
117 | cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
118 | ||
119 | # packaged as %doc | |
120 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/flann | |
121 | ||
6238bbc2 | 122 | %{__mv} $RPM_BUILD_ROOT%{py_sitedir}/pyflann/lib/libflann.so $RPM_BUILD_ROOT%{py_sitedir}/pyflann |
68353b89 JB |
123 | |
124 | %py_postclean | |
125 | ||
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
129 | %post -p /sbin/ldconfig | |
130 | %postun -p /sbin/ldconfig | |
131 | ||
132 | %files | |
133 | %defattr(644,root,root,755) | |
134 | %doc COPYING README.md | |
135 | %attr(755,root,root) %{_libdir}/libflann.so.*.*.* | |
6238bbc2 | 136 | %attr(755,root,root) %ghost %{_libdir}/libflann.so.1.9 |
68353b89 | 137 | %attr(755,root,root) %{_libdir}/libflann_cpp.so.*.*.* |
6238bbc2 | 138 | %attr(755,root,root) %ghost %{_libdir}/libflann_cpp.so.1.9 |
68353b89 JB |
139 | |
140 | %files devel | |
141 | %defattr(644,root,root,755) | |
6238bbc2 | 142 | %doc build/doc/manual.pdf |
68353b89 JB |
143 | %attr(755,root,root) %{_libdir}/libflann.so |
144 | %attr(755,root,root) %{_libdir}/libflann_cpp.so | |
145 | %{_includedir}/flann | |
146 | %{_pkgconfigdir}/flann.pc | |
147 | %{_examplesdir}/%{name}-%{version} | |
148 | ||
149 | %files static | |
150 | %defattr(644,root,root,755) | |
151 | %{_libdir}/libflann_s.a | |
152 | %{_libdir}/libflann_cpp_s.a | |
68353b89 | 153 | |
68353b89 JB |
154 | %files -n python-flann |
155 | %defattr(644,root,root,755) | |
156 | %dir %{py_sitedir}/pyflann | |
ba494716 | 157 | %{py_sitedir}/pyflann/*.py[co] |
68353b89 | 158 | %attr(755,root,root) %{py_sitedir}/pyflann/libflann.so |
ba494716 | 159 | %{py_sitedir}/flann-%{version}-py*.egg-info |