]>
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 | |
84734a52 | 9 | Version: 1.8.3 |
68353b89 JB |
10 | Release: 1 |
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 |
84734a52 | 15 | # Source0-md5: a5676ca98f860a5b43d0d3a7d8a62903 |
68353b89 JB |
16 | Patch0: %{name}-python.patch |
17 | URL: http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN | |
18 | BuildRequires: cmake >= 2.6 | |
84734a52 | 19 | %{?with_gomp:BuildRequires: gcc-c++ >= 6:4.2} |
68353b89 | 20 | BuildRequires: hdf5-devel |
84734a52 | 21 | %{?with_gomp:BuildRequires: libgomp-devel} |
68353b89 JB |
22 | BuildRequires: libstdc++-devel |
23 | BuildRequires: octave-devel | |
24 | BuildRequires: python >= 1:2.5 | |
25 | BuildRequires: python-devel >= 1:2.5 | |
26 | BuildRequires: rpmbuild(macros) >= 1.605 | |
27 | BuildRequires: tbb-devel | |
28 | BuildRequires: unzip | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %define octave_m_dir %(octave-config --m-site-dir) | |
32 | %define octave_oct_dir %(octave-config --oct-site-dir) | |
33 | ||
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 | |
61 | Requires: libstdc++-devel | |
62 | Requires: tbb-devel | |
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 | ||
82 | %package -n octave-flann | |
83 | Summary: Octave binding for FLANN library | |
84 | Summary(pl.UTF-8): Dowiązania języka Octave do biblioteki FLANN | |
85 | Group: Development/Languages | |
86 | Requires: %{name} = %{version}-%{release} | |
87 | ||
88 | %description -n octave-flann | |
89 | Octave binding for FLANN library. | |
90 | ||
91 | %description -n octave-flann -l pl.UTF-8 | |
92 | Dowiązania języka Octave do biblioteki FLANN. | |
93 | ||
94 | %package -n python-flann | |
95 | Summary: Python binding for FLANN library | |
96 | Summary(pl.UTF-8): Dowiązania Pythona do biblioteki FLANN | |
97 | Group: Libraries/Python | |
98 | Requires: %{name} = %{version}-%{release} | |
99 | ||
100 | %description -n python-flann | |
101 | Python binding for FLANN library. | |
102 | ||
103 | %description -n python-flann -l pl.UTF-8 | |
104 | Dowiązania Pythona do biblioteki FLANN. | |
105 | ||
106 | %prep | |
107 | %setup -q -n flann-%{version}-src | |
108 | %patch0 -p1 | |
109 | ||
110 | %build | |
111 | install -d build | |
112 | cd build | |
113 | %cmake .. \ | |
84734a52 JB |
114 | -DBUILD_CUDA_LIB=OFF \ |
115 | %{!?with_gomp:-DUSE_OPENMP=OFF} | |
68353b89 JB |
116 | |
117 | %{__make} | |
118 | ||
119 | %install | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %{__make} -C build install \ | |
123 | DESTDIR=$RPM_BUILD_ROOT | |
124 | ||
125 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/flann_example_* | |
126 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
127 | cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
128 | ||
129 | # packaged as %doc | |
130 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/flann | |
131 | ||
132 | install -d $RPM_BUILD_ROOT{%{octave_m_dir},%{octave_oct_dir}} | |
133 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/flann/octave/test*.m | |
134 | mv $RPM_BUILD_ROOT%{_datadir}/flann/octave/*.m $RPM_BUILD_ROOT%{octave_m_dir} | |
135 | mv $RPM_BUILD_ROOT%{_datadir}/flann/octave/*.mex $RPM_BUILD_ROOT%{octave_oct_dir} | |
136 | ||
137 | install -d $RPM_BUILD_ROOT%{py_sitedir}/pyflann | |
138 | mv $RPM_BUILD_ROOT%{py_sitescriptdir}/pyflann/lib/libflann.so $RPM_BUILD_ROOT%{py_sitedir}/pyflann | |
139 | ||
140 | %py_postclean | |
141 | ||
142 | %clean | |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | ||
145 | %post -p /sbin/ldconfig | |
146 | %postun -p /sbin/ldconfig | |
147 | ||
148 | %files | |
149 | %defattr(644,root,root,755) | |
150 | %doc COPYING README.md | |
151 | %attr(755,root,root) %{_libdir}/libflann.so.*.*.* | |
84734a52 | 152 | %attr(755,root,root) %ghost %{_libdir}/libflann.so.1.8 |
68353b89 | 153 | %attr(755,root,root) %{_libdir}/libflann_cpp.so.*.*.* |
84734a52 | 154 | %attr(755,root,root) %ghost %{_libdir}/libflann_cpp.so.1.8 |
68353b89 JB |
155 | |
156 | %files devel | |
157 | %defattr(644,root,root,755) | |
158 | %doc doc/manual.pdf | |
159 | %attr(755,root,root) %{_libdir}/libflann.so | |
160 | %attr(755,root,root) %{_libdir}/libflann_cpp.so | |
161 | %{_includedir}/flann | |
162 | %{_pkgconfigdir}/flann.pc | |
163 | %{_examplesdir}/%{name}-%{version} | |
164 | ||
165 | %files static | |
166 | %defattr(644,root,root,755) | |
167 | %{_libdir}/libflann_s.a | |
168 | %{_libdir}/libflann_cpp_s.a | |
68353b89 JB |
169 | |
170 | %files -n octave-flann | |
171 | %defattr(644,root,root,755) | |
172 | %{octave_m_dir}/flann*.m | |
173 | %attr(755,root,root) %{octave_oct_dir}/nearest_neighbors.mex | |
174 | ||
175 | %files -n python-flann | |
176 | %defattr(644,root,root,755) | |
177 | %dir %{py_sitedir}/pyflann | |
178 | %attr(755,root,root) %{py_sitedir}/pyflann/libflann.so | |
179 | %{py_sitescriptdir}/pyflann | |
180 | %{py_sitescriptdir}/flann-%{version}-py*.egg-info |