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