aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/rpm/meshbay-hub.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/rpm/meshbay-hub.spec')
-rw-r--r--packaging/rpm/meshbay-hub.spec10
1 files changed, 9 insertions, 1 deletions
diff --git a/packaging/rpm/meshbay-hub.spec b/packaging/rpm/meshbay-hub.spec
index 90a4f08..141f6e6 100644
--- a/packaging/rpm/meshbay-hub.spec
+++ b/packaging/rpm/meshbay-hub.spec
@@ -2,7 +2,7 @@ Name: meshbay-hub
Version: __VERSION__
Release: 1%{?dist}
Summary: MeshBay Hub — identity authority and group registry server
-License: AGPLv3+
+License: AGPL-3.0-or-later
URL: https://meshbay.org
AutoReqProv: no
@@ -21,6 +21,7 @@ Runs as a systemd service behind Caddy for HTTPS.
%install
cp -a %{_staging_root}/* %{buildroot}/
+install -Dm644 -t %{buildroot}%{_licensedir}/%{name} %{_repo_root}/LICENSE
%pre
getent group meshbay >/dev/null || groupadd -r meshbay
@@ -40,11 +41,18 @@ install -d -o root -g meshbay -m 750 /etc/meshbay
%preun
%systemd_preun meshbay-hub.service
+# The hub's code lives in meshbay-common's venv, whose own cleanup runs only
+# after this package is gone: the bytecode compiled next to it is removed here.
+if [ "$1" -eq 0 ]; then
+ find /opt/meshbay-common/venv/lib/python3.*/site-packages/meshbay_hub \
+ -depth -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
+fi
%postun
%systemd_postun_with_restart meshbay-hub.service
%files
+%license %{_licensedir}/%{name}
/opt/meshbay-hub
/opt/meshbay-common/venv/lib/python*/site-packages/meshbay_hub/
/opt/meshbay-common/venv/lib/python*/site-packages/meshbay_hub-*.dist-info/