summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 89e026efd2d2415e5c75e7cfd1fe62de153f38dc (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
pkgname=jugglinglab-git
pkgver=1.6.3.r13.g1457959
pkgrel=1
pkgdesc="A program for animating juggling patterns"
arch=('any')
url="https://jugglinglab.org/"
_giturl="https://github.com/jkboyce/jugglinglab"
makedepends+=('git' 'ant' 'java-environment>=11')
depends+=('java-runtime>=11')
source+=("git+${_giturl}.git")
for integ in $(get_integlist)
do
  typeset -n array="${integ}sums"
  array+=('SKIP')
done
provides+=("jugglinglab=$pkgver")
conflicts+=("jugglinglab")

pkgver() {
  cd jugglinglab
  git describe --long --tags 2>/dev/null | sed 's/[^[:digit:]]*\(.\+\)-\([[:digit:]]\+\)-g\([[:xdigit:]]\{7\}\)/\1.r\2.g\3/;t;q1'
  [ ${PIPESTATUS[0]} -eq 0 ] || \
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd jugglinglab
  ant
}

package() {
  cd jugglinglab/bin
  install -Dm755 JugglingLab.jar "$pkgdir/usr/share/java/JugglingLab.jar"
  mkdir -p "$pkgdir/usr/bin"
  echo -e '#!/bin/sh
java -jar /usr/share/java/JugglingLab.jar' > "$pkgdir/usr/bin/jugglinglab"
  chmod 755 "$pkgdir/usr/bin/jugglinglab"
}