|
| 1 | +%global app_name efck-chat-keyboard |
| 2 | +%global module_name efck |
| 3 | + |
| 4 | +%global version 1.0git |
| 5 | + |
| 6 | +Name: %{module_name} |
| 7 | +Version: %{version} |
| 8 | +Release: 1%{?dist} |
| 9 | +Summary: Emoji filter / Unicode chat keyboard |
| 10 | +License: AGPLv3 |
| 11 | +URL: https://efck-chat-keyboard.github.io |
| 12 | +BugURL: https://github.com/efck-chat-keyboard/efck |
| 13 | + |
| 14 | +Source0: %{pypi_source efck} |
| 15 | +Source1: https://github.com/efck-chat-keyboard/efck/archive/v%{version}/%{module_name}-v%{version}.tar.gz |
| 16 | + |
| 17 | +%description %{expand: |
| 18 | +A Qt GUI utility that pops up a dialog with tabs for: |
| 19 | +emoji filtering / selection, text to Unicode transformation, |
| 20 | +GIF meme selection etc. (extensible). |
| 21 | +Upon activation, it 'pastes' your selection into the previously active |
| 22 | +(focused) window, such as a web browser or a desktop chat app or similar.} |
| 23 | + |
| 24 | +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Debuginfo/#_useless_or_incomplete_debuginfo_packages_due_to_other_reasons |
| 25 | +%global debug_package %{nil} |
| 26 | +# https://serverfault.com/questions/681691/when-debuginfo-rpm-is-generated |
| 27 | +%global __debug_package 0 |
| 28 | + |
| 29 | +BuildArch: noarch |
| 30 | +BuildRequires: python3-devel |
| 31 | +# Dependency on Fedora, required in other distros |
| 32 | +BuildRequires: pyproject-rpm-macros |
| 33 | +# For %check section |
| 34 | +BuildRequires: xorg-x11-server-Xvfb |
| 35 | +BuildRequires: python3-pyqt6 |
| 36 | +BuildRequires: python3-unicodedata2 |
| 37 | + |
| 38 | +Requires: (python3-pyqt6 or python3-qt5) |
| 39 | +Requires: google-noto-emoji-color-fonts |
| 40 | +Recommends: xdotool if xorg-x11-server-Xorg |
| 41 | +Recommends: ydotool |
| 42 | +Recommends: python3dist(unicodedata2) |
| 43 | +Provides: %{module_name} |
| 44 | + |
| 45 | +%py_provides python3-%{module_name} |
| 46 | + |
| 47 | +%generate_buildrequires |
| 48 | +%pyproject_buildrequires -r requirements.txt |
| 49 | + |
| 50 | + |
| 51 | +%prep |
| 52 | +%autosetup -n %{module_name}-%{version} |
| 53 | + |
| 54 | + |
| 55 | +%build |
| 56 | +%pyproject_wheel |
| 57 | + |
| 58 | + |
| 59 | +%install |
| 60 | +%pyproject_install |
| 61 | +%pyproject_save_files efck +auto |
| 62 | +install -Dm644 -t %{buildroot}%{_datadir}/applications/ packaging/debian/%{app_name}.desktop |
| 63 | +install -Dm644 -t %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ packaging/debian/%{app_name}.svg |
| 64 | + |
| 65 | + |
| 66 | +%files -n %{module_name} -f %{pyproject_files} |
| 67 | +%{_datadir}/applications/* |
| 68 | +%{_datadir}/icons/hicolor/scalable/apps/* |
| 69 | +%doc README.md |
| 70 | +%license LICENSE.txt |
| 71 | + |
| 72 | + |
| 73 | +# For now disable check stage as it goes: |
| 74 | +# Check import: efck |
| 75 | +# /var/tmp/rpm-tmp.ixJzGa: line 57: 655 Aborted (core dumped) |
| 76 | +#%check |
| 77 | +#%%pyproject_check_import |
| 78 | +#xvfb-run -a -- %%{_bindir}/%%{module_name} --help |
| 79 | + |
| 80 | + |
| 81 | +%changelog |
| 82 | +* Fri Sep 30 2022 Maintainer <[email protected]> - 1.0 |
| 83 | +- initial package |
0 commit comments