buzon/rpm/python-buzon.spec

64 lines
1.5 KiB
RPMSpec

%global pyname buzon
Name: python-%{pyname}
Version: 0.2.1
Release: 1%{?dist}
Summary: MQTT Webhook Delivery Service
License: GPLv3
URL: https://git.resf.org/infrastructure/buzon
Source0: %{url}/archive/%{pyname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: pyproject-rpm-macros
BuildRequires: systemd-rpm-macros
Requires: (python3dist(uvicorn) with /usr/bin/uvicorn)
%global _description %{expand:
Buzon is a webhook system designed to receive messages from a forgejo instance
and then send it to an MQTT-aware endpoint.}
%description %_description
%package -n python3-buzon
Summary: %{summary}
%description -n python3-buzon %_description
%prep
%autosetup -n buzon-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files buzon
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sysconfdir}/%{pyname}
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
install -pm 0644 rpm/buzon.service %{buildroot}%{_unitdir}/%{pyname}.service
install -pm 0644 config/buzon.yaml %{buildroot}%{_sysconfdir}/%{pyname}.yaml
install -pm 0644 rpm/buzon.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{pyname}
%files -f %{pyproject_files}
%license LICENSE
%config %{_sysconfdir}/%{pyname}/%{pyname}.yaml
%{_unitdir}/%{pyname}.service
%{_sysconfdir}/sysconfig/%{pyname}
%changelog
* Sat Dec 21 2024 Louis Abel <label@resf.org> - 0.2.1-1
- Add additional fields for topics
* Wed Dec 18 2024 Louis Abel <label@resf.org> - 0.1.0-1
- Initial buzon spec file