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