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