Skip to content

Commit f9e9660

Browse files
authored
hmcl: add install file (#4366)
1 parent 12dd2be commit f9e9660

File tree

3 files changed

+40
-24
lines changed

3 files changed

+40
-24
lines changed

archlinuxcn/hmcl/PKGBUILD

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
# Maintainer: Hao Long <imlonghao@archlinuxcn.org>
1+
# Maintainer: Misaka13514 <Misaka13514 at gmail dot com>
2+
# Contributor: Hao Long <imlonghao@archlinuxcn.org>
23
# Contributor: Lin Ruoshui <LinRs at users.noreply.github dot com>
34
# Contributor: hexchain <i at hexchain.org>
45

56
pkgname=hmcl
67
_pkgname=HMCL
78
pkgver=3.6.14
8-
# https://github.com/huanghongxun/HMCL/commits/release-${pkgver}
9-
_commit=8ebf58e8fa5560ba7ccf18ba5c22b9210f49748f
9+
_tag="release-${pkgver}"
1010
pkgrel=1
1111
pkgdesc="A Minecraft Launcher which is multi-functional, cross-platform and popular"
1212
arch=('any')
13-
url="https://github.com/huanghongxun/HMCL"
13+
url="https://github.com/HMCL-dev/HMCL"
1414
license=('GPL-3.0-or-later')
15-
provides=('hmcl')
16-
conflicts=('hmcl')
17-
depends=('java-runtime')
18-
makedepends=('liberica-jdk-11-full-bin')
15+
depends=('java-runtime' 'hicolor-icon-theme')
16+
makedepends=('java-environment-openjdk=11')
17+
install="$pkgname.install"
1918
source=("hmcl-launch-script"
2019
"${pkgname}.desktop"
21-
"${pkgname}-${pkgver}.tgz::${url}/archive/${_commit}.tar.gz")
20+
"${pkgname}-${pkgver}.tgz::${url}/archive/${_tag}.tar.gz")
2221
b2sums=('1de8eca922b01b9c4c6d9a173143f05b900fd6b12b1b27bae175948a43125619d0e14c82d704548f70539af13eb4fd9f7288749265949089c7d6a8fe9032d284'
2322
'6c38da38fa13ad0af061d593f7733d6a406025c473240ccee4d07c89e71f8d5ead430374a7500f1395a7341c67e06ef3664cb1747ab93cba63459f7906b1598a'
24-
'be97b2a31c0080b709a6e0a907e17274cbcdc5da6d41160ee9bdbc7d9fd70be947cdbb6eee586559e3420f91ced262c6fc9377b8af28cd2c6cdd160cf4145cc5')
23+
'148547547f71e7867894fe7df82a6f47e6d576c076722e5abc09ed0f571cd836afa9f7b81ea5c65ced066b77051bf229a846e4d65500815e13461f44b4567339')
2524

2625
build() {
27-
cd "${_pkgname}-${_commit}"
28-
export JAVA_HOME=/usr/lib/jvm/liberica-jdk-11-full
29-
./gradlew clean build
26+
cd "${_pkgname}-${_tag}"
27+
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
28+
./gradlew clean build --no-daemon
3029
}
3130

3231
package() {
@@ -35,7 +34,7 @@ package() {
3534
# desktop file
3635
install -Dm644 "hmcl.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
3736

38-
cd "${_pkgname}-${_commit}/${_pkgname}/build"
37+
cd "${_pkgname}-${_tag}/${_pkgname}/build"
3938

4039
# install jar
4140
_path=$(echo libs/HMCL*.jar)

archlinuxcn/hmcl/hmcl.install

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
post_install() {
2+
case "$LANG" in
3+
zh_CN*|zh_TW*|zh_HK*|zh_SG*|zh*)
4+
printf '\033[1;36m==> 注意:在未显式配置必要变量之前,Microsoft 登录功能将不可用。\033[m\n'
5+
printf '\033[1;36m==> 根据 HMCL 官方在 https://github.com/HMCL-dev/HMCL/discussions/4084 中的说明,\033[m\n'
6+
printf '\033[1;36m==> 请勿使用 HMCL 官方发布版本中所包含的认证变量。\033[m\n'
7+
printf '\033[1;36m==> 若您已自行获取合法的变量值,可通过以下方式传入:\033[m\n'
8+
printf '\033[1;35m$ hmcl -Dhmcl.microsoft.auth.id=... -Dhmcl.microsoft.auth.secret=... -Dhmcl.curseforge.apikey=...\033[m\n'
9+
;;
10+
*)
11+
printf '\033[1;36m==> Note: Microsoft login will be unavailable until the required variables are explicitly configured.\033[m\n'
12+
printf '\033[1;36m==> As stated in https://github.com/HMCL-dev/HMCL/discussions/4084,\033[m\n'
13+
printf '\033[1;36m==> please do not use the credentials embedded in the official HMCL builds.\033[m\n'
14+
printf '\033[1;36m==> If you have obtained valid credentials on your own, you may provide them as follows:\033[m\n'
15+
printf '\033[1;35m$ hmcl -Dhmcl.microsoft.auth.id=... -Dhmcl.microsoft.auth.secret=... -Dhmcl.curseforge.apikey=...\033[m\n'
16+
;;
17+
esac
18+
}

archlinuxcn/hmcl/lilac.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
# This file is auto-generated by n2y
2-
31
maintainers:
4-
- github: imlonghao
2+
- github: Misaka13514
53

64
build_prefix: extra-x86_64
75

8-
pre_build_script: aur_pre_build(maintainers=['imlonghao'])
9-
10-
post_build: aur_post_build
6+
pre_build_script: update_pkgver_and_pkgrel(_G.newver)
117

12-
repo_depends:
13-
- liberica-jdk-11-full-bin
8+
post_build_script: |
9+
git_pkgbuild_commit()
10+
update_aur_repo()
1411
1512
update_on:
16-
- source: aur
17-
aur: hmcl
13+
- source: github
14+
github: HMCL-dev/HMCL
15+
use_latest_release: true
16+
prefix: release-

0 commit comments

Comments
 (0)