-
Notifications
You must be signed in to change notification settings - Fork 170
WIP: spec file for fedora rpm #810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
deltragon
wants to merge
3
commits into
slgobinath:master
Choose a base branch
from
deltragon:rpm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+107
−1
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these extra requires appear to do nothing at runtime.
Running
rpm --query --package rpm/noarch/python3-safeeyes-3.2.0-1.fc44.noarch.rpm --requiresgives:These are only the dependencies from
%generate_buildrequires, but none of the manually added ones here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not understand. Did you mean, despite adding dependencies in the spec file, they are actually not dependencies of RPM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's what I meant - and I also don't understand why it doesn't work.