aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/rpm/meshbay-common.spec
blob: 147dc17376a50928ce6f9ebdf9e0c20ff99aa6b2 (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
Name:           meshbay-common
Version:        __VERSION__
Release:        1%{?dist}
Summary:        MeshBay shared Python runtime and libraries
License:        AGPLv3+
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}/

# 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
/opt/meshbay-common

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