-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy pathpython-safeeyes.spec
More file actions
100 lines (71 loc) · 2.57 KB
/
python-safeeyes.spec
File metadata and controls
100 lines (71 loc) · 2.57 KB
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
Name: python-safeeyes
Version: 3.2.0
Release: %autorelease
Summary: Take periodic breaks to protect your eyes
License: GPL-3.0-or-later
URL: https://github.com/slgobinath/SafeEyes
Source: %{pypi_source safeeyes}
BuildArch: noarch
BuildRequires: cairo-gobject-devel
BuildRequires: gobject-introspection-devel
BuildRequires: gtk4
BuildRequires: python3-devel
BuildRequires: desktop-file-utils
BuildRequires: gettext
# for notification plugin
BuildRequires: libnotify
Requires: libnotify
# for audiblealert plugin
Requires: (ffmpeg-free or pipewire-utils)
# for smartpause plugin (optional in pyproject.toml)
BuildRequires: python3-pywayland
Requires: python3-pywayland
# xprintidle does not exist on fedora
#Suggests: xprintidle
# for healthstats plugin (optional in pyproject.toml)
BuildRequires: python3-croniter
# Fill in the actual package description to submit package to Fedora
%global _description %{expand:
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder.}
%description %_description
%package -n python3-safeeyes
Summary: %{summary}
%description -n python3-safeeyes %_description
%prep
%autosetup -p1 -n safeeyes-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
# Add top-level Python module names here as arguments, you can use globs
%pyproject_save_files -l safeeyes
# add metainfo
mkdir -p %{buildroot}%{_metainfodir}
install -m 644 safeeyes/platform/io.github.slgobinath.SafeEyes.metainfo.xml %{buildroot}%{_metainfodir}
# add icons
for SIZE_APP in 16 24 32 48 64 128
do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${SIZE_APP}x${SIZE_APP}/apps
install -p -m 644 safeeyes/platform/icons/hicolor/${SIZE_APP}x${SIZE_APP}/apps/io.github.slgobinath.SafeEyes.png \
%{buildroot}%{_datadir}/icons/hicolor/${SIZE_APP}x${SIZE_APP}/apps/io.github.slgobinath.SafeEyes.png
done
for SIZE_STATUS in 16 24 32 48
do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${SIZE_STATUS}x${SIZE_STATUS}/status
install -p -m 644 safeeyes/platform/icons/hicolor/${SIZE_STATUS}x${SIZE_STATUS}/status/* \
%{buildroot}%{_datadir}/icons/hicolor/${SIZE_STATUS}x${SIZE_STATUS}/status/
done
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
safeeyes/platform/io.github.slgobinath.SafeEyes.desktop
%check
%pyproject_check_import
%files -n python3-safeeyes -f %{pyproject_files}
%_bindir/safeeyes
%{_datadir}/icons/*
%{_datadir}/applications/*
%{_metainfodir}/*
%changelog
%autochangelog