-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-lifx-photons-interactor.spec
111 lines (83 loc) · 3.17 KB
/
python-lifx-photons-interactor.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
%global pypi_name lifx-photons-interactor
%global short_name photons-interactor
Name: python-%{pypi_name}
Version: 0.8.1
Release: 1%{?dist}
Summary: A Photons powered server for interacting with LIFX lights
License: MIT
URL: https://photons.delfick.com
Source0: %{pypi_source}
Source1: %{short_name}.service
Source2: %{short_name}.yml
Source3: %{short_name}.xml
Source4: %{short_name}.sysusers
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%{?sysusers_requires_compat}
# Bypass the strict dependencies declared upstream
%{?python_disable_dependency_generator}
%global _description %{expand:
A Photons powered server for interacting with LIFX lights over the lan.
The server allows us to do continuous discovery and information gathering
so that all commands are super fast.}
%description %_description
%package -n python3-%{pypi_name}
Summary: %{summary}
Provides: lifx-photons-interactor
Provides: photons-interactor
%{?python_provide:%python_provide python3-%{pypi_name}}
Requires: firewalld-filesystem
Requires: python3dist(aiohttp) >= 3.7.2
Requires: python3dist(alembic) >= 1.3.2
Requires: python3dist(lifx-photons-core) >= 0.32.5
Requires: python3dist(setuptools)
Requires: python3dist(sqlalchemy) > 1.3.3
Requires: python3dist(tornado) >= 6.1
Requires: python3dist(whirlwind-web) >= 0.9
%description -n python3-%{pypi_name} %_description
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
%install
%py3_install
mkdir -p %{buildroot}%{_unitdir} \
%{buildroot}%{_sysconfdir}/photons \
%{buildroot}%{_sysusersdir} \
%{buildroot}%{_usr}/lib/firewalld/services \
%{buildroot}%{_var}/lib/photons
install -m 644 %SOURCE1 %{buildroot}%{_unitdir}
install -m 644 %SOURCE2 %{buildroot}%{_sysconfdir}/photons/interactor.yml
install -m 644 %SOURCE4 %{buildroot}%{_sysusersdir}/%{short_name}.conf
install -m 644 %SOURCE3 %{buildroot}%{_usr}/lib/firewalld/services
%pre -n python3-%{pypi_name}
%sysusers_create_package %{short_name} %SOURCE4
%post -n python3-%{pypi_name}
%systemd_post %{short_name}.service
%firewalld_reload
%preun -n python3-%{pypi_name}
%systemd_preun %{short_name}.service
%postun -n python3-%{pypi_name}
%systemd_postun_with_restart %{short_name}.service
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%dir %{_sysconfdir}/photons
%config(noreplace) %{_sysconfdir}/photons/interactor.yml
%attr(755,photons,-) %dir %{_var}/lib/photons
%attr(644,photons,-) %ghost %{_var}/lib/photons/interactor.db
# systemd and firewalld configuration files
%{_sysusersdir}/%{short_name}.conf
%{_usr}/lib/firewalld/services/photons-interactor.xml
%{_unitdir}/photons-interactor.service
%{python3_sitelib}/interactor
%{python3_sitelib}/lifx_photons_interactor-%{version}-py%{python3_version}.egg-info
%changelog
* Wed Jan 06 2021 Avi Miller <me@dje.li> - 0.8.1-1
- Initial packaging of lifx-photons-interactor from PyPi.