summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 614baac876bb7be342530b3a34d15a1ec6b00472 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=luajit-git
pkgver=2.1.r140.gc525bcb9
pkgrel=1
pkgdesc="Just-In-Time (JIT) compiler for the Lua programming language"
arch=('i686' 'x86_64')
url="https://luajit.org/"
license=('MIT')
depends=('gcc-libs')
makedepends=('git')
provides=("luajit=$pkgver")
conflicts=('luajit')
options=('staticlibs')
source=("git+https://luajit.org/git/luajit.git")
sha256sums=('SKIP')


pkgver() {
  cd "luajit"

  _tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+ROLLING$' | head -n1)
  _rev=$(git rev-list --count $_tag..HEAD)
  _hash=$(git rev-parse --short HEAD)
  printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//;s/.ROLLING//'
}

build() {
  cd "luajit"

  make TARGET_STRIP=" @:" amalg
}

package() {
  cd "luajit"

  make DESTDIR="$pkgdir" PREFIX="/usr" install
  install -Dm644 "COPYRIGHT" -t "$pkgdir/usr/share/licenses/luajit"
}