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
28 BuildRequires: OpenGL-glut-devel >= 3
29 %{?with_apidocs:BuildRequires: doxygen}
30 %{?with_apidocs:BuildRequires: graphviz}
31 %{?with_java:BuildRequires: jdk >= 1.6.0}
32 BuildRequires: libjpeg-devel
33 BuildRequires: libstdc++-devel >= 6:4.0
34 BuildRequires: libusb-devel >= 1.0.8
35 %{?with_mono:BuildRequires: mono-csharp}
36 BuildRequires: python >= 1:2.6
37 BuildRequires: sed >= 4.0
38 # NOTE: other platforms need adding a dozen of defines in Include/Linux-*/*.h
39 ExclusiveArch: %{ix86} %{x8664} arm
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define openni_platform x86
46 %define openni_platform x64
49 %define openni_platform Arm
53 OpenNI framework provides an application programming interface (API)
54 for writing applications utilizing natural interaction. This API
55 covers communication with both low level devices (e.g. vision and
56 audio sensors), as well as high-level middleware solutions (e.g. for
57 visual tracking using computer vision).
59 The OpenNI Framework provides the interface for physical devices and
60 for middleware components. The API enables modules to be registered in
61 the OpenNI framework and used to produce sensory data. Selecting the
62 hardware or middleware module is easy and flexible.
64 %description -l pl.UTF-8
65 Szkielet OpenNI zapewnia interfejs programistyczny (API) dla aplikacji
66 wykorzystujących interakcję z naturą. API to pokrywa komunikację
67 zarówno z urządzeniami niskiego poziomu (takimi jak czujniki obrazu i
68 dźwięku), jak i rozwiązaniami wysokiego poziomu warstwy pośredniej
69 (np. do wizualnego śledzenia przy użyciu obrazu komputerowego).
71 Szkielet OpenNI zapewnia interfejs dla fizycznych urządzeń oraz
72 komponentów warstwy pośredniej. API pozwala na rejestrowanie modułów w
73 szkielecie OpenNI i wykorzystywanie do tworzenia danych sensorycznych.
74 Wybór sprzętu i modułu pośredniego jest prosty i elastyczny.
77 Summary: Header files for OpenNI library
78 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenNI
79 Group: Development/Libraries
80 Requires: %{name} = %{version}-%{release}
83 Header files for OpenNI library.
85 %description devel -l pl.UTF-8
86 Pliki nagłówkowe biblioteki OpenNI.
89 Summary: OpenNI user guide
90 Summary(pl.UTF-8): Podręcznik użytkownika OpenNI
94 OpenNI user guide in PDF format.
96 %description doc -l pl.UTF-8
97 Podręcznik użytkownika OpenNI w formacie PDF.
100 Summary: OpenNI API documentation
101 Summary(pl.UTF-8): Dokumentacja API biblioteki OpenNI
105 API and internal documentation for OpenNI library.
107 %description apidocs -l pl.UTF-8
108 Dokumentacja API biblioteki OpenNI.
110 %package -n java-OpenNI
111 Summary: Java wrapper for OpenNI
112 Summary(pl.UTF-8): Interfejs Javy do OpenNI
113 Group: Libraries/Java
114 Requires: %{name} = %{version}-%{release}
115 Requires: jpackage-utils
116 Requires: jre >= 1.6.0
118 %description -n java-OpenNI
119 Java wrapper for OpenNI.
121 %description -n java-OpenNI -l pl.UTF-8
122 Interfejs Javy do OpenNI.
124 %package -n dotnet-OpenNI
125 Summary: .NET wrapper for OpenNI
126 Summary(pl.UTF-8): Interfejs .NET do OpenNI
128 Requires: %{name} = %{version}-%{release}
131 %description -n dotnet-OpenNI
132 .NET wrapper for OpenNI.
134 %description -n dotnet-OpenNI -l pl.UTF-8
135 Interfejs .NET do OpenNI.
138 %setup -q -n OpenNI-OpenNI-1516074
143 sed -i -e 's///' Wrappers/OpenNI.net/*.cs Samples/*.net/*.cs
146 %{__make} -C Platform/Linux/Build clean
147 export CFLAGS="%{rpmcflags}"
148 %{__make} -C Platform/Linux/Build \
151 HOSTPLATFORM=%{openni_platform} \
152 SSE_GENERATION=%{?with_sse3:3}%{!?with_sse3:%{?with_sse2:2}} \
153 %{?with_ssse3:SSSE3_ENABLED=1} \
154 %{!?with_mono:MONO_INSTALLED=0} \
155 %{!?with_java:ALL_JAVA_PROJS= JAVA_SAMPLES=}
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/ni,/var/lib/ni}
166 BDIR=Platform/Linux/Bin/%{openni_platform}-PLD
167 install ${BDIR}/ni{Reg,License} $RPM_BUILD_ROOT%{_bindir}
168 install ${BDIR}/libOpenNI.so $RPM_BUILD_ROOT%{_libdir}
169 install ${BDIR}/libnim{Codecs,MockNodes,Recorder}.so $RPM_BUILD_ROOT%{_libdir}
170 cp -p Include/*.h $RPM_BUILD_ROOT%{_includedir}/ni
171 %ifarch %{ix86} %{x8664}
172 cp -pr Include/Linux-x86 $RPM_BUILD_ROOT%{_includedir}/ni
175 cp -pr Include/Linux-Arm $RPM_BUILD_ROOT%{_includedir}/ni
179 install -d $RPM_BUILD_ROOT%{_javadir}
180 install ${BDIR}/libOpenNI.jni.so $RPM_BUILD_ROOT%{_libdir}
181 install ${BDIR}/org.OpenNI.jar $RPM_BUILD_ROOT%{_javadir}
185 gacutil -i ${BDIR}/OpenNI.net.dll -package 2.0 -root $RPM_BUILD_ROOT%{_prefix}/lib
189 rm -rf $RPM_BUILD_ROOT
193 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so ; do
194 %{_bindir}/niReg -r %{_libdir}/$mod
198 if [ "$1" = "0" ]; then
199 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so ; do
200 %{_bindir}/niReg -u %{_libdir}/$mod
204 %postun -p /sbin/ldconfig
207 %defattr(644,root,root,755)
209 %attr(755,root,root) %{_bindir}/niLicense
210 %attr(755,root,root) %{_bindir}/niReg
211 %attr(755,root,root) %{_libdir}/libOpenNI.so
212 %attr(755,root,root) %{_libdir}/libnimCodecs.so
213 %attr(755,root,root) %{_libdir}/libnimMockNodes.so
214 %attr(755,root,root) %{_libdir}/libnimRecorder.so
218 %defattr(644,root,root,755)
222 %defattr(644,root,root,755)
223 %doc Documentation/OpenNI_UserGuide.pdf
227 %defattr(644,root,root,755)
228 %doc Source/DoxyGen/html/*.{bmp,css,html,js,png}
232 %files -n java-OpenNI
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_libdir}/libOpenNI.jni.so
235 %{_javadir}/org.OpenNI.jar
239 %files -n dotnet-OpenNI
240 %defattr(644,root,root,755)
241 %{_prefix}/lib/mono/2.0/OpenNI.net.dll
242 %{_prefix}/lib/mono/gac/OpenNI.net