blob: b49eae662a5e5a995deb61bd8cce85719de7102a (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
# topdir: ros-humble-cwiid-0.6.00
# 上游 abstrakraft/cwiid 为 autotools(configure.ac + Makefile.in 模板)C 项目,
# 无 release tag,版本号取自 configure.ac 的 AC_INIT(CWiid,0.6.00)。
# 本包为 ROS humble 依赖闭包中的第三方系统级蓝牙库/工具,按普通 C 包规范安装到 /usr。
# python 模块因 configure.ac 使用 python2 语法(print sys.version[:3])不兼容 python3,故 --without-python 跳过。
Name: ros-humble-cwiid
Version: 0.6.00
Release: 2%{?dist}
Summary: CWiid Wiimote Interface — libcwiid and tools (wmgui/wminput/lswm)
License: GPLv2
URL: https://github.com/abstrakraft/cwiid
Source0: https://github.com/abstrakraft/cwiid/archive/fadf11e89b579bcc0336a0692ac15c93785f3f82.tar.gz#/ros-humble-cwiid-0.6.00.tar.gz
# defs.mak.in 硬编码 CFLAGS 覆盖 RPM optflags(含 -specs=generic-hardened-cc1 的 -fPIE),
# 而 LDFLAGS 未被覆盖(RPM -specs=generic-hardened-ld 启用 PIE 链接),
# 导致 aarch64 编译产物无 PIC 但链接 PIE → R_AARCH64_ADR_PREL_PG_HI21 重定位失败。
# 修复:在 CFLAGS 定义中前置 @CFLAGS@(configure 保存的 RPM optflags)。
Patch0: cwiid-cflags.patch
Group: Development/Libraries
Packager: openEuler Builder <builder@openeuler.org>
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: flex
BuildRequires: bison
BuildRequires: bluetooth-devel
BuildRequires: gtk2-devel
BuildRequires: glib2-devel
BuildRequires: kernel-headers
%description
CWiid provides a C library (libcwiid) and a set of tools to interface with
the Nintendo Wiimote over Bluetooth:
* libcwiid — wiimote C API (shared library).
* wmgui — GTK GUI for inspecting the wiimote.
* wminput — event/joystick/mouse driver for the wiimote (with plugins).
* lswm — list wiimote devices.
The Python binding is disabled in this build (upstream uses Python 2 syntax
incompatible with openEuler's Python 3).
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Packager: openEuler Builder <builder@openeuler.org>
Requires: %{name} = %{version}-%{release}
Requires: bluetooth-devel
%description devel
Header files, static library, development symlink and pkg-config file
for %{name}.
%prep
%autosetup -n %{name}-%{version}
%build
# 源码仅含 configure.ac,需先生成 configure 脚本
autoreconf -if
%configure \
--without-python \
--with-cwiid-config-dir=%{_sysconfdir}/cwiid \
--with-cwiid-plugins-dir=%{_libdir}/cwiid/plugins
# LDCONFIG=true 抑制 install_shared 在构建环境调用 ldconfig(DESTDIR 下无意义且会失败)
%make_build LDCONFIG=true
%install
%make_install LDCONFIG=true
%files
%license COPYING
%doc README NEWS ChangeLog AUTHORS
%{_libdir}/libcwiid.so.1
%{_libdir}/libcwiid.so.1.0
%{_bindir}/wmgui
%{_bindir}/wminput
%{_bindir}/lswm
%{_libdir}/cwiid/
%config(noreplace) %{_sysconfdir}/cwiid/
%{_mandir}/man1/wmgui.1*
%{_mandir}/man1/wminput.1*
%files devel
%{_includedir}/cwiid.h
%{_libdir}/libcwiid.so
%{_libdir}/libcwiid.a
%{_libdir}/pkgconfig/cwiid.pc
%changelog
* Thu Oct 22 2026 openEuler Builder <builder@openeuler.org> - 0.6.00-2
- Fix aarch64 PIE link failure: include @CFLAGS@ (RPM optflags with -fPIE) in defs.mak.in.
* Thu Oct 22 2026 openEuler Builder <builder@openeuler.org> - 0.6.00-1
- Initial package for openEuler (ROS humble dependency closure).
|