summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4cad5a5a728cd044bd979fbd40fd1e2cb6f015d4 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Kyle Laker <kyle@laker.email>
pkgname=warpinator-git
_desktop_id=org.x.Warpinator
pkgver=1.8.1.r0.gce45bbde
pkgrel=1
pkgdesc="Share files across the LAN"
arch=('any')
url="https://github.com/linuxmint/warpinator"
license=('GPL-3.0-or-later')
depends=(
  'gtk3'
  'libnm'
  'python-cairo'
  'python-cryptography'
  'python-gobject'
  'python-grpcio'
  'python-landlock'
  'python-netifaces'
  'python-packaging'
  'python-protobuf'
  'python-pynacl'
  'python-qrcode'
  'python-setproctitle'
  'python-setuptools'
  'python-zeroconf'
  'python-xapp'
  'xapps'
)
makedepends=('git' 'meson' 'polkit')
checkdepends=('appstream')
optdepends=('ufw: Configure firewall rules')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/linuxmint/warpinator.git')
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  git describe --long --tags --exclude master* | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "${pkgname%-git}"

  # Fix hard-coded libexec dir
  find . -type f -exec sed -i 's/libexec/lib/g' {} \;
  find . -type f -exec sed -i 's/@libexecdir@/@libdir@/g' {} \;
}

build() {
  arch-meson "${pkgname%-git}" build \
    -Dbundle-zeroconf=false \
    -Dbundle-grpc=false \
    -Dbundle-landlock=false
  meson compile -C build
}


check() {
  desktop-file-validate "build/data/${_desktop_id}.desktop"
  desktop-file-validate "${pkgname%-git}/data/${pkgname%-git}-autostart.desktop"
  appstreamcli validate --no-net "build/data/${_desktop_id}.appdata.xml" || :
}

package() {
  meson install -C build --destdir "$pkgdir"
}