summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb2f5e687a567638a28e8ea43a2105a440bdade1 (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
# Maintainer: Monjaris <ziyanovruzlu750@gmail.com>
pkgname=dotty-git
pkgver=r100.abc1234  # will be auto-generated by pkgver()
pkgrel=1
pkgdesc="Config/dotfiles manager, written in modern C++"
options=(!debug)
arch=('x86_64')
url="https://github.com/Monjaris/dotty"
license=('GPL-3.0-or-later')
provides=('dotty')
conflicts=('dotty')

depends=(
  'cli11'
  'github-cli'
  'bat'
)

makedepends=(
  'xmake'
  'git'
)

source=(
    "dotty::git+https://github.com/Monjaris/dotty.git"
    "dotline::git+https://github.com/Monjaris/dotline.git"
)
sha256sums=('SKIP' 'SKIP')

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

build() {
    cd "$srcdir/dotty"
    cp -r "$srcdir/dotline/." deps/dotline
    xmake config -m release
    xmake build -j$(nproc) dotty
    cp build/linux/x86_64/release/dotty ./dotty
}

package() {
    cd "$srcdir/dotty"
    install -Dm755 build/linux/x86_64/release/dotty "$pkgdir/usr/bin/dotty"
}