File vrpn.spec of Package vrpn

Name:           vrpn
Version:        07.28.2
Release:        1%{?dist}
Summary:        Virtual Reality Peripheral Network
Group:          System Environment/Libraries
License:        BSL1.0
URL:            http://www.cs.unc.edu/Research/vrpn
Source0:        vrpn_07_28.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libusb-1_0-devel libwiiuse-devel unzip python-devel
BuildRequires:	cmake gcc-c++ bluez-devel swig gpm

#Requires:       

%description

The Virtual-Reality Peripheral Network (VRPN) is a set of classes
within a library and a set of servers that are designed to implement a
network-transparent interface between application programs and the set
of physical devices (tracker, etc.) used in a virtual-reality (VR)
system. The idea is to have a PC or other host at each VR station that
controls the peripherals (tracker, button device, haptic device,
analog inputs, sound, etc). VRPN provides connections between the
application and all of the devices using the appropriate
class-of-service for each type of device sharing this link. The
application remains unaware of the network topology. Note that it is
possible to use VRPN with devices that are directly connected to the
machine that the application is running on, either using separate
control programs or running all as a single program.


%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q -n vrpn


%build
mkdir build
cd build
cmake .. -DVRPN_BUILD_PYTHON:BOOL=ON \
      -DVRPN_USE_WIIUSE:BOOL=ON \
      -DLIBUSB1_LIBRARY:FILEPATH="-lusb-1.0.so" \
      -DCMAKE_INSTALL_PREFIX:PATH=/usr \
      -DVRPN_GPL_SERVER:BOOL=ON \
      -DVRPN_USE_WIIUSE:BOOL=ON \
      -DSERVER_EXTRA_LIBS:STRING="-lwiiuse -lbluetooth"

make %{?_smp_mflags}


%install
cd build
make install DESTDIR=%{buildroot}  install/strip
find %{buildroot} -name '*.la' -exec rm -f {} ';'

%ifarch x86_64
mv %{buildroot}/usr/lib  %{buildroot}%{_libdir}
%endif
mv %{buildroot}/usr/etc  %{buildroot}/etc


%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc README  README.Compiling  README.git  README.Legal
#%{_libdir}/*.so.*
%exclude %{_bindir}/c_interface_example
%{_bindir}/run_auxiliary_logger
%{_bindir}/vrpn_print_devices
%{_bindir}/vrpn_print_performance
%{_bindir}/vrpn_server
%{_bindir}/wiimote_head_tracker
%config /etc/vrpn.cfg
%{_datadir}/%{name}-%{version}

%files devel
%defattr(-,root,root,-)
%doc
%{_includedir}/*
%{_libdir}/*.a


%changelog
openSUSE Build Service is sponsored by