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 URL: http://openni.org/
29 BuildRequires: OpenGL-devel
31 BuildRequires: OpenGL-glut-devel >= 3
32 %{?with_apidocs:BuildRequires: doxygen}
33 %{?with_apidocs:BuildRequires: graphviz}
34 %{?with_java:BuildRequires: jdk >= 1.6.0}
35 BuildRequires: libjpeg-devel
36 BuildRequires: libstdc++-devel >= 6:4.0
37 BuildRequires: libusb-devel >= 1.0.8
38 %{?with_mono:BuildRequires: mono-csharp}
39 BuildRequires: python >= 1:2.6
40 BuildRequires: rpmbuild(macros) >= 1.566
41 BuildRequires: sed >= 4.0
42 # NOTE: other platforms need adding a dozen of defines in Include/Linux-*/*.h
43 ExclusiveArch: %{ix86} %{x8664} x32 arm
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 %define openni_platform x86
50 %define openni_platform x64
53 %define openni_platform Arm
57 OpenNI framework provides an application programming interface (API)
58 for writing applications utilizing natural interaction. This API
59 covers communication with both low level devices (e.g. vision and
60 audio sensors), as well as high-level middleware solutions (e.g. for
61 visual tracking using computer vision).
63 The OpenNI Framework provides the interface for physical devices and
64 for middleware components. The API enables modules to be registered in
65 the OpenNI framework and used to produce sensory data. Selecting the
66 hardware or middleware module is easy and flexible.
68 %description -l pl.UTF-8
69 Szkielet OpenNI zapewnia interfejs programistyczny (API) dla aplikacji
70 wykorzystujących interakcję z naturą. API to pokrywa komunikację
71 zarówno z urządzeniami niskiego poziomu (takimi jak czujniki obrazu i
72 dźwięku), jak i rozwiązaniami wysokiego poziomu warstwy pośredniej
73 (np. do wizualnego śledzenia przy użyciu obrazu komputerowego).
75 Szkielet OpenNI zapewnia interfejs dla fizycznych urządzeń oraz
76 komponentów warstwy pośredniej. API pozwala na rejestrowanie modułów w
77 szkielecie OpenNI i wykorzystywanie do tworzenia danych sensorycznych.
78 Wybór sprzętu i modułu pośredniego jest prosty i elastyczny.
81 Summary: Header files for OpenNI library
82 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenNI
83 Group: Development/Libraries
84 Requires: %{name} = %{version}-%{release}
87 Header files for OpenNI library.
89 %description devel -l pl.UTF-8
90 Pliki nagłówkowe biblioteki OpenNI.
93 Summary: OpenNI user guide
94 Summary(pl.UTF-8): Podręcznik użytkownika OpenNI
96 %if "%{_rpmversion}" >= "5"
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
110 %if "%{_rpmversion}" >= "5"
115 API and internal documentation for OpenNI library.
117 %description apidocs -l pl.UTF-8
118 Dokumentacja API biblioteki OpenNI.
120 %package -n java-OpenNI
121 Summary: Java wrapper for OpenNI
122 Summary(pl.UTF-8): Interfejs Javy do OpenNI
123 Group: Libraries/Java
124 Requires: %{name} = %{version}-%{release}
125 Requires: jpackage-utils
126 Requires: jre >= 1.6.0
128 %description -n java-OpenNI
129 Java wrapper for OpenNI.
131 %description -n java-OpenNI -l pl.UTF-8
132 Interfejs Javy do OpenNI.
134 %package -n dotnet-OpenNI
135 Summary: .NET wrapper for OpenNI
136 Summary(pl.UTF-8): Interfejs .NET do OpenNI
138 Requires: %{name} = %{version}-%{release}
141 %description -n dotnet-OpenNI
142 .NET wrapper for OpenNI.
144 %description -n dotnet-OpenNI -l pl.UTF-8
145 Interfejs .NET do OpenNI.
148 %setup -q -n %{name}-%{name}-1e9524f
149 %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=}
170 rm -rf $RPM_BUILD_ROOT
171 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/ni,/var/lib/ni}
173 BDIR=Platform/Linux/Bin/%{openni_platform}-PLD
174 install -p ${BDIR}/ni{Reg,License} $RPM_BUILD_ROOT%{_bindir}
175 install -p ${BDIR}/libOpenNI.so $RPM_BUILD_ROOT%{_libdir}
176 install -p ${BDIR}/libnim{Codecs,MockNodes,Recorder}.so $RPM_BUILD_ROOT%{_libdir}
177 cp -p Include/*.h $RPM_BUILD_ROOT%{_includedir}/ni
178 %ifarch %{ix86} %{x8664} x32
179 cp -pr Include/Linux-x86 $RPM_BUILD_ROOT%{_includedir}/ni
182 cp -pr Include/Linux-Arm $RPM_BUILD_ROOT%{_includedir}/ni
186 install -d $RPM_BUILD_ROOT%{_javadir}
187 install -p ${BDIR}/libOpenNI.jni.so $RPM_BUILD_ROOT%{_libdir}
188 cp -p ${BDIR}/org.openni.jar $RPM_BUILD_ROOT%{_javadir}
192 gacutil -i ${BDIR}/OpenNI.net.dll -package 2.0 -root $RPM_BUILD_ROOT%{_prefix}/lib
195 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
196 sed -e 's![@]prefix[@]!%{_prefix}!g' \
197 -e 's![@]exec_prefix[@]!%{_exec_prefix}!g' \
198 -e 's![@]libdir[@]!%{_libdir}!g' \
199 -e 's![@]includedir[@]!%{_includedir}!g' \
200 -e 's![@]version[@]!%{version}!g' \
201 %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/libopenni.pc
204 rm -rf $RPM_BUILD_ROOT
208 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so; do
209 %{_bindir}/niReg -r %{_libdir}/$mod
213 if [ "$1" = "0" ]; then
214 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so; do
215 %{_bindir}/niReg -u %{_libdir}/$mod
219 %postun -p /sbin/ldconfig
221 %post -n java-OpenNI -p /sbin/ldconfig
222 %postun -n java-OpenNI -p /sbin/ldconfig
225 %defattr(644,root,root,755)
226 %doc CHANGES NOTICE README
227 %attr(755,root,root) %{_bindir}/niLicense
228 %attr(755,root,root) %{_bindir}/niReg
229 %attr(755,root,root) %{_libdir}/libOpenNI.so
230 %attr(755,root,root) %{_libdir}/libnimCodecs.so
231 %attr(755,root,root) %{_libdir}/libnimMockNodes.so
232 %attr(755,root,root) %{_libdir}/libnimRecorder.so
236 %defattr(644,root,root,755)
238 %{_pkgconfigdir}/libopenni.pc
241 %defattr(644,root,root,755)
242 %doc Documentation/OpenNI_UserGuide.pdf
246 %defattr(644,root,root,755)
247 %doc Source/DoxyGen/html/*.{bmp,css,html,js,png}
251 %files -n java-OpenNI
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{_libdir}/libOpenNI.jni.so
254 %{_javadir}/org.openni.jar
258 %files -n dotnet-OpenNI
259 %defattr(644,root,root,755)
260 %{_prefix}/lib/mono/2.0/OpenNI.net.dll
261 %{_prefix}/lib/mono/gac/OpenNI.net