blob: 608001691f2f33095f78fc51ba6dce74a0266444 (
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
|
# Maintainer: Tyler Cook <tcc@sandpolis.com>
_module=com.sandpolis.client.ascetic
pkgdesc='Sandpolis terminal client'
pkgname=sandpolis-client-terminal
pkgver=7.0.0
pkgrel=1
url='https://github.com/sandpolis/sandpolis'
arch=('any')
license=('Mozilla Public License Version 2.0')
makedepends=('java-environment>=15' 'git')
depends=('java-runtime>=15')
provides=('sandpolis-client-terminal')
conflicts=('sandpolis-client-terminal')
source=("git+https://github.com/sandpolis/sandpolis.git#commit=a5de3be94f3d9a4b12344a7cebe9c06601900060" \
"git+https://github.com/sandpolis/${_module}.git#commit=60adff96bbb4172a5226123fb0dcff20a1f32576")
sha512sums=('SKIP' 'SKIP')
prepare() {
# Transplant submodule instead of initializing it
cp -r "${srcdir}/${_module}" "${srcdir}/sandpolis"
}
pkgver() {
cd "${srcdir}/sandpolis/${_module}"
git describe --tags | tr -d 'v'
}
build() {
cd "${srcdir}/sandpolis"
./gradlew --no-daemon -g "${startdir}/.gradle" ":${_module}:assembleLib"
}
package() {
# Setup directories
install -d "${pkgdir}/usr/bin"
install -d "${pkgdir}/usr/lib/systemd/system"
install -d "${pkgdir}/usr/share/java/sandpolis-client-terminal/plugin"
install -d "${pkgdir}/var/lib/sandpolis-client-terminal/data"
install -d "${pkgdir}/var/log/sandpolis-client-terminal"
# Install libraries
cp -r "${srcdir}/sandpolis/${_module}/build/lib" \
"${pkgdir}/usr/share/java/sandpolis-client-terminal"
# Install invocation script
cat <<-EOF >"${pkgdir}/usr/bin/sandpolis-client-terminal"
#!/bin/sh
exec /usr/bin/java \
-Dpath.data=/var/lib/sandpolis-client-terminal/data \
-Dpath.log=/var/log/sandpolis-client-terminal \
-Dpath.lib=/usr/share/java/sandpolis-client-terminal/lib \
--module-path /usr/share/java/sandpolis-client-terminal/lib \
-m ${_module}/${_module}.Main \
"$@"
EOF
chmod 755 "${pkgdir}/usr/bin/sandpolis-client-terminal"
}
|