]> git.pld-linux.org Git - packages/libfreenect.git/blame - libfreenect.spec
Release 4 (by relup.sh)
[packages/libfreenect.git] / libfreenect.spec
CommitLineData
580dd7a4
JB
1#
2# Conditional build:
3%bcond_without opencv # OpenCV wrapper
4%bcond_without openni2 # OpenNI2 driver
5%bcond_without python2 # Python 2.x extension
6%bcond_without python3 # Python 3.x extension
7#
8Summary: Userspace driver for the Microsoft Kinect
9Summary(pl.UTF-8): Sterownik przestrzeni użytkownika dla kontrolera Microsoft Kinect
10Name: libfreenect
d95f1ef3 11Version: 0.6.2
2143c80e 12Release: 4
580dd7a4
JB
13License: Apache v2.0 or GPL v2
14Group: Libraries
15#Source0Download: https://github.com/OpenKinect/libfreenect/releases
16Source0: https://github.com/OpenKinect/libfreenect/archive/v%{version}/%{name}-%{version}.tar.gz
d95f1ef3 17# Source0-md5: 78648c6eaa74f177a63f26b303247f6e
580dd7a4
JB
18Patch0: %{name}-link.patch
19Patch1: %{name}-install.patch
20URL: https://openkinect.org/wiki/Main_Page
21BuildRequires: cmake >= 3.1.0
22BuildRequires: libstdc++-devel >= 6:4.7
23BuildRequires: libusb-devel >= 1.0.18
24%{?with_opencv:BuildRequires: opencv-devel}
25%if %{with python2}
26BuildRequires: python-Cython
27BuildRequires: python-devel >= 1:2.7
28BuildRequires: python-numpy-devel
29%endif
30%if %{with python3}
31BuildRequires: python3-Cython
32BuildRequires: python3-devel >= 1:3.3
33BuildRequires: python3-numpy-devel
34%endif
35Requires: libusb >= 1.0.18
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39libfreenect is a userspace driver for the Microsoft Kinect. It runs on
40Linux, OSX, and Windows and supports:
41- RGB and Depth Images
42- Motors
43- Accelerometer
44- LED
45- Audio
46
47Notice: for the newer Kinect v2 (XBox One), use libfreenect 2 instead.
48
49%description -l pl.UTF-8
50libfreenect to sterownik przestrzeni użytkownika dla kontrolera
51Microsoft Kinect. Działa na Linuksie, OSX oraz Windows i obsługuje:
52- obrazy RGB z głębią
53- silniki
54- akcelerometr
55- LED
56- dźwięk
57
58Uwaga: do nowszego Kinecta v2 (XBox One) należy używać libfreenect2.
59
60%package fakenect
61Summary: Fakenect mock library
62Summary(pl.UTF-8): Biblioteka atrapy fakenect
63Group: Libraries
64Requires: %{name} = %{version}-%{release}
65
66%description fakenect
67Fakenect mock library.
68
69%description fakenect -l pl.UTF-8
70Biblioteka atrapy fakenect.
71
72%package opencv
73Summary: OpenCV wrapper for libfreenect
74Summary(pl.UTF-8): Obudowanie OpenCV do biblioteki libfreenect
75Group: Libraries
76Requires: %{name} = %{version}-%{release}
77
78%description opencv
79OpenCV wrapper for libfreenect.
80
81%description opencv -l pl.UTF-8
82Obudowanie OpenCV do biblioteki libfreenect.
83
84%package -n OpenNI2-driver-freenect
85Summary: OpenNI2 driver for Microsoft Kinect
86Summary(pl.UTF-8): Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2
87Group: Libraries
88Requires: %{name} = %{version}-%{release}
89Requires: OpenNI2
90
91%description -n OpenNI2-driver-freenect
92OpenNI2 driver for Microsoft Kinect.
93
94%description -n OpenNI2-driver-freenect -l pl.UTF-8
95Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2.
96
97%package devel
98Summary: Header files for libfreenect libraries
99Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libfreenect
100Group: Development/Libraries
101Requires: %{name} = %{version}-%{release}
102Requires: libusb-devel >= 1.0.18
103
104%description devel
105Header files for libfreenect libraries.
106
107%description devel -l pl.UTF-8
108Pliki nagłówkowe bibliotek libfreenect.
109
110%package static
111Summary: Static libfreenect libraries
112Summary(pl.UTF-8): Statyczne biblioteki libfreenect
113Group: Development/Libraries
114Requires: %{name}-devel = %{version}-%{release}
115
116%description static
117Static libfreenect libraries.
118
119%description static -l pl.UTF-8
120Statyczne biblioteki libfreenect.
121
122%package -n python-freenect
123Summary: Python 2 interface to libfreenect
124Summary(pl.UTF-8): Interfejs Pythona 2 do libfreenect
125Group: Libraries/Python
126Requires: %{name} = %{version}-%{release}
127Requires: python-libs
128
129%description -n python-freenect
130Python 2 interface to libfreenect.
131
132%description -n python-freenect -l pl.UTF-8
133Interfejs Pythona 2 do libfreenect.
134
135%package -n python3-freenect
136Summary: Python 3 interface to libfreenect
137Summary(pl.UTF-8): Interfejs Pythona 3 do libfreenect
138Group: Libraries/Python
139Requires: %{name} = %{version}-%{release}
140Requires: python3-libs
141
142%description -n python3-freenect
143Python 3 interface to libfreenect.
144
145%description -n python3-freenect -l pl.UTF-8
146Interfejs Pythona 3 do libfreenect.
147
148%prep
149%setup -q
150%patch0 -p1
151%patch1 -p1
152
153%{__sed} -i -e '1s,/usr/bin/env python2,%{__python},' src/fwfetcher.py
154
155%build
156install -d build
157cd build
158%cmake .. \
159 %{?with_opencv:-DBUILD_CV=ON} \
160 -DBUILD_EXAMPLES=OFF \
4e5986e7
JB
161 %{?with_python2:-DBUILD_PYTHON2=ON} \
162 %{?with_python3:-DBUILD_PYTHON3=ON} \
163 %{?with_openni2:-DBUILD_OPENNI2_DRIVER=ON}
580dd7a4
JB
164
165%{__make}
166
167%install
168rm -rf $RPM_BUILD_ROOT
169
170%{__make} -C build install \
171 DESTDIR=$RPM_BUILD_ROOT
172
173%{__mv} $RPM_BUILD_ROOT%{_datadir}/fwfetcher.py \
174 $RPM_BUILD_ROOT%{_datadir}/libfreenect
175
176%clean
177rm -rf $RPM_BUILD_ROOT
178
179%post -p /sbin/ldconfig
180%postun -p /sbin/ldconfig
181
e9ef19b3
JB
182%post opencv -p /sbin/ldconfig
183%postun opencv -p /sbin/ldconfig
184
580dd7a4
JB
185%files
186%defattr(644,root,root,755)
187%doc README.md
188%attr(755,root,root) %{_libdir}/libfreenect.so.*.*.*
d95f1ef3 189%attr(755,root,root) %ghost %{_libdir}/libfreenect.so.0
580dd7a4 190%attr(755,root,root) %{_libdir}/libfreenect_sync.so.*.*.*
d95f1ef3 191%attr(755,root,root) %ghost %{_libdir}/libfreenect_sync.so.0
580dd7a4
JB
192%dir %{_datadir}/libfreenect
193%{_datadir}/libfreenect/fwfetcher.py
194
195%files fakenect
196%defattr(644,root,root,755)
197%attr(755,root,root) %{_bindir}/fakenect
198%attr(755,root,root) %{_bindir}/fakenect-record
199%dir %{_libdir}/fakenect
200%attr(755,root,root) %{_libdir}/fakenect/libfakenect.so*
201%{_mandir}/man1/fakenect.1*
202%{_mandir}/man1/fakenect-record.1*
203
204%if %{with opencv}
205%files opencv
206%defattr(644,root,root,755)
207%attr(755,root,root) %{_bindir}/freenect-cvdemo
208%attr(755,root,root) %{_libdir}/libfreenect_cv.so.*.*.*
d95f1ef3 209%attr(755,root,root) %ghost %{_libdir}/libfreenect_cv.so.0
580dd7a4
JB
210%attr(755,root,root) %{_libdir}/libfreenect_cv.so
211%endif
212
213%if %{with openni2}
214%files -n OpenNI2-driver-freenect
215%defattr(644,root,root,755)
216%dir %{_libdir}/OpenNI2-FreenectDriver
217%attr(755,root,root) %{_libdir}/OpenNI2-FreenectDriver/libFreenectDriver.so*
218%endif
219
220%files devel
221%defattr(644,root,root,755)
222%attr(755,root,root) %{_libdir}/libfreenect.so
223%attr(755,root,root) %{_libdir}/libfreenect_sync.so
224%{_includedir}/libfreenect
225%{_pkgconfigdir}/libfreenect.pc
226%{_datadir}/libfreenect/libfreenectConfig.cmake
227
228%files static
229%defattr(644,root,root,755)
230%{_libdir}/libfreenect.a
231%{_libdir}/libfreenect_sync.a
232
233%if %{with python2}
234%files -n python-freenect
235%defattr(644,root,root,755)
236%attr(755,root,root) %{py_sitedir}/freenect.so
237%endif
238
239%if %{with python3}
240%files -n python3-freenect
241%defattr(644,root,root,755)
242%attr(755,root,root) %{py3_sitedir}/freenect.so
243%endif
This page took 0.092902 seconds and 4 git commands to generate.