A new user interface for you! Read more...

File sc-contoller.spec of Package sc-controller

%{!?__python2: %global __python2 /usr/bin/python2}

Summary: User-mode driver and GTK3 based GUI for Steam Controller
Name: sc-controller
Version: 0.4.1
Release: 1%{?dist}
License: GPL-2.0-only
Source1: sc-controller-%{version}.tar.gz
Group: Amusements/Games/Other
URL: https://github.com/kozec/sc-controller
Vendor: Kozec <kozec at kozec dot com>
Packager: Kozec <kozec at kozec dot com>


### Requires: python >= 2.7
%if %{defined fedora}
Requires: python-setuptools, python-gobject, gtk3, gnome-python2-rsvg, pylibacl, python-evdev
%else
Requires: python-setuptools, python-gobject, libgtk-3-0, typelib-1_0-Rsvg-2_0, python-evdev, python-pylibacl, linux-glibc-devel, python-gobject-common-devel
%endif
BuildRequires: python-devel, desktop-file-utils

%description
Application allowing to setup, configure and use Steam Controller
without using Steam client.

%prep
cd ~/rpmbuild/BUILD
rm -rf sc-controller-%{version}
tar xvfz /home/abuild/rpmbuild/SOURCES/sc-controller-%{version}.tar.gz
ln -s sc-controller-%{version} sc-controller-%{version}

%build
cd ~/rpmbuild/BUILD
cd sc-controller-%{version}
python setup.py build

%install
cd ~/rpmbuild/BUILD
cd sc-controller-%{version}
python setup.py install --root=%{buildroot} --optimize=1
[ -e %{buildroot}/usr/share/applications/sc-controller.desktop.orig ] && rm %{buildroot}/usr/share/applications/sc-controller.desktop.orig
# mkdir -p %{buildroot}%{_udevrulesdir}
# install -m644 /home/abuild/rpmbuild/SOURCES/99-sc-controller.rules %{buildroot}%{_udevrulesdir}

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
/usr/bin/*

%ifarch x86_64
/usr/lib64/python2.7/site-packages/scc/*
/usr/lib64/python2.7/site-packages/libuinput.so
/usr/lib64/python2.7/site-packages/libhiddrv.so
/usr/lib64/python2.7/site-packages/*.egg-info
%else	# ifarch x86_64
/usr/lib/python2.7/site-packages/scc/*
/usr/lib/python2.7/site-packages/libuinput.so
/usr/lib/python2.7/site-packages/libhiddrv.so
/usr/lib/python2.7/site-packages/*.egg-info
%endif	# ifarch x86_64

/usr/lib/udev/rules.d/*
/usr/share/applications/*
/usr/share/pixmaps/*
/usr/share/scc/*
/usr/share/mime/packages/*
/usr/share/icons/hicolor/*
/usr/share/icons/hicolor/

%if %{defined fedora}
%else	# %{defined fedora}
/usr/lib/udev
/usr/lib/udev/rules.d
/usr/share/scc

%ifarch x86_64
/usr/lib64/python2.7/site-packages/scc
%else	# ifarch x86_64
/usr/lib/python2.7/site-packages/scc
%endif	# ifarch x86_64

%endif	# %{defined fedora}