summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 85de3bd34a02c0b21e7a9de7d4b320561109d1d3 (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: KingofToasters <dev@sgregoratto.me>
pkgname=mrsh-git
pkgver=r417.a2f07ab
pkgrel=3
pkgdesc='A minimal POSIX shell'
url='https://git.sr.ht/~emersion/mrsh'
license=('custom: MIT')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
makedepends=('git' 'meson')
optdepends=('libedit: alternate readline library')
provides=('mrsh')
source=("${pkgname%-git}::git+$url")
sha256sums=('SKIP')
install="mrsh-git.install"

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

build() {
  cd "$srcdir/${pkgname%-git}"
  arch-meson "$srcdir/build"
  ninja -C "$srcdir/build"
}

check() {
  ninja -C "$srcdir/build" test
}

package() {
  DESTDIR="$pkgdir" ninja -C "$srcdir/build" install
  install -Dm644 "$srcdir/${pkgname%-git}/LICENSE" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}