summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 70a3bc1a094ccedfe9115fb48e5c0132446239d0 (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
# Maintainer: Simon Mangel <simon dot mangel dot sm at gmail dot com>

_pkgname="RWTH Mensaplan CLI"
pkgname="rwth-mensaplan-git"
pkgver=1.0.777d9e9
pkgrel=1
pkgdesc="An (unofficial) CLI for the cafeteria menues of RWTH Aachen University"
arch=("x86_64")
url="https://github.com/MangelWare/Mensaplan"
license=("MIT")
depends=('sh' 'java-runtime')
makedepends=('git' 'java-environment')
source=("git+https://github.com/MangelWare/Mensaplan.git#branch=master"
        "mensaplan.sh")
sha256sums=('SKIP'
            '99f4b1b335d31cc8bb2eb7147d67b2c7f59ec4cf10bb83cdd9c3bf95e1dfd6ee')

pkgver() {
	cd Mensaplan
	printf %s.%s \
    $(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout | grep -v Warning) \
    $(git rev-parse --short HEAD)
}

build() {
  cd Mensaplan
  ./mvnw clean install
}

package() {
  install -Dm755 mensaplan.sh "${pkgdir}"/usr/bin/mensaplan

  cd Mensaplan
  install -Dm755 target/mensaplan-*-jar-with-dependencies.jar "${pkgdir}"/usr/share/java/${pkgname}/mensaplan.jar
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}