summaryrefslogtreecommitdiff
path: root/ros-humble-cwiid.spec
blob: 053af69962edf6a6e437d693ec5f54470e914a5e (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
# 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:        1%{?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

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

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  flex
BuildRequires:  bison
BuildRequires:  gcc-c++
BuildRequires:  bluetooth-devel
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gthread-2.0)
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-1
- Initial package for openEuler (ROS humble dependency closure).