summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 542ba508fa8690c9bb0a0a6d6862f6f31f03415e (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
#!/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.6.11.264'
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')
depends=('jre21-openjdk')
makedepends=('jdk21-openjdk' 'gradle' 'git')
source=('hmcl-launch-script'
        "${_pkgname}.desktop"
        "git+https://github.com/huanghongxun/HMCL.git#tag=v${pkgver}")
sha256sums=('5052316e95f26a137cd7ab3953e7b019bcd0a755cfe27abb318c505eb6268baf'
            '5780cf70f1afec0eb3cd8fc43297d361903c7204e274a28c5edf9b8ac3eea83e'
            '2998fcc08be08c24db4038d2cf13b51966055af6eeabac1410ba830a6bea84fe')

build ()
{
  cd HMCL || exit
  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"
}