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