rename config, fix pyproject.toml, add rpm stuff
This commit is contained in:
parent
63a1cb3377
commit
ff26bd87f2
@ -15,7 +15,7 @@ requires-python = ">=3.9"
|
||||
dependencies = [
|
||||
"fastapi >= 0.115.5",
|
||||
"paho-mqtt >= 1.6.1",
|
||||
"pydantic >= 2.9.2"
|
||||
"pydantic >= 2.9.2",
|
||||
"uvicorn >= 0.29.0"
|
||||
]
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
fastapi>=0.115.5
|
||||
paho-mqtt>=1.6.1
|
||||
pydantic>=2.9.2
|
||||
uvicorn>=0.29.0
|
14
rpm/buzon.service
Normal file
14
rpm/buzon.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Buzon - MQTT Webhook Delivery Service
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Environment="BUZON_CONFIG=/etc/buzon/buzon.yaml"
|
||||
EnvironmentFile=/etc/sysconfig/noggin
|
||||
EnvironmentFile=/etc/buzon/buzon.yaml
|
||||
ExecStart=/usr/bin/uvicorn --host ${BUZON_HOST} --port ${BUZON_PORT} buzon.app:app
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
45
rpm/buzon.spec
Normal file
45
rpm/buzon.spec
Normal file
@ -0,0 +1,45 @@
|
||||
Name: buzon
|
||||
Version: 0.1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: MQTT Webhook Delivery Service
|
||||
|
||||
License: GPLv3
|
||||
URL: https://git.resf.org/infrastructure/buzon
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
BuildRequires: systemd-rpm-macros
|
||||
Requires: (python3dist(uvicorn) with /usr/bin/uvicorn)
|
||||
|
||||
%description
|
||||
Buzon is a webhook system designed to receive messages from a forgejo instance
|
||||
and then send it to an MQTT-aware endpoint.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%pyproject_save_files buzon
|
||||
|
||||
# install buzon.yaml to /etc/buzon
|
||||
|
||||
%files -f %{pyproject_files}
|
||||
%license LICENSE
|
||||
%ghost %{_sysconfdir}/%{name}/%{name}.cfg
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Dec 18 2024 Louis Abel <label@resf.org> - 0.1.0-1
|
||||
- Initial buzon spec file
|
||||
|
2
rpm/buzon.sysconfig
Normal file
2
rpm/buzon.sysconfig
Normal file
@ -0,0 +1,2 @@
|
||||
BUZON_HOST="0.0.0.0"
|
||||
BUZON_PORT="9898"
|
Loading…
Reference in New Issue
Block a user