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