summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8b8e1737573754703138c991133bddfaf3875904 (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: Christopher <archlinux-maintainer@christopherz.com>

pkgname="dec-git"
pkgver=0.2.0.0
pkgrel=1
pkgdesc="A declarative package manager for Arch Linux"
arch=("x86_64")
url="https://gitlab.com/rehposuite/dec"
license=("GPL")
depends=("paru")
makedepends=("stack")
provides=("dec")
source=("git+${url}.git")
sha256sums=("SKIP")

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

build(){
  cd "dec"

  stack setup
  stack build
}

package() {
  cd "dec"

  find ./ -path '*/dist/*' -type f -name proid -perm /u+x \
        -execdir install -Dm755 -t "$pkgdir/usr/bin/" {} \;

  install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}