2 # This is template for pure python2/python3 modules (noarch)
3 # use template-specs/python3.spec for python3 only noarch packages
4 # use template-specs/python-ext.spec for binary python packages
8 %bcond_without tests # unit tests
9 %bcond_without python2 # CPython 2.x module
10 %bcond_without python3 # CPython 3.x module
13 # - 'module' should match the Python import path (first component?)
14 # - 'egg_name' should equal to Python egg name
15 # - 'pypi_name' must match the Python Package Index name
18 %define pypi_name LGTV
19 Summary: Command line webOS remote for LGTVs
20 Name: python-LGWebOSRemote
24 Group: Libraries/Python
25 Source0: https://github.com/klattimer/LGWebOSRemote/archive/master.zip
26 # Source0-md5: 95e4d2a8e3b94c1fc75a6534c6ac7749
27 URL: https://github.com/klattimer/LGWebOSRemote
29 BuildRequires: python-modules >= 1:2.5
30 BuildRequires: python-setuptools
32 #BuildRequires: python-
36 BuildRequires: python3-modules >= 1:3.2
37 BuildRequires: python3-setuptools
39 #BuildRequires: python3-
42 BuildRequires: rpm-pythonprov
43 BuildRequires: rpmbuild(macros) >= 1.714
44 Requires: python-modules >= 1:2.5
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Command line webOS remote for LGTVs. This tool uses a connection via
50 websockets to port 3000 on newer LG TVs.
52 %package -n python3-LGWebOSRemote
53 Summary: Command line webOS remote for LGTVs
54 Group: Libraries/Python
55 Requires: python3-modules >= 1:3.2
57 %description -n python3-LGWebOSRemote
58 Command line webOS remote for LGTVs. This tool uses a connection via
59 websockets to port 3000 on newer LG TVs.
70 %{__python} -m pytest ...
78 %{__python3} -m pytest ...
83 rm -rf $RPM_BUILD_ROOT
88 %if %{with enable_if_package_uses_non_standard_setup_py}
89 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
90 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
100 install -d $RPM_BUILD_ROOT%{_sysconfdir}/lgtv
101 mv $RPM_BUILD_ROOT/{usr/config,etc/lgtv}/config.json
104 rm -rf $RPM_BUILD_ROOT
108 %defattr(644,root,root,755)
110 %{py_sitescriptdir}/%{module}
111 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
112 #%dir %{_sysconfdir}/lgtv
113 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lgtv/config.json
117 %files -n python3-LGWebOSRemote
118 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_bindir}/lgtv
121 %{py3_sitescriptdir}/%{module}
122 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
123 %dir %{_sysconfdir}/lgtv
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lgtv/config.json