summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ed39f071832b263f586d9a6320f31d26d7667e1f (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Maintainer:  Vitalii Kuzhdin <vitaliikuzhdin@gmail.com>

_Name="Sideband"
pkgname="${_Name,,}"
pkgver=2.1.0
pkgrel=1
pkgdesc="Communicate with people or LXMF-compatible systems over Reticulum networks"
arch=(
  'any'
)
url="https://unsigned.io/software/Sideband.html"
_url="https://github.com/markqvist/${_Name}"
license=(
  'CC-BY-NC-SA-4.0'
)
depends=(
  'python>=3.13'
  'python-rns>=1.2.5'
  'python-lxmf>=0.9.8'
  'python-lxst>=0.4.6'
  'python-kivy>=2.3.0'
  'python-numpy>=2.0.0'
  'python-pillow>=10.2.0'
  'python-mistune>=3.0.2'
  'python-qrcode'
  # 'python-materialyoucolor>=2.0.7'
  # 'python-beautifulsoup4'
  'python-pycodec2>=4.1.0'
  'python-audioop-lts>=0.2.1'

  'hicolor-icon-theme'
  'python-cryptography'
  'python-dbus'
  'python-dnspython'
  'python-prompt_toolkit'
  'python-requests'
  'python-sh'
  'python-typing_extensions'
  'xclip'
  'xorg-xrandr'
  'xsel'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools'
)
optdepends=(
  'python-watchdog: auto reload kv or py'
  'python-pysocks: proxying of MQTT connection'
  'python-firebase: FireBase data collection'
  'python-keyring: keystore'
)
provides=(
  "python-sbapp=${pkgver}"
)
conflicts=(
  'python-sbapp'
)
_pkgsrc="${_url##*/}-${pkgver}"
source=(
  "${_url}/archive/refs/tags/${pkgver}/${_pkgsrc}.tar.gz"
  # "${_pkgsrc}-manifest.rsm::${_url}/releases/download/${pkgver}/manifest.rsm"
)
sha256sums=('dff65365a3b650bff349c518e66b0c534b8541594cfc0e2c4f8ee1a2ecc6bb6f')

# verify() {
#   rngit release "${_pkgsrc}-manifest.rsm" verify \
#     --signer bc7291552be7a58f361522990465165c
# }

prepare() {
  cd "${srcdir}/${_pkgsrc}"
  sed -e "s|^__version__ = .*|__version__ = \"${pkgver}\"|" \
      -i 'sbapp/main.py'
}

build() {
  cd "${srcdir}/${_pkgsrc}"
  python -m build --wheel --no-isolation
}

package() {
  local site_packages="$(python -c "import site; print(site.getsitepackages()[0])")"

  cd "${srcdir}/${_pkgsrc}"
  python -m installer --destdir="${pkgdir}" dist/*.whl

  find "sbapp" -type f -name '*.kv' -exec \
    cp -v "{}" "${pkgdir}/${site_packages}/{}" \;

  install -vDm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"

  install -vd "${pkgdir}/usr/share/licenses/${pkgname}"
  ln -vsf "${site_packages}/sbapp-${pkgver}.dist-info/licenses/LICENSE" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}