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