summaryrefslogtreecommitdiff
path: root/ros-humble-libspnav-devel.spec
blob: bd630498889c8e7eb7a53d134c2dd3477fe5c3fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# topdir: ros-humble-libspnav-devel-1.2
Name:           ros-humble-libspnav-devel
Version:        1.2
Release:        1%{?dist}
Summary:        C library for 6dof input devices (spacemice)

License:        BSD-3-Clause
URL:            https://github.com/FreeSpacenav/libspnav
Source0:        https://github.com/FreeSpacenav/libspnav/archive/refs/tags/libspnav-%{version}.tar.gz#/%{name}-%{version}.tar.gz

Group:          Development/Libraries
Packager:       openEuler Builder <builder@openeuler.org>

BuildRequires:  gcc
BuildRequires:  libX11-devel

%description
Libspnav is a C library for receiving input from 6 degrees-of-freedom
(6dof) input devices, also known as spacemice, spaceballs, etc.
6dof input is very useful for fluidly manipulating objects or viewpoints
in 3D space, and fundamentally comprises of relative movement
(translation) across 3 axes (TX/TY/TZ), and rotation about 3 axes
(RX/RY/RZ).

This package provides the development files (headers, static and shared
libraries, and pkg-config file) for libspnav.

%prep
%autosetup -n %{name}-%{version}

%build
# Custom configure script (not autotools)
./configure --prefix=%{_prefix}
# Fix libdir for 64-bit: configure hardcodes 'lib', use system lib dir
sed -i "s|^libdir = lib$|libdir = %{_lib}|" Makefile
sed -i 's|\${PREFIX}/lib |\${PREFIX}/%{_lib} |' spnav.pc
%make_build

%install
make install DESTDIR=%{buildroot}

%files
%license LICENSE
%doc README.md
%{_libdir}/libspnav.a
%{_libdir}/libspnav.so*
%{_includedir}/spnav.h
%{_includedir}/spnav_magellan.h
%{_includedir}/spnav_config.h
%{_datadir}/pkgconfig/spnav.pc

%changelog
* Thu Oct 22 2026 openEuler Builder <builder@openeuler.org> - 1.2-1
- Initial package