diff --git a/archlinuxcn/hmcl/PKGBUILD b/archlinuxcn/hmcl/PKGBUILD index dbb99bf1a5b..a8089032b64 100644 --- a/archlinuxcn/hmcl/PKGBUILD +++ b/archlinuxcn/hmcl/PKGBUILD @@ -1,32 +1,31 @@ -# Maintainer: Hao Long +# Maintainer: Misaka13514 +# Contributor: Hao Long # Contributor: Lin Ruoshui # Contributor: hexchain pkgname=hmcl _pkgname=HMCL pkgver=3.6.14 -# https://github.com/huanghongxun/HMCL/commits/release-${pkgver} -_commit=8ebf58e8fa5560ba7ccf18ba5c22b9210f49748f +_tag="release-${pkgver}" pkgrel=1 pkgdesc="A Minecraft Launcher which is multi-functional, cross-platform and popular" arch=('any') -url="https://github.com/huanghongxun/HMCL" +url="https://github.com/HMCL-dev/HMCL" license=('GPL-3.0-or-later') -provides=('hmcl') -conflicts=('hmcl') -depends=('java-runtime') -makedepends=('liberica-jdk-11-full-bin') +depends=('java-runtime' 'hicolor-icon-theme') +makedepends=('java-environment-openjdk=11') +install="$pkgname.install" source=("hmcl-launch-script" "${pkgname}.desktop" - "${pkgname}-${pkgver}.tgz::${url}/archive/${_commit}.tar.gz") + "${pkgname}-${pkgver}.tgz::${url}/archive/${_tag}.tar.gz") b2sums=('1de8eca922b01b9c4c6d9a173143f05b900fd6b12b1b27bae175948a43125619d0e14c82d704548f70539af13eb4fd9f7288749265949089c7d6a8fe9032d284' '6c38da38fa13ad0af061d593f7733d6a406025c473240ccee4d07c89e71f8d5ead430374a7500f1395a7341c67e06ef3664cb1747ab93cba63459f7906b1598a' - 'be97b2a31c0080b709a6e0a907e17274cbcdc5da6d41160ee9bdbc7d9fd70be947cdbb6eee586559e3420f91ced262c6fc9377b8af28cd2c6cdd160cf4145cc5') + '148547547f71e7867894fe7df82a6f47e6d576c076722e5abc09ed0f571cd836afa9f7b81ea5c65ced066b77051bf229a846e4d65500815e13461f44b4567339') build() { - cd "${_pkgname}-${_commit}" - export JAVA_HOME=/usr/lib/jvm/liberica-jdk-11-full - ./gradlew clean build + cd "${_pkgname}-${_tag}" + export JAVA_HOME=/usr/lib/jvm/java-11-openjdk + ./gradlew clean build --no-daemon } package() { @@ -35,7 +34,7 @@ package() { # desktop file install -Dm644 "hmcl.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" - cd "${_pkgname}-${_commit}/${_pkgname}/build" + cd "${_pkgname}-${_tag}/${_pkgname}/build" # install jar _path=$(echo libs/HMCL*.jar) diff --git a/archlinuxcn/hmcl/hmcl.install b/archlinuxcn/hmcl/hmcl.install new file mode 100644 index 00000000000..809bc75bd28 --- /dev/null +++ b/archlinuxcn/hmcl/hmcl.install @@ -0,0 +1,18 @@ +post_install() { + case "$LANG" in + zh_CN*|zh_TW*|zh_HK*|zh_SG*|zh*) + printf '\033[1;36m==> 注意:在未显式配置必要变量之前,Microsoft 登录功能将不可用。\033[m\n' + printf '\033[1;36m==> 根据 HMCL 官方在 https://github.com/HMCL-dev/HMCL/discussions/4084 中的说明,\033[m\n' + printf '\033[1;36m==> 请勿使用 HMCL 官方发布版本中所包含的认证变量。\033[m\n' + printf '\033[1;36m==> 若您已自行获取合法的变量值,可通过以下方式传入:\033[m\n' + printf '\033[1;35m$ hmcl -Dhmcl.microsoft.auth.id=... -Dhmcl.microsoft.auth.secret=... -Dhmcl.curseforge.apikey=...\033[m\n' + ;; + *) + printf '\033[1;36m==> Note: Microsoft login will be unavailable until the required variables are explicitly configured.\033[m\n' + printf '\033[1;36m==> As stated in https://github.com/HMCL-dev/HMCL/discussions/4084,\033[m\n' + printf '\033[1;36m==> please do not use the credentials embedded in the official HMCL builds.\033[m\n' + printf '\033[1;36m==> If you have obtained valid credentials on your own, you may provide them as follows:\033[m\n' + printf '\033[1;35m$ hmcl -Dhmcl.microsoft.auth.id=... -Dhmcl.microsoft.auth.secret=... -Dhmcl.curseforge.apikey=...\033[m\n' + ;; + esac +} diff --git a/archlinuxcn/hmcl/lilac.yaml b/archlinuxcn/hmcl/lilac.yaml index 27498b2691a..b9a293b271f 100644 --- a/archlinuxcn/hmcl/lilac.yaml +++ b/archlinuxcn/hmcl/lilac.yaml @@ -1,17 +1,16 @@ -# This file is auto-generated by n2y - maintainers: - - github: imlonghao + - github: Misaka13514 build_prefix: extra-x86_64 -pre_build_script: aur_pre_build(maintainers=['imlonghao']) - -post_build: aur_post_build +pre_build_script: update_pkgver_and_pkgrel(_G.newver) -repo_depends: - - liberica-jdk-11-full-bin +post_build_script: | + git_pkgbuild_commit() + update_aur_repo() update_on: - - source: aur - aur: hmcl + - source: github + github: HMCL-dev/HMCL + use_latest_release: true + prefix: release-