]> git.pld-linux.org Git - packages/xboxdrv.git/blob - xboxdrv.spec
6c764c7e57215f680f08d976017dd3684f05f544
[packages/xboxdrv.git] / xboxdrv.spec
1 Summary:        Xbox/Xbox360 USB Gamepad userspace driver
2 Name:           xboxdrv
3 Version:        0.8.5
4 Release:        1
5 License:        GPL v3
6 Group:          Applications
7 Source0:        http://pingus.seul.org/~grumbel/xboxdrv/%{name}-linux-%{version}.tar.bz2
8 # Source0-md5:  7f20b12361770bbff9414a7c6d522c25
9 Source1:        %{name}.service
10 Source2:        %{name}.init
11 Source3:        %{name}.sysconfig
12 Source4:        %{name}.blacklist.conf
13 URL:            http://pingus.seul.org/~grumbel/xboxdrv/
14 BuildRequires:  boost-devel
15 BuildRequires:  dbus-devel
16 BuildRequires:  glib2-devel
17 BuildRequires:  libusb-devel
18 BuildRequires:  pkgconfig
19 BuildRequires:  rpmbuild(macros) >= 1.647
20 BuildRequires:  scons
21 BuildRequires:  udev-devel
22 BuildRequires:  xorg-lib-libX11-devel
23 Requires(post,preun):   /sbin/chkconfig
24 Requires(post,preun,postun):    systemd-units >= 38
25 Requires:       rc-scripts
26 Requires:       systemd-units >= 0.38
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Xboxdrv is a Xbox/Xbox360 gamepad driver for Linux that works in
31 userspace. It is an alternative to the xpad kernel driver and has
32 support for Xbox1 gamepads, Xbox360 USB gamepads and Xbox360 wireless
33 gamepads. The Xbox360 guitar and some Xbox1 dancemats might work too.
34 The Xbox 360 racing wheel is not supported, but shouldn't be to hard
35 to add if somebody is interested.
36
37 Some basic support for the Xbox360 Chatpad on USB controller is
38 provided, Chatpad on wireless ones is not supported. The headset is
39 not supported, but you can dump raw data from it.
40
41 This driver is only of interest if the xpad kernel driver doesn't work
42 for you or if you want more configurabity. If the xpad kernel driver
43 works for you there is no need to try this driver.
44
45 %prep
46 %setup -qn %{name}-linux-%{version}
47
48 %build
49 %scons \
50         BUILD=custom
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{systemdunitdir}} \
55         $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d,/etc/modprobe.d}
56
57 install -p xboxdrv $RPM_BUILD_ROOT%{_bindir}
58 install -p xboxdrvctl $RPM_BUILD_ROOT%{_bindir}
59
60 cp -p doc/xboxdrv.1 $RPM_BUILD_ROOT%{_mandir}/man1
61
62 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/xboxdrv
63 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/xboxdrv.service
64 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/xboxdrv
65 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/modprobe.d/xboxdrv.blacklist.conf
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 /sbin/chkconfig --add xboxdrv
72 %service xboxdrv restart
73 %systemd_post xboxdrv.service
74
75 %preun
76 %systemd_preun xboxdrv.service
77 if [ "$1" = "0" ]; then
78         %service -q xboxdrv stop
79         /sbin/chkconfig --del xboxdrv
80 fi
81
82 %postun
83 %systemd_reload
84
85 %files
86 %defattr(644,root,root,755)
87 %doc AUTHORS NEWS PROTOCOL README TODO
88 %doc doc/sensitivity.png doc/sensitivity.svg doc/xbox360-asciiart.txt
89 %doc examples
90 %attr(754,root,root) /etc/rc.d/init.d/xboxdrv
91 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/xboxdrv
92 %{systemdunitdir}/xboxdrv.service
93 %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/xboxdrv.blacklist.conf
94 %attr(755,root,root) %{_bindir}/xboxdrv
95 %attr(755,root,root) %{_bindir}/xboxdrvctl
96 %{_mandir}/man1/xboxdrv.1*
This page took 0.063813 seconds and 2 git commands to generate.