summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: de857529f3bc5dc677441608183daf465303f9ec (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
pkgname=tg-ws-proxy
pkgver=1.10.0
pkgrel=1
pkgdesc="Telegram Desktop WebSocket Bridge Proxy"
arch=('any')
url="https://github.com/Flowseal/tg-ws-proxy"
license=('MIT')
depends=(
  'gtk3'
  'libayatana-appindicator'
  'python'
  'python-cryptography'
  'python-customtkinter'
  'python-gobject'
  'python-pillow'
  'python-psutil'
  'python-pyperclip'
  'python-pystray'
  'tk'
  'xdg-utils'
)
makedepends=(
  'git'
  'python-build'
  'python-hatchling'
  'python-installer'
  'python-wheel'
  'imagemagick'
)
optdepends=(
  'wl-clipboard: clipboard support on Wayland'
  'xclip: clipboard support on X11'
)
conflicts=('tg-ws-proxy-bin' 'tg-ws-proxy-cli' 'tg-ws-proxy-git')
source=(
  "${pkgname}-${pkgver}::git+${url}.git#tag=v${pkgver}"
  "${pkgname}.desktop"
  "${pkgname}.service"
)
b2sums=('SKIP' 'SKIP' 'SKIP')

build() {
  cd "${pkgname}-${pkgver}"
  python -m build --wheel --no-isolation
}

package() {
  cd "${pkgname}-${pkgver}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -d "$pkgdir/usr/share/icons/hicolor/64x64/apps"
  magick icon.ico -background none -alpha on "$pkgdir/usr/share/icons/hicolor/64x64/apps/$pkgname.png"
  install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
  install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/user/$pkgname.service"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}