]> git.pld-linux.org Git - packages/OpenNI.git/blame - OpenNI.spec
- did they mean any GLUT 3?
[packages/OpenNI.git] / OpenNI.spec
CommitLineData
15e3f957
JB
1#
2# Conditional build:
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
9#
10%if %{with ssse}
11%define with_sse3 1
12%endif
13Summary: OpenNI framework for Natural Interaction devices
14Summary(pl.UTF-8): Szkielet OpenNI do urządzeń służących interakcji z naturą
15Name: OpenNI
16Version: 1.5.2.23
17Release: 1
18License: LGPL v3+
19Group: Libraries
20Source0: https://github.com/OpenNI/OpenNI/tarball/Stable-%{version}#/%{name}-%{version}.tar.gz
21# Source0-md5: 12389c56bf3685a741f6bcfa068585ff
22Patch0: %{name}-system-libs.patch
23Patch1: %{name}-link.patch
24Patch2: %{name}-nosse.patch
25URL: http://openni.org/
26BuildRequires: OpenGL-devel
5317508f
JB
27# for examples
28BuildRequires: OpenGL-glut-devel >= 3
15e3f957 29%{?with_apidocs:BuildRequires: doxygen}
15e3f957
JB
30%{?with_apidocs:BuildRequires: graphviz}
31%{?with_java:BuildRequires: jdk >= 1.6.0}
32BuildRequires: libjpeg-devel
33BuildRequires: libstdc++-devel >= 6:4.0
34BuildRequires: libusb-devel >= 1.0.8
35%{?with_mono:BuildRequires: mono-csharp}
36BuildRequires: python >= 1:2.6
37BuildRequires: sed >= 4.0
7c20a007 38# NOTE: other platforms need adding a dozen of defines in Include/Linux-*/*.h
15e3f957
JB
39ExclusiveArch: %{ix86} %{x8664} arm
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%ifarch %{ix86}
43%define openni_platform x86
44%endif
45%ifarch %{x8664}
46%define openni_platform x64
47%endif
48%ifarch arm
49%define openni_platform Arm
50%endif
51
52%description
53OpenNI framework provides an application programming interface (API)
54for writing applications utilizing natural interaction. This API
55covers communication with both low level devices (e.g. vision and
56audio sensors), as well as high-level middleware solutions (e.g. for
57visual tracking using computer vision).
58
59The OpenNI Framework provides the interface for physical devices and
60for middleware components. The API enables modules to be registered in
61the OpenNI framework and used to produce sensory data. Selecting the
62hardware or middleware module is easy and flexible.
63
64%description -l pl.UTF-8
65Szkielet OpenNI zapewnia interfejs programistyczny (API) dla aplikacji
66wykorzystujących interakcję z naturą. API to pokrywa komunikację
67zarówno z urządzeniami niskiego poziomu (takimi jak czujniki obrazu i
68dźwięku), jak i rozwiązaniami wysokiego poziomu warstwy pośredniej
69(np. do wizualnego śledzenia przy użyciu obrazu komputerowego).
70
71Szkielet OpenNI zapewnia interfejs dla fizycznych urządzeń oraz
72komponentów warstwy pośredniej. API pozwala na rejestrowanie modułów w
73szkielecie OpenNI i wykorzystywanie do tworzenia danych sensorycznych.
74Wybór sprzętu i modułu pośredniego jest prosty i elastyczny.
75
76%package devel
77Summary: Header files for OpenNI library
78Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenNI
79Group: Development/Libraries
80Requires: %{name} = %{version}-%{release}
81
82%description devel
83Header files for OpenNI library.
84
85%description devel -l pl.UTF-8
86Pliki nagłówkowe biblioteki OpenNI.
87
88%package doc
89Summary: OpenNI user guide
90Summary(pl.UTF-8): Podręcznik użytkownika OpenNI
91Group: Documentation
92
93%description doc
94OpenNI user guide in PDF format.
95
96%description doc -l pl.UTF-8
97Podręcznik użytkownika OpenNI w formacie PDF.
98
99%package apidocs
100Summary: OpenNI API documentation
101Summary(pl.UTF-8): Dokumentacja API biblioteki OpenNI
102Group: Documentation
103
104%description apidocs
105API and internal documentation for OpenNI library.
106
107%description apidocs -l pl.UTF-8
108Dokumentacja API biblioteki OpenNI.
109
110%package -n java-OpenNI
111Summary: Java wrapper for OpenNI
112Summary(pl.UTF-8): Interfejs Javy do OpenNI
113Group: Libraries/Java
114Requires: %{name} = %{version}-%{release}
115Requires: jpackage-utils
116Requires: jre >= 1.6.0
117
118%description -n java-OpenNI
119Java wrapper for OpenNI.
120
121%description -n java-OpenNI -l pl.UTF-8
122Interfejs Javy do OpenNI.
123
124%package -n dotnet-OpenNI
125Summary: .NET wrapper for OpenNI
126Summary(pl.UTF-8): Interfejs .NET do OpenNI
127Group: Libraries
128Requires: %{name} = %{version}-%{release}
129Requires: mono
130
131%description -n dotnet-OpenNI
132.NET wrapper for OpenNI.
133
134%description -n dotnet-OpenNI -l pl.UTF-8
135Interfejs .NET do OpenNI.
136
137%prep
138%setup -q -n OpenNI-OpenNI-1516074
139%patch0 -p1
140%patch1 -p1
141%patch2 -p1
142
143sed -i -e 's///' Wrappers/OpenNI.net/*.cs Samples/*.net/*.cs
144
145%build
146%{__make} -C Platform/Linux/Build clean
147export CFLAGS="%{rpmcflags}"
148%{__make} -C Platform/Linux/Build \
149 CFG=PLD \
150 CXX="%{__cxx}" \
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=}
156
157%if %{with apidocs}
158cd Source/DoxyGen
159doxygen Doxyfile
160%endif
161
162%install
163rm -rf $RPM_BUILD_ROOT
164install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/ni,/var/lib/ni}
165
166BDIR=Platform/Linux/Bin/%{openni_platform}-PLD
167install ${BDIR}/ni{Reg,License} $RPM_BUILD_ROOT%{_bindir}
168install ${BDIR}/libOpenNI.so $RPM_BUILD_ROOT%{_libdir}
169install ${BDIR}/libnim{Codecs,MockNodes,Recorder}.so $RPM_BUILD_ROOT%{_libdir}
170cp -p Include/*.h $RPM_BUILD_ROOT%{_includedir}/ni
171%ifarch %{ix86} %{x8664}
172cp -pr Include/Linux-x86 $RPM_BUILD_ROOT%{_includedir}/ni
173%endif
174%ifarch arm
175cp -pr Include/Linux-Arm $RPM_BUILD_ROOT%{_includedir}/ni
176%endif
177
178%if %{with java}
179install -d $RPM_BUILD_ROOT%{_javadir}
180install ${BDIR}/libOpenNI.jni.so $RPM_BUILD_ROOT%{_libdir}
181install ${BDIR}/org.OpenNI.jar $RPM_BUILD_ROOT%{_javadir}
182%endif
183
184%if %{with mono}
185gacutil -i ${BDIR}/OpenNI.net.dll -package 2.0 -root $RPM_BUILD_ROOT%{_prefix}/lib
186%endif
187
188%clean
189rm -rf $RPM_BUILD_ROOT
190
191%post
192/sbin/ldconfig
193for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so ; do
194 %{_bindir}/niReg -r %{_libdir}/$mod
195done
196
197%preun
198if [ "$1" = "0" ]; then
199 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so ; do
200 %{_bindir}/niReg -u %{_libdir}/$mod
201 done
202fi
203
204%postun -p /sbin/ldconfig
205
206%files
207%defattr(644,root,root,755)
208%doc CHANGES README
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
c714cde4 215%dir /var/lib/ni
15e3f957
JB
216
217%files devel
218%defattr(644,root,root,755)
219%{_includedir}/ni
220
221%files doc
222%defattr(644,root,root,755)
223%doc Documentation/OpenNI_UserGuide.pdf
224
225%if %{with apidocs}
226%files apidocs
227%defattr(644,root,root,755)
228%doc Source/DoxyGen/html/*.{bmp,css,html,js,png}
229%endif
230
231%if %{with java}
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
236%endif
237
238%if %{with mono}
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
243%endif
This page took 0.079411 seconds and 4 git commands to generate.