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

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

prepare() {
  cd "$srcdir/${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
  meson compile -C build
}


check() {
  desktop-file-validate "build/data/${_desktop_id}.desktop"
  desktop-file-validate "$srcdir/${pkgname%-git}/data/${pkgname%-git}-autostart.desktop"
  appstream-util validate --nonet "build/data/${_desktop_id}.appdata.xml"
}

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