]>
Commit | Line | Data |
---|---|---|
1 | %define subver fadf11e | |
2 | %define rel 1 | |
3 | Summary: Wiimote interface library | |
4 | Name: cwiid | |
5 | Version: 0.6.00 | |
6 | Release: 0.%{rel}.%{subver} | |
7 | License: GPL v2+ | |
8 | Group: Libraries | |
9 | #Source0: https://github.com/abstrakraft/cwiid/archive/%{name}-%{version}/%{name}-%{version}.tar.gz | |
10 | Source0: https://github.com/abstrakraft/cwiid/archive/%{subver}/%{name}-%{version}-%{subver}.tar.gz | |
11 | # Source0-md5: 2d5430a465357242514942ae82139609 | |
12 | Source1: wmgui.desktop | |
13 | Patch0: wmdemo-lib.patch | |
14 | URL: http://abstrakraft.org/cwiid/ | |
15 | BuildRequires: autoconf | |
16 | BuildRequires: automake | |
17 | BuildRequires: bison | |
18 | BuildRequires: bluez-libs-devel | |
19 | BuildRequires: desktop-file-utils | |
20 | BuildRequires: flex | |
21 | BuildRequires: gawk | |
22 | BuildRequires: gtk+2-devel | |
23 | BuildRequires: python-devel >= 2.4 | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | CWiiD is a library that enables your application to communicate with a | |
28 | wiimote using a bluetooth connection. | |
29 | ||
30 | %package devel | |
31 | Summary: Development files for %{name} | |
32 | Group: Development/Libraries | |
33 | Requires: %{name} = %{version}-%{release} | |
34 | Requires: bluez-libs-devel | |
35 | ||
36 | %description devel | |
37 | The %{name}-devel package contains libraries and header files for | |
38 | developing applications that use %{name}. | |
39 | ||
40 | %package -n python-%{name} | |
41 | Summary: Python binding for %{name} | |
42 | Group: Development/Languages | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | Obsoletes: %{name}-python2 | |
45 | ||
46 | %description -n python-%{name} | |
47 | Python2 binding for %{name} | |
48 | ||
49 | %package utils | |
50 | Summary: Wiimote connection test application | |
51 | Group: Applications/System | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | Provides: %{name}-wmgui = %{version}-%{release} | |
54 | Obsoletes: cwiid-wmgui < 0.6.00-7 | |
55 | ||
56 | %description utils | |
57 | Applications to test the wiimote connection | |
58 | ||
59 | %package wminput | |
60 | Summary: Enables using the wiimote as an input source | |
61 | # The licence must be GPLv2 instead of GPLv2+ for this package | |
62 | # since the file wminput/action_enum.txt is GPLv2 as stated | |
63 | # in the file. | |
64 | License: GPL v2 | |
65 | Group: Applications/System | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | Requires: python-%{name} = %{version}-%{release} | |
68 | ||
69 | %description wminput | |
70 | This program allows the user to use the wiimote to emulate normal | |
71 | system input sources like the mouse and keyboard. | |
72 | ||
73 | %prep | |
74 | %setup -qc | |
75 | mv %{name}-*/* . | |
76 | %patch0 -p1 | |
77 | ||
78 | %build | |
79 | %{__aclocal} | |
80 | %{__autoconf} | |
81 | CC="%{__cc} %{rpmcflags}" | |
82 | %configure \ | |
83 | --disable-ldconfig | |
84 | %{__make} | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | %{__make} install \ | |
89 | DESTDIR=$RPM_BUILD_ROOT | |
90 | ||
91 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
92 | ||
93 | rm -v $RPM_BUILD_ROOT%{_libdir}/libcwiid.a | |
94 | ||
95 | desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE1} | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %post -p /sbin/ldconfig | |
101 | %postun -p /sbin/ldconfig | |
102 | ||
103 | %files | |
104 | %defattr(644,root,root,755) | |
105 | %doc AUTHORS NEWS README COPYING ChangeLog | |
106 | %attr(755,root,root) %{_libdir}/libcwiid.so.1.0 | |
107 | %ghost %{_libdir}/libcwiid.so.1 | |
108 | ||
109 | %files devel | |
110 | %defattr(644,root,root,755) | |
111 | %{_includedir}/cwiid.h | |
112 | %{_libdir}/libcwiid.so | |
113 | %{_pkgconfigdir}/cwiid.pc | |
114 | ||
115 | %files -n python-%{name} | |
116 | %defattr(644,root,root,755) | |
117 | %attr(755,root,root) %{py_sitedir}/cwiid.so | |
118 | %{py_sitedir}/cwiid-%{version}-py*.egg-info | |
119 | ||
120 | %files wminput | |
121 | %defattr(644,root,root,755) | |
122 | %doc doc/Xmodmap doc/wminput.list | |
123 | %dir %{_sysconfdir}/cwiid | |
124 | %dir %{_sysconfdir}/cwiid/wminput | |
125 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/acc_led | |
126 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/acc_ptr | |
127 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/buttons | |
128 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/default | |
129 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/gamepad | |
130 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/ir_ptr | |
131 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/neverball | |
132 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/nunchuk_acc_ptr | |
133 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cwiid/wminput/nunchuk_stick2btn | |
134 | %attr(755,root,root) %{_bindir}/wminput | |
135 | %{_mandir}/man1/wminput.1* | |
136 | %dir %{_libdir}/%{name} | |
137 | %dir %{_libdir}/%{name}/plugins | |
138 | %attr(755,root,root) %{_libdir}/%{name}/plugins/acc.so | |
139 | %attr(755,root,root) %{_libdir}/%{name}/plugins/ir_ptr.so | |
140 | %attr(755,root,root) %{_libdir}/%{name}/plugins/led.so | |
141 | %attr(755,root,root) %{_libdir}/%{name}/plugins/nunchuk_acc.so | |
142 | %attr(755,root,root) %{_libdir}/%{name}/plugins/nunchuk_stick2btn.so | |
143 | ||
144 | %files utils | |
145 | %defattr(644,root,root,755) | |
146 | %attr(755,root,root) %{_bindir}/lswm | |
147 | %attr(755,root,root) %{_bindir}/wmgui | |
148 | %{_mandir}/man1/wmgui.1* | |
149 | %{_desktopdir}/wmgui.desktop |