]>
Commit | Line | Data |
---|---|---|
27554548 JB |
1 | Summary: PrimeSense Sensor Module for OpenNI framework |
2 | Summary(pl.UTF-8): Moduł czujnika PrimeSense dla szkieletu OpenNI | |
3 | Name: OpenNI-sensor-PrimeSense | |
a5d9f84a | 4 | Version: 5.1.6.6 |
27554548 | 5 | Release: 1 |
a5d9f84a | 6 | License: Apache v2.0 |
27554548 | 7 | Group: Libraries |
a5d9f84a JB |
8 | Source0: https://github.com/PrimeSense/Sensor/tarball/Stable-%{version}/PrimeSense-%{version}.tar.gz |
9 | # Source0-md5: 8d4e082acf75964f109039a87feccc78 | |
27554548 JB |
10 | Patch0: %{name}-system-libs.patch |
11 | URL: http://www.primesense.com/ | |
a5d9f84a | 12 | BuildRequires: OpenNI-devel >= 1.5 |
27554548 JB |
13 | BuildRequires: libjpeg-devel |
14 | BuildRequires: libstdc++-devel >= 6:4.0 | |
a5d9f84a | 15 | Requires(post,preun): OpenNI >= 1.5 |
27554548 JB |
16 | # NOTE: other platforms need adding support in OpenNI |
17 | ExclusiveArch: %{ix86} %{x8664} arm | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %ifarch %{ix86} | |
21 | %define openni_platform x86 | |
22 | %endif | |
23 | %ifarch %{x8664} | |
24 | %define openni_platform x64 | |
25 | %endif | |
26 | %ifarch arm | |
27 | %define openni_platform Arm | |
28 | %endif | |
29 | ||
30 | %description | |
31 | PrimeSense Sensor Module for OpenNI framework. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | Moduł czujnika PrimeSense dla szkieletu OpenNI. | |
35 | ||
36 | %package -n udev-OpenNI-sensor-PrimeSense | |
37 | Summary: Udev rules for PrimeSense sensors | |
38 | Summary(pl.UTF-8): Reguły udev dla czujników PrimeSense | |
39 | Group: Applications/System | |
40 | Requires: %{name} = %{version}-%{release} | |
41 | Requires: udev-core | |
42 | ||
43 | %description -n udev-OpenNI-sensor-PrimeSense | |
44 | Udev rules for PrimeSense sensors. | |
45 | ||
46 | %description -n udev-OpenNI-sensor-PrimeSense -l pl.UTF-8 | |
47 | Reguły udev dla czujników PrimeSense. | |
48 | ||
49 | %prep | |
a5d9f84a | 50 | %setup -q -n PrimeSense-Sensor-9108048 |
27554548 JB |
51 | %patch0 -p1 |
52 | ||
53 | %build | |
54 | %{__make} -C Platform/Linux/Build clean | |
55 | export CFLAGS="%{rpmcflags}" | |
56 | %{__make} -C Platform/Linux/Build \ | |
57 | CFG=PLD \ | |
58 | CXX="%{__cxx}" \ | |
59 | HOSTPLATFORM=%{openni_platform} | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},/etc/udev/rules.d} \ | |
64 | $RPM_BUILD_ROOT{%{_sysconfdir}/primesense,/var/log/primesense/XnSensorServer} | |
65 | ||
66 | BDIR=Platform/Linux/Bin/%{openni_platform}-PLD | |
67 | install ${BDIR}/XnSensorServer $RPM_BUILD_ROOT%{_bindir} | |
68 | install ${BDIR}/libXn{Core,DDK,DeviceFile,DeviceSensorV2,Formats}.so $RPM_BUILD_ROOT%{_libdir} | |
69 | install Data/GlobalDefaults.ini $RPM_BUILD_ROOT%{_sysconfdir}/primesense | |
70 | install Platform/Linux/Install/55-primesense-usb.rules $RPM_BUILD_ROOT/etc/udev/rules.d | |
71 | ||
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %post | |
76 | /sbin/ldconfig | |
77 | for mod in libXnDeviceSensorV2.so libXnDeviceFile.so ; do | |
78 | %{_bindir}/niReg -r %{_libdir}/$mod | |
79 | done | |
80 | ||
81 | %preun | |
82 | if [ "$1" = "0" ]; then | |
83 | for mod in libXnDeviceSensorV2.so libXnDeviceFile.so ; do | |
84 | %{_bindir}/niReg -u %{_libdir}/$mod | |
85 | done | |
86 | fi | |
87 | ||
88 | %postun -p /sbin/ldconfig | |
89 | ||
90 | %files | |
91 | %defattr(644,root,root,755) | |
a5d9f84a | 92 | %doc CHANGES NOTICE README |
27554548 JB |
93 | %attr(755,root,root) %{_bindir}/XnSensorServer |
94 | %attr(755,root,root) %{_libdir}/libXnCore.so | |
95 | %attr(755,root,root) %{_libdir}/libXnDDK.so | |
96 | %attr(755,root,root) %{_libdir}/libXnDeviceFile.so | |
97 | %attr(755,root,root) %{_libdir}/libXnDeviceSensorV2.so | |
98 | %attr(755,root,root) %{_libdir}/libXnFormats.so | |
99 | %dir %{_sysconfdir}/primesense | |
100 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/primesense/GlobalDefaults.ini | |
101 | ||
102 | %files -n udev-OpenNI-sensor-PrimeSense | |
103 | %defattr(644,root,root,755) | |
104 | /etc/udev/rules.d/55-primesense-usb.rules |