aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/rpm/meshbay-common.spec
blob: cad00b7f23de87279abd8d07c0b907bba2e39c2d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Name:           meshbay-common
Version:        __VERSION__
Release:        1%{?dist}
Summary:        MeshBay shared Python runtime and libraries
# The venv carries every Python dependency, each under its own licence:
# /opt/meshbay-common/THIRD-PARTY-NOTICES.txt lists them.
License:        LGPL-3.0-or-later
URL:            https://meshbay.org

AutoReqProv:    no

%description
Shared Python virtual environment, cryptographic primitives
(Ed25519, X25519, GEK wrap/unwrap, ChaCha20-Poly1305), protocol types
(MNP, MHP), and all pip dependencies used by meshbay-hub and meshbay-node.

Installs to /opt/meshbay-common/venv/.

%install
cp -a %{_staging_root}/* %{buildroot}/
install -Dm644 -t %{buildroot}%{_licensedir}/%{name} \
    %{_repo_root}/packages/meshbay-common/COPYING \
    %{_repo_root}/packages/meshbay-common/COPYING.LESSER

# Bytecode written at run time into __pycache__ is not the package's, and would
# keep rpm from removing a directory the new version no longer ships.
%pre
if [ "$1" -ge 2 ]; then
    find /opt/meshbay-common/venv -depth -type d -name __pycache__ \
        -exec rm -rf {} + 2>/dev/null || true
fi

%preun
if [ "$1" -eq 0 ]; then
    find /opt/meshbay-common/venv -depth -type d -name __pycache__ \
        -exec rm -rf {} + 2>/dev/null || true
fi

%files
%license %{_licensedir}/%{name}
/opt/meshbay-common

%changelog
* Sun Aug 31 2026 MeshBay Team <devel@meshbay.org> - %{version}-1
- Packaging overhaul: shared venv under /opt/meshbay-common/venv/