pinnwand/pinnwand.spec

81 lines
2.0 KiB
RPMSpec
Raw Normal View History

2023-10-27 03:02:47 +00:00
%global gittagversion 1.5.0
2023-08-04 11:07:52 +00:00
%global gittag v%{?gittagversion}
Name: pinnwand
Version: %{?gittagversion}
Release: 1%{?dist}
Summary: Straightforward pastebin software
License: MIT
URL: https://github.com/supakeen/pinnwand
Source: %{url}/archive/%{gittag}/%{name}-%{version}.tar.gz
Source: pinnwand.service
2024-01-08 19:32:27 +00:00
# Upstream switched to `pdm` from poetry for 1.5.0, but this prevents creation
# of the pinnwand entrypoint during build
Patch: https://github.com/supakeen/pinnwand/pull/211.patch
2023-08-04 11:07:52 +00:00
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: systemd-rpm-macros
%global _description %{expand:
pinnwand is Python pastebin software that tried to keep it simple but got a
little more complex
}
%description %_description
%prep
%autosetup -p 1 -n pinnwand-%{version}
2023-10-27 03:02:47 +00:00
2024-01-08 19:32:27 +00:00
# NOTE(neil): 2023-10-26 pinnwand 1.5.0 wants sqlalchemy >= 2, but Fedora has
# not upgraded to # it yet. See:
2023-10-27 03:02:47 +00:00
# https://src.fedoraproject.org/rpms/python-sqlalchemy/pull-request/16
sed -i 's/sqlalchemy>=2/sqlalchemy<2/' pyproject.toml
2023-08-04 11:07:52 +00:00
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files pinnwand
2023-10-27 03:02:47 +00:00
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
2023-08-04 11:07:52 +00:00
install -Dpm 0644 etc/pinnwand.toml-example %{buildroot}%{_sysconfdir}/%{name}/%{name}.toml
%check
%pytest
2023-10-27 03:02:47 +00:00
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
2023-08-04 11:07:52 +00:00
%files -f %{pyproject_files}
2023-10-27 03:02:47 +00:00
%dir %{_sysconfdir}/%{name}
2023-08-04 11:07:52 +00:00
%doc README.md
2024-01-08 19:32:27 +00:00
%license LICENSE AUTHORS.rst
2023-08-04 11:07:52 +00:00
%{_bindir}/%{name}
%{_unitdir}/pinnwand.service
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml
%changelog
2024-01-08 19:32:27 +00:00
* Mon Jan 08 2024 Neil Hanlon <neil@shrug.pw> - 1.5.0-1
- Update to 1.5.0
2023-10-27 03:02:47 +00:00
2023-08-04 11:07:52 +00:00
* Thu Aug 03 2023 Neil Hanlon <neil@shrug.pw> - 1.4.0-1
- Update to 1.4.0
* Sun Feb 20 2022 supakeen <cmdr@supakeen.com> - 1.3.2-1
- Initial version of the package.