From 4f0834d018b0eb4c2cbe352324b851dfffe3c485 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 22 Oct 2026 10:55:02 +0000 Subject: automatic import of ros-humble-cwiid-devel --- ros-humble-cwiid-devel.spec | 88 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 ros-humble-cwiid-devel.spec (limited to 'ros-humble-cwiid-devel.spec') diff --git a/ros-humble-cwiid-devel.spec b/ros-humble-cwiid-devel.spec new file mode 100644 index 0000000..b7f9c37 --- /dev/null +++ b/ros-humble-cwiid-devel.spec @@ -0,0 +1,88 @@ +# topdir: ros-humble-cwiid-devel-0.6.00 (由 --transform 统一命名) +# 构建系统: autoconf (无 configure 脚本,需 aclocal + autoconf 生成) +# 语言: C +# 上游: https://github.com/abstrakraft/cwiid +# 补丁说明: +# Patch0: 修复 defs.mak.in 硬编码 CFLAGS 覆盖 RPM optflags(含 -fPIE), +# 导致编译产物无 PIC 但按 PIE 链接,aarch64 报 relocation 错误 +# Patch1: 修复 wmdemo 仅链接 -lcwiid 但调用 libbluetooth 符号 (str2ba), +# openEuler -z,now 禁止传递性 DSO 解析,需显式 -lbluetooth +# Patch2: 修复 wmgui/main.c gtk_message_dialog_new 直接传变量作格式串, +# -Werror=format-security 将其视为硬错误 + +Name: ros-humble-cwiid-devel +Version: 0.6.00 +Release: 1%{?dist} +Summary: CWiid Wiimote Interface Library and Tools + +License: GPLv2+ +URL: https://github.com/abstrakraft/cwiid +Source0: https://github.com/abstrakraft/cwiid/archive/0.6.00.tar.gz#/%{name}-%{version}.tar.gz +Patch0: 0001-fix-cflags-override.patch +Patch1: 0002-fix-wmdemo-dso-link.patch +Patch2: 0003-fix-format-security.patch + +Group: Development/Libraries +Packager: openEuler Builder + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: gcc +BuildRequires: make +BuildRequires: flex +BuildRequires: bison +BuildRequires: pkgconfig +BuildRequires: bluez-libs-devel +BuildRequires: gtk2-devel +BuildRequires: glib2-devel + +%description +The CWiid package contains a library and tools for communicating with +Nintendo Wii Remote controllers. It includes: +- libcwiid: wiimote API library +- wmgui: GTK GUI for the wiimote +- wminput: event/joystick/mouse driver for the wiimote +- lswm: list wiimote devices + +%prep +%setup -n %{name}-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%build +# 源码来自 git clone,无 configure 脚本,需生成 +aclocal +autoconf +%configure --without-python +%make_build + +%install +# LDCONFIG=true 避免 make install 在 buildroot 中运行 ldconfig +make DESTDIR=%{buildroot} LDCONFIG=true install + +%files +%license COPYING +%doc README AUTHORS ChangeLog NEWS +%{_bindir}/wmgui +%{_bindir}/wminput +%{_bindir}/lswm +%{_libdir}/libcwiid.so.* +%{_libdir}/libcwiid.so +%{_libdir}/libcwiid.a +%{_libdir}/pkgconfig/cwiid.pc +%{_includedir}/cwiid.h +%{_libdir}/cwiid/ +%dir %{_sysconfdir}/cwiid +%dir %{_sysconfdir}/cwiid/wminput +%config(noreplace) %{_sysconfdir}/cwiid/wminput/* +%{_mandir}/man1/wmgui.1* +%{_mandir}/man1/wminput.1* +# AC_INIT(CWiid) → PACKAGE_TARNAME=cwiid,doc/Makefile.in 安装到 +# %%{_defaultdocdir}/cwiid/ 而非 %%{_defaultdocdir}/%%{name}/,需显式声明 +%{_defaultdocdir}/cwiid/ + +%changelog +* Thu Oct 22 2026 openEuler Builder - 0.6.00-1 +- Initial package -- cgit v1.2.3