1 # TODO: openhaptics, ghost, wiiuse(GPL v3), libnifalcon, intersense, nidaqmx, viewpoint, phasespace, libfreespace
2 # NATIONAL_INSTRUMENTS, NIDAQ, USDIGITAL, MICROSCRIBE, MONITONNODE, TRIVISIOCOLIBRI ???
5 %bcond_without apidocs # do not build and package API docs
6 %bcond_without gpm # GPM Linux mouse interface support (GPL v2+)
7 %bcond_without modbus # Modbus support
8 %bcond_with mpi # MPI support
9 %bcond_without java # Java binding
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)
16 %define fver %(echo %{version} | tr . _)
18 License: Boost v1.0 (VRPN)%{?with_gpl:, depends on GPL libraries}
20 Source0: http://www.cs.unc.edu/Research/vrpn/downloads/%{name}_%{fver}.zip
21 # Source0-md5: 6cb32e51e6420385f2006f1aae58b457
22 Patch0: %{name}-install.patch
23 Patch1: %{name}-jsoncpp.patch
24 Patch2: %{name}-modbus.patch
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}
29 BuildRequires: hidapi-devel >= 0.7.0
31 BuildRequires: jsoncpp-devel >= 0.7.0
32 %{?with_modbus:BuildRequires: libmodbus-devel}
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)
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.
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
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}
80 Header files for VRPN library.
82 %description devel -l pl.UTF-8
83 Pliki nagłówkowe biblioteki VRPN.
86 Summary: VRPN API documentation
87 Summary(pl.UTF-8): Dokumentacja API biblioteki VRPN
91 API documentation for VRPN library.
93 %description apidocs -l pl.UTF-8
94 Dokumentacja API biblioteki VRPN.
97 Summary: Java binding to VRPN
98 Summary(pl.UTF-8): Wiązanie Javy do bibliotek VRPN
100 Requires: %{name} = %{version}-%{release}
102 %description -n java-vrpn
103 Java binding to VRPN.
105 %description -n java-vrpn -l pl.UTF-8
106 Wiązanie Javy do bibliotek VRPN.
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}
114 %description -n python-vrpn
115 Python binding to VRPN.
117 %description -n python-vrpn -l pl.UTF-8
118 Wiązania Pythona do bibliotek VRPN.
130 -DSYSCONF_INSTALL_DIR=%{_sysconfdir}/vrpn \
131 %{?with_gpl:-DVRPN_GPL_SERVER=ON} \
132 -DVRPN_USE_GPM_MOUSE=%{?with_gpm:ON}%{!?with_gpm:OFF} \
133 -DVRPN_USE_LOCAL_HIDAPI=OFF \
134 -DVRPN_USE_LOCAL_JSONCPP=OFF \
135 %{?with_modbus:-DVRPN_USE_MODBUS=ON} \
136 -DVRPN_USE_MPI=%{?with_mpi:ON}%{!?with_mpi:OFF} \
137 -DVRPN_BUILD_PYTHON=ON
146 rm -rf $RPM_BUILD_ROOT
148 %{__make} -C build install \
149 DESTDIR=$RPM_BUILD_ROOT
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}
153 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/source-docs
155 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
156 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
160 rm -rf $RPM_BUILD_ROOT
162 %post -p /sbin/ldconfig
163 %postun -p /sbin/ldconfig
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
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
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_libdir}/libjava_vrpn.so
203 %{_javadir}/vrpn-%{version}.jar
206 %files -n python-vrpn
207 %defattr(644,root,root,755)
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
216 %defattr(644,root,root,755)
217 %doc build/doxygen/docs-generated/html/*