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
98 %if "%{_rpmversion}" >= "5"
103 OpenNI user guide in PDF format.
105 %description doc -l pl.UTF-8
106 Podręcznik użytkownika OpenNI w formacie PDF.
109 Summary: OpenNI API documentation
110 Summary(pl.UTF-8): Dokumentacja API biblioteki OpenNI
112 %if "%{_rpmversion}" >= "5"
117 API and internal documentation for OpenNI library.
119 %description apidocs -l pl.UTF-8
120 Dokumentacja API biblioteki OpenNI.
122 %package -n java-OpenNI
123 Summary: Java wrapper for OpenNI
124 Summary(pl.UTF-8): Interfejs Javy do OpenNI
125 Group: Libraries/Java
126 Requires: %{name} = %{version}-%{release}
127 Requires: jpackage-utils
128 Requires: jre >= 1.6.0
130 %description -n java-OpenNI
131 Java wrapper for OpenNI.
133 %description -n java-OpenNI -l pl.UTF-8
134 Interfejs Javy do OpenNI.
136 %package -n dotnet-OpenNI
137 Summary: .NET wrapper for OpenNI
138 Summary(pl.UTF-8): Interfejs .NET do OpenNI
140 Requires: %{name} = %{version}-%{release}
143 %description -n dotnet-OpenNI
144 .NET wrapper for OpenNI.
146 %description -n dotnet-OpenNI -l pl.UTF-8
147 Interfejs .NET do OpenNI.
150 %setup -q -n %{name}-%{name}-1e9524f
151 %undos Platform/Linux/Build/Samples/NiUserTracker/Makefile
158 %{__make} -C Platform/Linux/Build clean
159 export CFLAGS="%{rpmcflags}"
160 %{__make} -C Platform/Linux/Build \
163 HOSTPLATFORM=%{openni_platform} \
164 SSE_GENERATION=%{?with_sse3:3}%{!?with_sse3:%{?with_sse2:2}} \
165 %{?with_ssse3:SSSE3_ENABLED=1} \
166 %{!?with_java:ALL_JAVA_PROJS= JAVA_SAMPLES=} \
167 MONO_INSTALLED=%{?with_mono:1}
175 rm -rf $RPM_BUILD_ROOT
176 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/ni,/var/lib/ni}
178 BDIR=Platform/Linux/Bin/%{openni_platform}-PLD
179 install -p ${BDIR}/ni{Reg,License} $RPM_BUILD_ROOT%{_bindir}
180 install -p ${BDIR}/libOpenNI.so $RPM_BUILD_ROOT%{_libdir}
181 install -p ${BDIR}/libnim{Codecs,MockNodes,Recorder}.so $RPM_BUILD_ROOT%{_libdir}
182 cp -p Include/*.h $RPM_BUILD_ROOT%{_includedir}/ni
183 %ifarch %{ix86} %{x8664} x32
184 cp -pr Include/Linux-x86 $RPM_BUILD_ROOT%{_includedir}/ni
187 cp -pr Include/Linux-Arm $RPM_BUILD_ROOT%{_includedir}/ni
191 install -d $RPM_BUILD_ROOT%{_javadir}
192 install -p ${BDIR}/libOpenNI.jni.so $RPM_BUILD_ROOT%{_libdir}
193 cp -p ${BDIR}/org.openni.jar $RPM_BUILD_ROOT%{_javadir}
197 gacutil -i ${BDIR}/OpenNI.net.dll -package 4.5 -root $RPM_BUILD_ROOT%{_prefix}/lib
200 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
201 sed -e 's![@]prefix[@]!%{_prefix}!g' \
202 -e 's![@]exec_prefix[@]!%{_exec_prefix}!g' \
203 -e 's![@]libdir[@]!%{_libdir}!g' \
204 -e 's![@]includedir[@]!%{_includedir}!g' \
205 -e 's![@]version[@]!%{version}!g' \
206 %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/libopenni.pc
209 rm -rf $RPM_BUILD_ROOT
213 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so; do
214 %{_bindir}/niReg -r %{_libdir}/$mod
218 if [ "$1" = "0" ]; then
219 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so; do
220 %{_bindir}/niReg -u %{_libdir}/$mod
224 %postun -p /sbin/ldconfig
226 %post -n java-OpenNI -p /sbin/ldconfig
227 %postun -n java-OpenNI -p /sbin/ldconfig
230 %defattr(644,root,root,755)
231 %doc CHANGES NOTICE README
232 %attr(755,root,root) %{_bindir}/niLicense
233 %attr(755,root,root) %{_bindir}/niReg
234 %attr(755,root,root) %{_libdir}/libOpenNI.so
235 %attr(755,root,root) %{_libdir}/libnimCodecs.so
236 %attr(755,root,root) %{_libdir}/libnimMockNodes.so
237 %attr(755,root,root) %{_libdir}/libnimRecorder.so
241 %defattr(644,root,root,755)
243 %{_pkgconfigdir}/libopenni.pc
246 %defattr(644,root,root,755)
247 %doc Documentation/OpenNI_UserGuide.pdf
251 %defattr(644,root,root,755)
252 %doc Source/DoxyGen/html/*.{bmp,css,html,js,png}
256 %files -n java-OpenNI
257 %defattr(644,root,root,755)
258 %attr(755,root,root) %{_libdir}/libOpenNI.jni.so
259 %{_javadir}/org.openni.jar
263 %files -n dotnet-OpenNI
264 %defattr(644,root,root,755)
265 %{_prefix}/lib/mono/4.5/OpenNI.net.dll
266 %{_prefix}/lib/mono/gac/OpenNI.net