]> git.pld-linux.org Git - packages/OpenNI.git/blob - OpenNI.spec
- did they mean any GLUT 3?
[packages/OpenNI.git] / OpenNI.spec
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
13 Summary:        OpenNI framework for Natural Interaction devices
14 Summary(pl.UTF-8):      Szkielet OpenNI do urządzeń służących interakcji z naturą
15 Name:           OpenNI
16 Version:        1.5.2.23
17 Release:        1
18 License:        LGPL v3+
19 Group:          Libraries
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
27 # for examples
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)
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
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).
58
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.
63
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).
70
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.
75
76 %package devel
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}
81
82 %description devel
83 Header files for OpenNI library.
84
85 %description devel -l pl.UTF-8
86 Pliki nagłówkowe biblioteki OpenNI.
87
88 %package doc
89 Summary:        OpenNI user guide
90 Summary(pl.UTF-8):      Podręcznik użytkownika OpenNI
91 Group:          Documentation
92
93 %description doc
94 OpenNI user guide in PDF format.
95
96 %description doc -l pl.UTF-8
97 Podręcznik użytkownika OpenNI w formacie PDF.
98
99 %package apidocs
100 Summary:        OpenNI API documentation
101 Summary(pl.UTF-8):      Dokumentacja API biblioteki OpenNI
102 Group:          Documentation
103
104 %description apidocs
105 API and internal documentation for OpenNI library.
106
107 %description apidocs -l pl.UTF-8
108 Dokumentacja API biblioteki OpenNI.
109
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
117
118 %description -n java-OpenNI
119 Java wrapper for OpenNI.
120
121 %description -n java-OpenNI -l pl.UTF-8
122 Interfejs Javy do OpenNI.
123
124 %package -n dotnet-OpenNI
125 Summary:        .NET wrapper for OpenNI
126 Summary(pl.UTF-8):      Interfejs .NET do OpenNI
127 Group:          Libraries
128 Requires:       %{name} = %{version}-%{release}
129 Requires:       mono
130
131 %description -n dotnet-OpenNI
132 .NET wrapper for OpenNI.
133
134 %description -n dotnet-OpenNI -l pl.UTF-8
135 Interfejs .NET do OpenNI.
136
137 %prep
138 %setup -q -n OpenNI-OpenNI-1516074
139 %patch0 -p1
140 %patch1 -p1
141 %patch2 -p1
142
143 sed -i -e 's///' Wrappers/OpenNI.net/*.cs Samples/*.net/*.cs
144
145 %build
146 %{__make} -C Platform/Linux/Build clean
147 export 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}
158 cd Source/DoxyGen
159 doxygen Doxyfile
160 %endif
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/ni,/var/lib/ni}
165
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
173 %endif
174 %ifarch arm
175 cp -pr Include/Linux-Arm $RPM_BUILD_ROOT%{_includedir}/ni
176 %endif
177
178 %if %{with java}
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}
182 %endif
183
184 %if %{with mono}
185 gacutil -i ${BDIR}/OpenNI.net.dll -package 2.0 -root $RPM_BUILD_ROOT%{_prefix}/lib
186 %endif
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %post
192 /sbin/ldconfig
193 for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so ; do
194         %{_bindir}/niReg -r %{_libdir}/$mod
195 done
196
197 %preun
198 if [ "$1" = "0" ]; then
199         for mod in libnimMockNodes.so libnimCodecs.so libnimRecorder.so ; do
200                 %{_bindir}/niReg -u %{_libdir}/$mod
201         done
202 fi
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
215 %dir /var/lib/ni
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.070621 seconds and 3 git commands to generate.