blob: b71d1444b090e864051fc1a22a2ec116f2700129 (
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
|
#!/usr/bin/env bash
# shellcheck disable=SC2034,SC2154
# Maintainer: Abdulkadir Furkan Şanlı <me@abdulocra.cy>
# Contributor: Hao Long <imlonghao@archlinuxcn.org>
# Contributor: Lin Ruoshui <LinRs at users.noreply.github dot com>
# Contributor: hexchain <i at hexchain.org>
pkgname='hmcl-dev'
_pkgname='hmcl'
pkgver='3.5.7.247'
pkgrel='1'
pkgdesc='A Minecraft Launcher which is multi-functional, cross-platform and popular (development version)'
arch=('any')
url='https://github.com/huanghongxun/HMCL'
license=('GPL3')
provides=('hmcl')
conflicts=('hmcl')
_java='21'
depends=("java${_java}-openjfx")
makedepends=("jdk${_java}-openjdk" 'gradle' 'git')
source=('hmcl-launch-script'
"${_pkgname}.desktop"
"git+https://github.com/huanghongxun/HMCL.git#tag=v${pkgver}")
sha256sums=('eaad0d897060459413b35f00b6ca037b1f351e19a64c5297982b0ddd3d336feb'
'5780cf70f1afec0eb3cd8fc43297d361903c7204e274a28c5edf9b8ac3eea83e'
'SKIP')
build ()
{
cd HMCL || exit
export JAVA_HOME="/usr/lib/jvm/java-${_java}-openjdk"
export GRADLE_OPTS='-Xmx1g'
gradle --no-daemon build
}
package ()
{
# custom launch script
install -Dm755 'hmcl-launch-script' "${pkgdir}/usr/bin/${_pkgname}"
# desktop file
install -Dm644 'hmcl.desktop' "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
# install jar
_path=$(echo HMCL/HMCL/build/libs/HMCL*.jar)
install -Dm644 "${_path}" "${pkgdir}/usr/share/java/${_pkgname}/${_pkgname}.jar"
# install icon
install -Dm644 'HMCL/HMCL/image/craft_table.webp' "${pkgdir}/usr/share/icons/hicolor/48x48/apps/${_pkgname}.png"
}
|