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