Adding systemd support to automatically start the service
[profile/ivi/remotecontrol.git] / packaging / remotecontrol.spec
1 Name:       remotecontrol
2 Version:    0.0.1
3 Release:    1
4 Group:      System/Libraries
5 License:    Apache-2.0
6 Url:        https://github.com/otcshare/remotecontrol
7 Summary:    Remote Control App
8 Source:     remotecontrol-%{version}.tar.bz2
9 Source1:    remotecontrol.service
10 BuildRequires:  pkgconfig(python)
11 BuildRequires:  python-setuptools
12 Requires:  python
13 Requires:  dbus-python
14 Requires:  pygobject
15 Requires:  python-autobahn
16 Requires:  python-netifaces
17 Requires:  python-simplejson
18 Requires:  pocketsphinx
19 Requires:  pocketsphinx-plugin
20 Requires:  gstreamer-python
21 Requires:  gst-plugins-good
22 Requires:  festival
23
24 %description
25 Remote control daemon with websocket API for IVI.
26
27 %prep
28 %setup -q -n remotecontrol-%{version}
29
30 %build
31 python setup.py build
32
33 %install
34 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
35
36 mkdir -p $RPM_BUILD_ROOT/%{_libdir}/systemd/system/graphical.target.wants
37 install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_libdir}/systemd/system/
38 ln -sf ../remotecontrol.service $RPM_BUILD_ROOT/%{_libdir}/systemd/system/graphical.target.wants/remotecontrol.service
39
40 %files
41 %defattr(-,root,root,-)
42 %doc README
43 %{python_sitelib}/*
44 %{_bindir}/start-remoteserver
45 %{_libdir}/systemd/system/remotecontrol.service
46 %{_libdir}/systemd/system/graphical.target.wants/remotecontrol.service