Name:     vrpn
Version:  07.35
Release:  alt1

Summary:  Virtual-Reality Peripheral Network
License:  BSL
Group:    Development/C
Url:      https://github.com/smack-team/smack/

Packager: Alexander Lubyagin <dfpl@altlinux.org>

Source:   %name-%version.tar

Patch1: alt-std-prefix.patch

BuildRequires(pre): rpm-macros-cmake
BuildRequires: git cmake gcc-c++ libhidapi-devel libusb-devel
# autoconf

%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 -n quat
Group:    Development/C
Summary:  The quaternion library, libquat.a

%description -n quat
The library is built on Ken Shoemake's code and implements the most common
quaternion functions, as well as some more obscure ones. In particular,
there are conversion routines between vectors, matrices and quaternions,
as well as various vector and matrix operations.

%prep
%setup
%patch1 -p0

%build
mkdir build
cd build
export HW_OS=pc_linux
export VERBOSE=1
export V=1
export GCC_COLORS=
cmake ..
make -j4 package

%install
export DESTDIR=%buildroot
export HW_OS=pc_linux
export VERBOSE=1
export V=1
export GCC_COLORS=
export Cflags="-I. -Iquat -Iatmellib -Igpsnmealib"
DESTDIR=%buildroot make install
cp -a build/quat/libquat.a %buildroot/%_libexecdir/
cp -a build/atmellib/libvrpn_atmel.a %buildroot/%_libexecdir/
cp -a build/gpsnmealib/libgpsnmea.a %buildroot/%_libexecdir/

%files
%_includedir/vrpn*.h
%_includedir/vrpn/*.h
%_includedir/atmellib/*.h
%_includedir/gpsnmealib/*.h
%_libexecdir/libvrpn*.a
%_libexecdir/libgpsnmea.a

%files -n quat
%_includedir/quat.h
%_libexecdir/libquat.a

%changelog
* Thu Mar 28 2024 Alexander Lubyagin <dfpl@altlinux.org> 07.35-alt1
- 07.35
