summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--ros-humble-libspnav-devel.spec54
-rw-r--r--sources1
3 files changed, 56 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..0eb683b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/ros-humble-libspnav-devel-1.2.tar.gz
diff --git a/ros-humble-libspnav-devel.spec b/ros-humble-libspnav-devel.spec
new file mode 100644
index 0000000..bd63049
--- /dev/null
+++ b/ros-humble-libspnav-devel.spec
@@ -0,0 +1,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
diff --git a/sources b/sources
new file mode 100644
index 0000000..2336777
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+b62e8adc1916b7db59bc6cf84c3e40d0 ros-humble-libspnav-devel-1.2.tar.gz