Skip to content

hmcl: add install file #4366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions archlinuxcn/hmcl/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# Maintainer: Hao Long <imlonghao@archlinuxcn.org>
# Maintainer: Misaka13514 <Misaka13514 at gmail dot com>
# Contributor: Hao Long <imlonghao@archlinuxcn.org>
# Contributor: Lin Ruoshui <LinRs at users.noreply.github dot com>
# Contributor: hexchain <i at hexchain.org>

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() {
Expand All @@ -35,7 +35,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)
Expand Down
18 changes: 18 additions & 0 deletions archlinuxcn/hmcl/hmcl.install
Original file line number Diff line number Diff line change
@@ -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
}
19 changes: 9 additions & 10 deletions archlinuxcn/hmcl/lilac.yaml
Original file line number Diff line number Diff line change
@@ -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-