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