summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5e19d52356e7c451753f9654959a54e138c1531c (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
# Maintainer: everyx <lunt.luo#gmail.com>

pkgname=yacd-git
_pkgname=yacd
pkgver=0.3.6.r12.ge405512
pkgrel=3

pkgdesc='Yet Another Clash Dashboard'
arch=('any')
_repo="haishanh/${_pkgname}"
url="https://github.com/${_repo}"
license=('MIT')

makedepends=('git' 'pnpm')
optdepends=('clash: A rule-based tunnel in Go'
            'sing-box: The universal proxy platform')
provides=("$_pkgname")
conflicts=("$_pkgname")

source=("${_pkgname}::git+${url}.git#branch=master")
sha256sums=(SKIP)

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

build () {
  cd "$_pkgname"
  pnpm i && pnpm build
}

package() {
  cd "$_pkgname/public"

  find . -type f -exec install -Dm 644 {} "${pkgdir}"/usr/share/"${_pkgname}"/{} \;
}