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