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
16 Summary: OpenNI framework for Natural Interaction devices
17 Summary(pl.UTF-8): Szkielet OpenNI do urządzeń służących interakcji z naturą
23 Source0: https://github.com/OpenNI/OpenNI/tarball/Stable-%{version}/%{name}-%{version}.tar.gz
24 # Source0-md5: 5c6072e875a72180a696ee60460ba347
26 Patch0: %{name}-system-libs.patch
27 Patch1: %{name}-nosse.patch
28 Patch2: %{name}-c++.patch
29 Patch3: %{name}-mono.patch
30 URL: https://github.com/OpenNI/OpenNI/
31 BuildRequires: OpenGL-devel
33 BuildRequires: OpenGL-glut-devel >= 3
34 %{?with_apidocs:BuildRequires: doxygen}
35 %{?with_apidocs:BuildRequires: graphviz}
36 %{?with_java:BuildRequires: jdk >= 1.6.0}
37 BuildRequires: libjpeg-devel
38 BuildRequires: libstdc++-devel >= 6:4.0
39 BuildRequires: libusb-devel >= 1.0.8
40 %{?with_mono:BuildRequires: mono-csharp >= 4.0}
41 BuildRequires: python >= 1:2.6
42 BuildRequires: rpmbuild(macros) >= 1.566
43 BuildRequires: sed >= 4.0
44 # NOTE: other platforms need adding a dozen of defines in Include/Linux-*/*.h
45 ExclusiveArch: %{ix86} %{x8664} x32 arm
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 %define openni_platform x86
52 %define openni_platform x64
55 %define openni_platform Arm
59 OpenNI framework provides an application programming interface (API)
60 for writing applications utilizing natural interaction. This API
61 covers communication with both low level devices (e.g. vision and
62 audio sensors), as well as high-level middleware solutions (e.g. for
63 visual tracking using computer vision).
65 The OpenNI Framework provides the interface for physical devices and
66 for middleware components. The API enables modules to be registered in
67 the OpenNI framework and used to produce sensory data. Selecting the
68 hardware or middleware module is easy and flexible.
70 %description -l pl.UTF-8
71 Szkielet OpenNI zapewnia interfejs programistyczny (API) dla aplikacji
72 wykorzystujących interakcję z naturą. API to pokrywa komunikację
73 zarówno z urządzeniami niskiego poziomu (takimi jak czujniki obrazu i
74 dźwięku), jak i rozwiązaniami wysokiego poziomu warstwy pośredniej
75 (np. do wizualnego śledzenia przy użyciu obrazu komputerowego).
77 Szkielet OpenNI zapewnia interfejs dla fizycznych urządzeń oraz
78 komponentów warstwy pośredniej. API pozwala na rejestrowanie modułów w
79 szkielecie OpenNI i wykorzystywanie do tworzenia danych sensorycznych.
80 Wybór sprzętu i modułu pośredniego jest prosty i elastyczny.
83 Summary: Header files for OpenNI library
84 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenNI
85 Group: Development/Libraries
86 Requires: %{name} = %{version}-%{release}
89 Header files for OpenNI library.
91 %description devel -l pl.UTF-8
92 Pliki nagłówkowe biblioteki OpenNI.
95 Summary: OpenNI user guide
96 Summary(pl.UTF-8): Podręcznik użytkownika OpenNI
101 OpenNI user guide in PDF format.
103 %description doc -l pl.UTF-8
104 Podręcznik użytkownika OpenNI w formacie PDF.
107 Summary: OpenNI API documentation
108 Summary(pl.UTF-8): Dokumentacja API biblioteki OpenNI
113 API and internal documentation for OpenNI library.
115 %description apidocs -l pl.UTF-8
116 Dokumentacja API biblioteki OpenNI.
118 %package -n java-OpenNI
119 Summary: Java wrapper for OpenNI
120 Summary(pl.UTF-8): Interfejs Javy do OpenNI
121 Group: Libraries/Java
122 Requires: %{name} = %{version}-%{release}
123 Requires: jpackage-utils
124 Requires: jre >= 1.6.0
126 %description -n java-OpenNI
127 Java wrapper for OpenNI.
129 %description -n java-OpenNI -l pl.UTF-8
130 Interfejs Javy do OpenNI.
132 %package -n dotnet-OpenNI
133 Summary: .NET wrapper for OpenNI
134 Summary(pl.UTF-8): Interfejs .NET do OpenNI
136 Requires: %{name} = %{version}-%{release}
139 %description -n dotnet-OpenNI
140 .NET wrapper for OpenNI.
142 %description -n dotnet-OpenNI -l pl.UTF-8
143 Interfejs .NET do OpenNI.
146 %setup -q -n %{name}-%{name}-1e9524f
147 %undos Platform/Linux/Build/Samples/NiUserTracker/Makefile
154 %{__make} -C Platform/Linux/Build clean
155 export CFLAGS="%{rpmcflags}"
156 %{__make} -C Platform/Linux/Build \
159 HOSTPLATFORM=%{openni_platform} \
160 SSE_GENERATION=%{?with_sse3:3}%{!?with_sse3:%{?with_sse2:2}} \
161 %{?with_ssse3:SSSE3_ENABLED=1} \
162 %{!?with_java:ALL_JAVA_PROJS= JAVA_SAMPLES=} \
163 MONO_INSTALLED=%{?with_mono:1}
171 rm -rf $RPM_BUILD_ROOT
172 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/ni,/var/lib/ni}
174 BDIR=Platform/Linux/Bin/%{openni_platform}-PLD
175 install -p ${BDIR}/ni{Reg,License} $RPM_BUILD_ROOT%{_bindir}
176 install -p ${BDIR}/libOpenNI.so $RPM_BUILD_ROOT%{_libdir}
177 install -p ${BDIR}/libnim{Codecs,MockNodes,Recorder}.so $RPM_BUILD_ROOT%{_libdir}
178 cp -p Include/*.h $RPM_BUILD_ROOT%{_includedir}/ni
179 %ifarch %{ix86} %{x8664} x32
180 cp -pr Include/Linux-x86 $RPM_BUILD_ROOT%{_includedir}/ni
183 cp -pr Include/Linux-Arm $RPM_BUILD_ROOT%{_includedir}/ni
187 install -d $RPM_BUILD_ROOT%{_javadir}
188 install -p ${BDIR}/libOpenNI.jni.so $RPM_BUILD_ROOT%{_libdir}
189 cp -p ${BDIR}/org.openni.jar $RPM_BUILD_ROOT%{_javadir}
193 gacutil -i ${BDIR}/OpenNI.net.dll -package 4.5 -root $RPM_BUILD_ROOT%{_prefix}/lib
196 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
197 sed -e 's![@]prefix[@]!%{_prefix}!g' \
198 -e 's![@]exec_prefix[@]!%{_exec_prefix}!g' \
199 -e 's![@]libdir[@]!%{_libdir}!g' \
200 -e 's![@]includedir[@]!%{_includedir}!g' \
201 -e 's![@]version[@]!%{version}!g' \
202 %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/libopenni.pc
205 rm -rf $RPM_BUILD_ROOT
209 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so; do
210 %{_bindir}/niReg -r %{_libdir}/$mod
214 if [ "$1" = "0" ]; then
215 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so; do
216 %{_bindir}/niReg -u %{_libdir}/$mod
220 %postun -p /sbin/ldconfig
222 %post -n java-OpenNI -p /sbin/ldconfig
223 %postun -n java-OpenNI -p /sbin/ldconfig
226 %defattr(644,root,root,755)
227 %doc CHANGES NOTICE README
228 %attr(755,root,root) %{_bindir}/niLicense
229 %attr(755,root,root) %{_bindir}/niReg
230 %attr(755,root,root) %{_libdir}/libOpenNI.so
231 %attr(755,root,root) %{_libdir}/libnimCodecs.so
232 %attr(755,root,root) %{_libdir}/libnimMockNodes.so
233 %attr(755,root,root) %{_libdir}/libnimRecorder.so
237 %defattr(644,root,root,755)
239 %{_pkgconfigdir}/libopenni.pc
242 %defattr(644,root,root,755)
243 %doc Documentation/OpenNI_UserGuide.pdf
247 %defattr(644,root,root,755)
248 %doc Source/DoxyGen/html/*.{bmp,css,html,js,png}
252 %files -n java-OpenNI
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/libOpenNI.jni.so
255 %{_javadir}/org.openni.jar
259 %files -n dotnet-OpenNI
260 %defattr(644,root,root,755)
261 %{_prefix}/lib/mono/4.5/OpenNI.net.dll
262 %{_prefix}/lib/mono/gac/OpenNI.net