summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea237301f84627df5e7acf40314f5d94a7cb6fc4 (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
# Maintainer: Hugo Osvaldo Barrera <hugo@barrera.io>

pkgname=grimshot-git
pkgver=1.6.rc2.r308.g07bfeb2a
pkgrel=1
pkgdesc="A helper for screenshots within sway."
arch=("x86_64")
url="https://github.com/swaywm/sway"
license=('MIT')
provides=('grimshot')
conflicts=('grimshot')
replaces=('swaygrab')
depends=("sway" "grim" "slurp" "jq")
optdepends=('libnotify: Notify users when a screenshot is taken'
            'wl-clipboard: Copy screenshots')
makedepends=("scdoc" "git")
source=("git+https://github.com/swaywm/sway.git")
md5sums=('SKIP')

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

build() {
  cd "$srcdir/sway/contrib"
  scdoc < grimshot.1.scd > grimshot.1
}

package() {
  cd "$srcdir/sway/contrib"

  install -Dm 644 grimshot.1 "$pkgdir/usr/share/man/man1/grimshot.1"
  install -Dm 755 grimshot "$pkgdir/usr/bin/grimshot"
}