|
| 1 | +%define _unpackaged_files_terminate_build 0 |
| 2 | + |
| 3 | +%global pypi_name magic-wormhole |
| 4 | +%global _desc get things from one computer to another, safely. |
| 5 | + |
| 6 | +Name: python-%{pypi_name} |
| 7 | +Version: 0.21.1 |
| 8 | +Release: 1%?dist |
| 9 | +Summary: get things from one computer to another, safely |
| 10 | +License: MIT |
| 11 | +URL: https://github.com/magic-wormhole/magic-wormhole |
| 12 | +Source0: %url/archive/refs/tags/%version.tar.gz |
| 13 | +BuildArch: noarch |
| 14 | + |
| 15 | +BuildRequires: python3-devel |
| 16 | +BuildRequires: python3-wheel |
| 17 | +BuildRequires: python3-setuptools |
| 18 | +BuildRequires: python3-pip |
| 19 | +BuildRequires: python3-versioneer |
| 20 | + |
| 21 | +Packager: Owen Zimmerman <owen@fyralabs.com> |
| 22 | + |
| 23 | +%description |
| 24 | +%_desc |
| 25 | + |
| 26 | +%package -n python3-%{pypi_name} |
| 27 | +Summary: %{summary} |
| 28 | +Provides: magic-wormhole |
| 29 | +%{?python_provide:%python_provide python3-%{pypi_name}} |
| 30 | + |
| 31 | +%description -n python3-%{pypi_name} |
| 32 | +%_desc |
| 33 | + |
| 34 | +%package bash-completion |
| 35 | +Summary: magic-wormhole Bash completion |
| 36 | +Requires: python3-%{pypi_name} |
| 37 | +Requires: bash-completion |
| 38 | +BuildArch: noarch |
| 39 | + |
| 40 | +%description bash-completion |
| 41 | +Bash shell completion for magic-wormhole. |
| 42 | + |
| 43 | +%package fish-completion |
| 44 | +Summary: magic-wormhole Fish completion |
| 45 | +Requires: python3-%{pypi_name} |
| 46 | +Requires: fish |
| 47 | +BuildArch: noarch |
| 48 | + |
| 49 | +%description fish-completion |
| 50 | +Fish shell completion for magic-wormhole. |
| 51 | + |
| 52 | +%package zsh-completion |
| 53 | +Summary: magic-wormhole Zsh completion |
| 54 | +Requires: python3-%{pypi_name} |
| 55 | +Requires: zsh |
| 56 | +BuildArch: noarch |
| 57 | + |
| 58 | +%description zsh-completion |
| 59 | +Zsh shell completion for magic-wormhole. |
| 60 | + |
| 61 | +%prep |
| 62 | +%autosetup -n magic-wormhole-%{version} |
| 63 | + |
| 64 | +%build |
| 65 | +%pyproject_wheel |
| 66 | + |
| 67 | +%install |
| 68 | +install -Dm644 wormhole_complete.bash %{buildroot}%{bash_completions_dir}/wormhole_complete.bash |
| 69 | +install -Dm644 wormhole_complete.bash %{buildroot}%{fish_completions_dir}/wormhole_complete.fish |
| 70 | +install -Dm644 wormhole_complete.bash %{buildroot}%{zsh_completions_dir}/wormhole_complete.zsh |
| 71 | +install -Dm644 docs/wormhole.1 %{buildroot}%{_mandir}/man1/wormhole.1 |
| 72 | +%pyproject_install |
| 73 | +%pyproject_save_files wormhole |
| 74 | + |
| 75 | +%files -n python3-%{pypi_name} -f %{pyproject_files} |
| 76 | +%doc README.md docs/*.rst |
| 77 | +%license LICENSE |
| 78 | +%{_bindir}/magic-wormhole |
| 79 | +%{_bindir}/wormhole |
| 80 | +%{_mandir}/man1/wormhole.1.gz |
| 81 | +%ghost %python3_sitelib/__pycache__/*.cpython-*.pyc |
| 82 | +%ghost %python3_sitelib/%{name}/subcommands/__pycache__/*.cpython-*.pyc |
| 83 | +%python3_sitelib/magic_wormhole-%version.dist-info/* |
| 84 | + |
| 85 | +%files bash-completion |
| 86 | +%{bash_completions_dir}/wormhole_complete.bash |
| 87 | + |
| 88 | +%files fish-completion |
| 89 | +%{fish_completions_dir}/wormhole_complete.fish |
| 90 | + |
| 91 | +%files zsh-completion |
| 92 | +%{zsh_completions_dir}/wormhole_complete.zsh |
| 93 | + |
| 94 | +%changelog |
| 95 | +* Mon Nov 03 2025 Owen Zimmerman <owen@fyralabs.com> |
| 96 | +- Initial commit |
0 commit comments