summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 524b756776c882c36079dc23a96c2ebd0df48c41 (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
47
48
# Maintainer: Emma Tebibyte <emma@tebibyte.media>

_repo=coreutils
_pkgname=bonsai-$_repo
pkgname=$_pkgname-git
pkgver=r173.c97201f
pkgrel=8
pkgdesc="New core utilities for a new era."
arch=('any')
url="https://git.tebibyte.media/bonsai/coreutils"
license=('AGPL')
depends=()
makedepends=('rust' 'rust-bindgen')
provides=('bonsai-coreutils')
source=("git+https://git.tebibyte.media/bonsai/coreutils.git" "bonsai.sh")
md5sums=(
	SKIP
	ae17ace590d882d9c9701ba4cecbeefe
)

pkgver() {
  cd "$_repo"
  ( set -o pipefail
    git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
  )
}

build() {
	cd "$_repo"
	make
}

# for when testing works
#
# check() {
# 	cd "$_pkgname"
# 	make test
# }

package() {
	profile_d="$pkgdir/etc/profile.d"
	mkdir -p "$profile_d"
	cp bonsai.sh "$profile_d"

	cd "$_repo"
	make install PREFIX="$pkgdir/opt/bonsai"
}