- new
[packages/flann.git] / flann.spec
CommitLineData
68353b89
JB
1# TODO: CUDA support (on bcond)
2Summary: FLANN - Fast Library for Approximate Nearest Neighbours
3Summary(pl.UTF-8): FLANN - szybka biblioteka do przybliżonego wyszukiwania najbliższych sąsiadów
4Name: flann
5Version: 1.7.1
6Release: 1
7License: BSD
8Group: Libraries
9Source0: http://people.cs.ubc.ca/~mariusm/uploads/FLANN/%{name}-%{version}-src.zip
10# Source0-md5: d780795f523eabda7c7ea09c6f5cf235
11Patch0: %{name}-python.patch
12URL: http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN
13BuildRequires: cmake >= 2.6
14BuildRequires: hdf5-devel
15BuildRequires: libstdc++-devel
16BuildRequires: octave-devel
17BuildRequires: python >= 1:2.5
18BuildRequires: python-devel >= 1:2.5
19BuildRequires: rpmbuild(macros) >= 1.605
20BuildRequires: tbb-devel
21BuildRequires: unzip
22BuildRoot: %{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
28FLANN is a library for performing fast approximate nearest neighbour
29searches in high dimensional spaces. It contains a collection of
30algorithms we found to work best for nearest neighbour search and a
31system for automatically choosing the best algorithm and optimum
32parameters depending on the dataset.
33
34FLANN is written in C++ and contains bindings for the following
35languages: C, MATLAB and Python.
36
37%description -l pl.UTF-8
38FLANN (Fast Library for Approximage Nearest Neighbours) to biblioteka
39do wykonywania szybkich przybliżonych wyszukiwań najbliższych sąsiadów
40w przestrzeniach o wielu wymiarach. Zawiera zbiór algorytmów, które
41sprawdzają się najlepiej w tym zastosowaniu oraz system automatycznego
42wyboru najlepszego algorytmu oraz optymalnych parametrów w zależności
43od zbioru danych.
44
45Biblioteka FLANN została napisana w C++ i zawiera dowiązania dla
46następujących języków: C, MATLAB i Python.
47
48%package devel
49Summary: Header files for FLANN libraries
50Summary(pl.UTF-8): Pliki nagłówkowe bibliotek FLANN
51Group: Development/Libraries
52Requires: %{name} = %{version}-%{release}
53Requires: hdf5-devel
54Requires: libstdc++-devel
55Requires: tbb-devel
56
57%description devel
58Header files for FLANN libraries.
59
60%description devel -l pl.UTF-8
61Pliki nagłówkowe bibliotek FLANN.
62
63%package static
64Summary: Static FLANN libraries
65Summary(pl.UTF-8): Statyczne biblioteki FLANN
66Group: Development/Libraries
67Requires: %{name}-devel = %{version}-%{release}
68
69%description static
70Static FLANN libraries.
71
72%description static -l pl.UTF-8
73Statyczne biblioteki FLANN.
74
75%package -n octave-flann
76Summary: Octave binding for FLANN library
77Summary(pl.UTF-8): Dowiązania języka Octave do biblioteki FLANN
78Group: Development/Languages
79Requires: %{name} = %{version}-%{release}
80
81%description -n octave-flann
82Octave binding for FLANN library.
83
84%description -n octave-flann -l pl.UTF-8
85Dowiązania języka Octave do biblioteki FLANN.
86
87%package -n python-flann
88Summary: Python binding for FLANN library
89Summary(pl.UTF-8): Dowiązania Pythona do biblioteki FLANN
90Group: Libraries/Python
91Requires: %{name} = %{version}-%{release}
92
93%description -n python-flann
94Python binding for FLANN library.
95
96%description -n python-flann -l pl.UTF-8
97Dowiązania Pythona do biblioteki FLANN.
98
99%prep
100%setup -q -n flann-%{version}-src
101%patch0 -p1
102
103%build
104install -d build
105cd build
106%cmake .. \
107 -DBUILD_CUDA_LIB=OFF
108
109%{__make}
110
111%install
112rm -rf $RPM_BUILD_ROOT
113
114%{__make} -C build install \
115 DESTDIR=$RPM_BUILD_ROOT
116
117%{__rm} $RPM_BUILD_ROOT%{_bindir}/flann_example_*
118install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
119cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
120
121# packaged as %doc
122%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/flann
123
124install -d $RPM_BUILD_ROOT{%{octave_m_dir},%{octave_oct_dir}}
125%{__rm} $RPM_BUILD_ROOT%{_datadir}/flann/octave/test*.m
126mv $RPM_BUILD_ROOT%{_datadir}/flann/octave/*.m $RPM_BUILD_ROOT%{octave_m_dir}
127mv $RPM_BUILD_ROOT%{_datadir}/flann/octave/*.mex $RPM_BUILD_ROOT%{octave_oct_dir}
128
129install -d $RPM_BUILD_ROOT%{py_sitedir}/pyflann
130mv $RPM_BUILD_ROOT%{py_sitescriptdir}/pyflann/lib/libflann.so $RPM_BUILD_ROOT%{py_sitedir}/pyflann
131
132%py_postclean
133
134%clean
135rm -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
This page took 0.068212 seconds and 4 git commands to generate.