]>
Commit | Line | Data |
---|---|---|
61bf55c6 | 1 | # TODO: openhaptics, ghost, wiiuse(GPL v3), libnifalcon, intersense, nidaqmx, viewpoint, phasespace, libfreespace |
66276c24 JB |
2 | # NATIONAL_INSTRUMENTS, NIDAQ, USDIGITAL, MICROSCRIBE, MONITONNODE, TRIVISIOCOLIBRI ??? |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without apidocs # do not build and package API docs | |
6 | %bcond_without gpm # GPM Linux mouse interface support (GPL v2+) | |
61bf55c6 | 7 | %bcond_without modbus # Modbus support |
66276c24 JB |
8 | %bcond_with mpi # MPI support |
9 | %bcond_without java # Java binding | |
10 | # | |
11 | %define with_gpl 0%{?with_gpm:1} | |
12 | Summary: Virtual Reality Peripheral Network | |
13 | Summary(pl.UTF-8): Sieć peryferiów do rzeczywistości wirtualnej (VR) | |
14 | Name: vrpn | |
15 | Version: 07.32 | |
16 | %define fver %(echo %{version} | tr . _) | |
17 | Release: 1 | |
18 | License: Boost v1.0 (VRPN)%{?with_gpl:, depends on GPL libraries} | |
19 | Group: Libraries | |
20 | Source0: http://www.cs.unc.edu/Research/vrpn/downloads/%{name}_%{fver}.zip | |
21 | # Source0-md5: 6cb32e51e6420385f2006f1aae58b457 | |
22 | Patch0: %{name}-install.patch | |
85662261 | 23 | Patch1: %{name}-jsoncpp.patch |
61bf55c6 | 24 | Patch2: %{name}-modbus.patch |
66276c24 JB |
25 | URL: http://www.cs.unc.edu/Research/vrpn/ |
26 | BuildRequires: cmake >= 2.8.3 | |
27 | %{?with_apidocs:BuildRequires: doxygen} | |
28 | %{?with_gpm:BuildRequires: gpm-devel} | |
85662261 | 29 | BuildRequires: hidapi-devel >= 0.7.0 |
66276c24 | 30 | BuildRequires: jdk |
85662261 | 31 | BuildRequires: jsoncpp-devel >= 0.7.0 |
61bf55c6 | 32 | %{?with_modbus:BuildRequires: libmodbus-devel} |
66276c24 JB |
33 | BuildRequires: libstdc++-devel |
34 | BuildRequires: libusb-devel >= 1.0 | |
35 | %{?with_mpi:BuildRequires: mpi-devel} | |
36 | BuildRequires: perl-Parse-RecDescent | |
37 | BuildRequires: perl-base | |
38 | BuildRequires: python-devel >= 1:2.7 | |
39 | BuildRequires: swig-python | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
43 | The Virtual-Reality Peripheral Network (VRPN) is a set of classes | |
44 | within a library and a set of servers that are designed to implement a | |
45 | network-transparent interface between application programs and the set | |
46 | of physical devices (tracker, etc.) used in a virtual-reality (VR) | |
47 | system. The idea is to have a PC or other host at each VR station that | |
48 | controls the peripherals (tracker, button device, haptic device, | |
49 | analog inputs, sound, etc). VRPN provides connections between the | |
50 | application and all of the devices using the appropriate | |
51 | class-of-service for each type of device sharing this link. The | |
52 | application remains unaware of the network topology. Note that it is | |
53 | possible to use VRPN with devices that are directly connected to the | |
54 | machine that the application is running on, either using separate | |
55 | control programs or running all as a single program. | |
56 | ||
57 | %description -l pl.UTF-8 | |
58 | VRPN (Virtual-Reality Peripheral Network) to biblioteka klas i zestaw | |
59 | serwerów zaprojektowanych jako implementacja przezroczystego sieciowo | |
60 | interfejsu między aplikacjami a zbiorem urządzeń fizycznych (takich | |
61 | jak tracker), używanych w systemie wirtualnej rzeczywistości (VR). | |
62 | Idea polega na umieszczeniu komputera PC lub innego na każdej stacji | |
63 | kontrolującej urządzenia peryferyjne (tracker, przyciski, urządzenie | |
64 | haptyczne, wejścia analogowe, dźwiękowe itp.). VRPN zapewnia | |
65 | połączenia między aplikacją a wszystkimi urządzeniami używającymi | |
66 | odpowiedniej klasy usług dla każdego typu urządzeń współdzielących to | |
67 | połączenie. Dla aplikacji topologia sieci nie ma znaczenia. Należy | |
68 | zauważyć, że można używać oprogramowania VRPN z urządzeniami | |
69 | podłączonymi bezpośrednio do maszyny, na której działa aplikacja - | |
70 | albo przy użyciu osobnych programów sterujących, albo w ramach | |
71 | jednego programu. | |
72 | ||
73 | %package devel | |
74 | Summary: Header files for VRPN library | |
75 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki VRPN | |
76 | Group: Development/Libraries | |
77 | Requires: %{name} = %{version}-%{release} | |
78 | ||
79 | %description devel | |
80 | Header files for VRPN library. | |
81 | ||
82 | %description devel -l pl.UTF-8 | |
83 | Pliki nagłówkowe biblioteki VRPN. | |
84 | ||
85 | %package apidocs | |
86 | Summary: VRPN API documentation | |
87 | Summary(pl.UTF-8): Dokumentacja API biblioteki VRPN | |
88 | Group: Documentation | |
89 | ||
90 | %description apidocs | |
91 | API documentation for VRPN library. | |
92 | ||
93 | %description apidocs -l pl.UTF-8 | |
94 | Dokumentacja API biblioteki VRPN. | |
95 | ||
96 | %package -n java-vrpn | |
97 | Summary: Java binding to VRPN | |
98 | Summary(pl.UTF-8): Wiązanie Javy do bibliotek VRPN | |
99 | Group: Libraries/Java | |
100 | Requires: %{name} = %{version}-%{release} | |
101 | ||
102 | %description -n java-vrpn | |
103 | Java binding to VRPN. | |
104 | ||
105 | %description -n java-vrpn -l pl.UTF-8 | |
106 | Wiązanie Javy do bibliotek VRPN. | |
107 | ||
108 | %package -n python-vrpn | |
109 | Summary: Python binding to VRPN | |
110 | Summary(pl.UTF-8): Wiązania Pythona do bibliotek VRPN | |
111 | Group: Libraries/Java | |
112 | Requires: %{name} = %{version}-%{release} | |
113 | ||
114 | %description -n python-vrpn | |
115 | Python binding to VRPN. | |
116 | ||
117 | %description -n python-vrpn -l pl.UTF-8 | |
118 | Wiązania Pythona do bibliotek VRPN. | |
119 | ||
120 | %prep | |
121 | %setup -q -n %{name} | |
122 | %patch0 -p1 | |
85662261 | 123 | %patch1 -p1 |
61bf55c6 | 124 | %patch2 -p1 |
66276c24 JB |
125 | |
126 | %build | |
127 | install -d build | |
128 | cd build | |
129 | %cmake .. \ | |
130 | -DSYSCONF_INSTALL_DIR=%{_sysconfdir}/vrpn \ | |
131 | %{?with_gpl:-DVRPN_GPL_SERVER=ON} \ | |
132 | -DVRPN_USE_GPM_MOUSE=%{?with_gpm:ON}%{!?with_gpm:OFF} \ | |
85662261 JB |
133 | -DVRPN_USE_LOCAL_HIDAPI=OFF \ |
134 | -DVRPN_USE_LOCAL_JSONCPP=OFF \ | |
61bf55c6 | 135 | %{?with_modbus:-DVRPN_USE_MODBUS=ON} \ |
66276c24 JB |
136 | -DVRPN_USE_MPI=%{?with_mpi:ON}%{!?with_mpi:OFF} \ |
137 | -DVRPN_BUILD_PYTHON=ON | |
138 | ||
139 | %{__make} | |
140 | ||
141 | %if %{with apidocs} | |
142 | %{__make} doc | |
143 | %endif | |
144 | ||
145 | %install | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
148 | %{__make} -C build install \ | |
149 | DESTDIR=$RPM_BUILD_ROOT | |
150 | ||
151 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c_interface_example,checklogfile,client_and_server,clock_drift_estimator,forcedevice_test_client,forward,forwarderClient,last_of_sequence,logfilesenders,logfiletypes,printcereal,printvals,run_auxiliary_logger,sample_analog,sample_server,test*,text,textServer,tracker_to_poser} | |
152 | ||
153 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/source-docs | |
154 | ||
155 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
156 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
157 | %py_postclean | |
158 | ||
159 | %clean | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
162 | %post -p /sbin/ldconfig | |
163 | %postun -p /sbin/ldconfig | |
164 | ||
165 | %files | |
166 | %defattr(644,root,root,755) | |
167 | %doc ChangeLog Format README README.Legal | |
168 | %attr(755,root,root) %{_bindir}/add_vrpn_cookie | |
169 | %attr(755,root,root) %{_bindir}/bdbox_client | |
170 | %attr(755,root,root) %{_bindir}/ff_client | |
171 | %attr(755,root,root) %{_bindir}/phan_client | |
172 | %attr(755,root,root) %{_bindir}/sound_client | |
173 | %attr(755,root,root) %{_bindir}/sphere_client | |
174 | %attr(755,root,root) %{_bindir}/vrpn_HID_device_watcher | |
175 | %attr(755,root,root) %{_bindir}/vrpn_LamportClock | |
176 | %attr(755,root,root) %{_bindir}/vrpn_ping | |
177 | %attr(755,root,root) %{_bindir}/vrpn_print_devices | |
178 | %attr(755,root,root) %{_bindir}/vrpn_print_messages | |
179 | %attr(755,root,root) %{_bindir}/vrpn_print_performance | |
180 | %attr(755,root,root) %{_bindir}/vrpn_server | |
181 | %attr(755,root,root) %{_bindir}/vrpn_streamPrint | |
182 | %dir %{_sysconfdir}/vrpn | |
183 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vrpn/vrpn.cfg | |
184 | %attr(755,root,root) %{_libdir}/libgpsnmea.so | |
185 | %attr(755,root,root) %{_libdir}/libquat.so | |
186 | %attr(755,root,root) %{_libdir}/libvrpn.so | |
187 | %attr(755,root,root) %{_libdir}/libvrpn_atmel.so | |
188 | %attr(755,root,root) %{_libdir}/libvrpn_timecode_generator.so | |
189 | %attr(755,root,root) %{_libdir}/libvrpnserver.so | |
190 | ||
191 | %files devel | |
192 | %defattr(644,root,root,755) | |
193 | %{_includedir}/latLonCoord.h | |
194 | %{_includedir}/nmeaParser.h | |
195 | %{_includedir}/quat.h | |
196 | %{_includedir}/utmCoord.h | |
197 | %{_includedir}/vrpn_*.h | |
198 | ||
199 | %if %{with java} | |
200 | %files -n java-vrpn | |
201 | %defattr(644,root,root,755) | |
202 | %attr(755,root,root) %{_libdir}/libjava_vrpn.so | |
203 | %{_javadir}/vrpn-%{version}.jar | |
204 | %endif | |
205 | ||
206 | %files -n python-vrpn | |
207 | %defattr(644,root,root,755) | |
208 | # swig bindings | |
209 | %attr(755,root,root) %{py_sitedir}/_vrpn_*.so | |
210 | %attr(755,root,root) %{py_sitedir}/vrpn_*.py[co] | |
211 | # "handwritten" binding | |
212 | %attr(755,root,root) %{py_sitedir}/vrpn.so | |
213 | ||
214 | %if %{with apidocs} | |
215 | %files apidocs | |
216 | %defattr(644,root,root,755) | |
217 | %doc build/doxygen/docs-generated/html/* | |
218 | %endif |