summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bf07627f8d28f99c3593e96efe1d4e11eb2316a7 (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
# Maintainer: jtheoof <contact@jtheoof.me>
pkgname=swappy-git
_pkgname=swappy
pkgver=r226.717ab0c
pkgrel=2
license=('MIT')
pkgdesc='Grab and edit screenshots from a Wayland compositor'
makedepends=("meson" "scdoc" "git")
depends=(
  "cairo"
  "gtk3"
  "pango"
  "wayland"
)
optdepends=(
  "libnotify"
  "otf-font-awesome"
  "wayland-protocols"
)
arch=("i686" "x86_64")
url='http://github.com/jtheoof/swappy'
source=("${pkgname%-*}::git+https://github.com/jtheoof/swappy.git")
sha1sums=('SKIP')
provides=('swappy')
conflicts=('swappy')
options=(debug !strip)

pkgver() {
  cd "${srcdir}/${_pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
  cd "${srcdir}/${_pkgname}"

  arch-meson --auto-features=auto build
  ninja -C build
}

package() {
  cd "${srcdir}/${_pkgname}"

  if [ -f LICENSE ]; then
    install -D -m 644 -t "$pkgdir/usr/share/licenses/${_pkgname}" LICENSE
  fi

  DESTDIR="$pkgdir/" ninja -C build install
}