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