summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 48e5b679804cfa570fd34a26712a6ca0f69583cc (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
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: Expo <snorted at cocaine dot ninja>
# Pkgbuild based on https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pixelnuke-git

# Configuration
_reposerver=codeberg.org
_repoauthor=Expo
_reponame=joml
_repo=https://$_reposerver/$_repoauthor/$_reponame
_pkgname=joml
_pkgbranch=senpai
_pkgsubdir=.
_setprovides=true # if we should set the provides variable to the pkgname; for -git variant
_sourcedir="src_${_repoauthor}_${_reponame}_${_pkgbranch}"

# Package Build Info
pkgname="$_pkgname-git"
pkgver=r4.58cd474
pkgrel=2
epoch=
pkgdesc="JSON to TOML conversion utility, for use with jq"
arch=('x86_64')
url="$_repo"
license=('Unlicense')
depends=(
  glibc
  gcc-libs
)
makedepends=(
  base-devel
  cargo
  rust
  make
  git
)
provides=()
conflicts=()
if $_setprovides; then
  provides+=("$_pkgname")
  conflicts+=($_pkgname)
fi
source=(
  "$_sourcedir::git+$_repo#branch=$_pkgbranch"
)
sha512sums=('SKIP')

# Package Lifecycle Functions
pkgver() {
  cd "$srcdir/$_sourcedir"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
	cd "$srcdir/$_sourcedir/$_pkgsubdir"
	make
}

package() {
	cd "$srcdir/$_sourcedir/$_pkgsubdir"
	install -Dm755 target/release/joml "$pkgdir/usr/bin/joml"
}