3 %bcond_without apidocs # API documentation
4 %bcond_without java # Java wrappers
5 %bcond_without mono # Mono/.NET wrappers
6 %bcond_with sse2 # use SSE2 instructions
7 %bcond_with sse3 # use SSE3 instructions
8 %bcond_with ssse3 # use SSE3 and SSSE3 instructions
13 Summary: OpenNI framework for Natural Interaction devices
14 Summary(pl.UTF-8): Szkielet OpenNI do urządzeń służących interakcji z naturą
20 Source0: https://github.com/OpenNI/OpenNI/tarball/Stable-%{version}#/%{name}-%{version}.tar.gz
21 # Source0-md5: 12389c56bf3685a741f6bcfa068585ff
22 Patch0: %{name}-system-libs.patch
23 Patch1: %{name}-link.patch
24 Patch2: %{name}-nosse.patch
25 URL: http://openni.org/
26 BuildRequires: OpenGL-devel
27 %{?with_apidocs:BuildRequires: doxygen}
28 #BuildRequires: freeglut-devel >= 3
29 %{?with_apidocs:BuildRequires: graphviz}
30 %{?with_java:BuildRequires: jdk >= 1.6.0}
31 BuildRequires: libjpeg-devel
32 BuildRequires: libstdc++-devel >= 6:4.0
33 BuildRequires: libusb-devel >= 1.0.8
34 %{?with_mono:BuildRequires: mono-csharp}
35 BuildRequires: python >= 1:2.6
36 BuildRequires: sed >= 4.0
37 # NOTE: other platforms need adding a dozen of defines in Include/Linux-*/*.h
38 ExclusiveArch: %{ix86} %{x8664} arm
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define openni_platform x86
45 %define openni_platform x64
48 %define openni_platform Arm
52 OpenNI framework provides an application programming interface (API)
53 for writing applications utilizing natural interaction. This API
54 covers communication with both low level devices (e.g. vision and
55 audio sensors), as well as high-level middleware solutions (e.g. for
56 visual tracking using computer vision).
58 The OpenNI Framework provides the interface for physical devices and
59 for middleware components. The API enables modules to be registered in
60 the OpenNI framework and used to produce sensory data. Selecting the
61 hardware or middleware module is easy and flexible.
63 %description -l pl.UTF-8
64 Szkielet OpenNI zapewnia interfejs programistyczny (API) dla aplikacji
65 wykorzystujących interakcję z naturą. API to pokrywa komunikację
66 zarówno z urządzeniami niskiego poziomu (takimi jak czujniki obrazu i
67 dźwięku), jak i rozwiązaniami wysokiego poziomu warstwy pośredniej
68 (np. do wizualnego śledzenia przy użyciu obrazu komputerowego).
70 Szkielet OpenNI zapewnia interfejs dla fizycznych urządzeń oraz
71 komponentów warstwy pośredniej. API pozwala na rejestrowanie modułów w
72 szkielecie OpenNI i wykorzystywanie do tworzenia danych sensorycznych.
73 Wybór sprzętu i modułu pośredniego jest prosty i elastyczny.
76 Summary: Header files for OpenNI library
77 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenNI
78 Group: Development/Libraries
79 Requires: %{name} = %{version}-%{release}
82 Header files for OpenNI library.
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe biblioteki OpenNI.
88 Summary: OpenNI user guide
89 Summary(pl.UTF-8): Podręcznik użytkownika OpenNI
93 OpenNI user guide in PDF format.
95 %description doc -l pl.UTF-8
96 Podręcznik użytkownika OpenNI w formacie PDF.
99 Summary: OpenNI API documentation
100 Summary(pl.UTF-8): Dokumentacja API biblioteki OpenNI
104 API and internal documentation for OpenNI library.
106 %description apidocs -l pl.UTF-8
107 Dokumentacja API biblioteki OpenNI.
109 %package -n java-OpenNI
110 Summary: Java wrapper for OpenNI
111 Summary(pl.UTF-8): Interfejs Javy do OpenNI
112 Group: Libraries/Java
113 Requires: %{name} = %{version}-%{release}
114 Requires: jpackage-utils
115 Requires: jre >= 1.6.0
117 %description -n java-OpenNI
118 Java wrapper for OpenNI.
120 %description -n java-OpenNI -l pl.UTF-8
121 Interfejs Javy do OpenNI.
123 %package -n dotnet-OpenNI
124 Summary: .NET wrapper for OpenNI
125 Summary(pl.UTF-8): Interfejs .NET do OpenNI
127 Requires: %{name} = %{version}-%{release}
130 %description -n dotnet-OpenNI
131 .NET wrapper for OpenNI.
133 %description -n dotnet-OpenNI -l pl.UTF-8
134 Interfejs .NET do OpenNI.
137 %setup -q -n OpenNI-OpenNI-1516074
142 sed -i -e 's///' Wrappers/OpenNI.net/*.cs Samples/*.net/*.cs
145 %{__make} -C Platform/Linux/Build clean
146 export CFLAGS="%{rpmcflags}"
147 %{__make} -C Platform/Linux/Build \
150 HOSTPLATFORM=%{openni_platform} \
151 SSE_GENERATION=%{?with_sse3:3}%{!?with_sse3:%{?with_sse2:2}} \
152 %{?with_ssse3:SSSE3_ENABLED=1} \
153 %{!?with_mono:MONO_INSTALLED=0} \
154 %{!?with_java:ALL_JAVA_PROJS= JAVA_SAMPLES=}
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/ni,/var/lib/ni}
165 BDIR=Platform/Linux/Bin/%{openni_platform}-PLD
166 install ${BDIR}/ni{Reg,License} $RPM_BUILD_ROOT%{_bindir}
167 install ${BDIR}/libOpenNI.so $RPM_BUILD_ROOT%{_libdir}
168 install ${BDIR}/libnim{Codecs,MockNodes,Recorder}.so $RPM_BUILD_ROOT%{_libdir}
169 cp -p Include/*.h $RPM_BUILD_ROOT%{_includedir}/ni
170 %ifarch %{ix86} %{x8664}
171 cp -pr Include/Linux-x86 $RPM_BUILD_ROOT%{_includedir}/ni
174 cp -pr Include/Linux-Arm $RPM_BUILD_ROOT%{_includedir}/ni
178 install -d $RPM_BUILD_ROOT%{_javadir}
179 install ${BDIR}/libOpenNI.jni.so $RPM_BUILD_ROOT%{_libdir}
180 install ${BDIR}/org.OpenNI.jar $RPM_BUILD_ROOT%{_javadir}
184 gacutil -i ${BDIR}/OpenNI.net.dll -package 2.0 -root $RPM_BUILD_ROOT%{_prefix}/lib
188 rm -rf $RPM_BUILD_ROOT
192 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so ; do
193 %{_bindir}/niReg -r %{_libdir}/$mod
197 if [ "$1" = "0" ]; then
198 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so ; do
199 %{_bindir}/niReg -u %{_libdir}/$mod
203 %postun -p /sbin/ldconfig
206 %defattr(644,root,root,755)
208 %attr(755,root,root) %{_bindir}/niLicense
209 %attr(755,root,root) %{_bindir}/niReg
210 %attr(755,root,root) %{_libdir}/libOpenNI.so
211 %attr(755,root,root) %{_libdir}/libnimCodecs.so
212 %attr(755,root,root) %{_libdir}/libnimMockNodes.so
213 %attr(755,root,root) %{_libdir}/libnimRecorder.so
216 %defattr(644,root,root,755)
220 %defattr(644,root,root,755)
221 %doc Documentation/OpenNI_UserGuide.pdf
225 %defattr(644,root,root,755)
226 %doc Source/DoxyGen/html/*.{bmp,css,html,js,png}
230 %files -n java-OpenNI
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_libdir}/libOpenNI.jni.so
233 %{_javadir}/org.OpenNI.jar
237 %files -n dotnet-OpenNI
238 %defattr(644,root,root,755)
239 %{_prefix}/lib/mono/2.0/OpenNI.net.dll
240 %{_prefix}/lib/mono/gac/OpenNI.net