summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3763a48efdbb1b66049dff0c05119ae91835fd55 (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
# Maintainer: William Turner <willtur.will@gmail.com>
_name=hyperbox
pkgname=hboxc
pkgver=0.0.17
pkgrel=1
pkgdesc="Virtual Infrastructure Manager for VirtualBox - Client"
arch=('x86_64')
url='https://kamax.io/hbox/'
license=('GPL3')
depends=('java-runtime>=8')
source=("https://github.com/hyperbox/${_name}/releases/download/v${pkgver}/hbox-client-${pkgver}-linux.zip")
sha256sums=('8e01b7f057f192016d23d033fc0102acd9d9d28f90fe152b1712a0839a406551')

package() {
  # copy package files
  install -d -m755 "${pkgdir}/opt/${pkgname}"
  cp -r bin icons lib "${pkgdir}/opt/${pkgname}/"

  # Installed patched launch script
  sed "s;HBOX_CLIENT_BASE_DIR=.*;HBOX_CLIENT_BASE_DIR=/opt/${pkgname};" hyperbox > "${pkgdir}/opt/${pkgname}/hyperbox"
  chmod 755 "${pkgdir}/opt/${pkgname}/hyperbox"

  # Add symlinks in path
  install -d -m755 "${pkgdir}/usr/bin"
  ln -s "/opt/${pkgname}/hyperbox" "${pkgdir}/usr/bin/hyperbox"
  ln -s "/opt/${pkgname}/hyperbox" "${pkgdir}/usr/bin/hboxc"

  # add shortcut stuff
  install -D -m644 hyperbox-client.desktop "${pkgdir}/usr/share/applications/hyperbox-client.desktop"
  echo "Path=/opt/${pkgname}" >> "${pkgdir}/usr/share/applications/hyperbox-client.desktop"
  echo "Exec=/opt/${pkgname}/hyperbox" >> "${pkgdir}/usr/share/applications/hyperbox-client.desktop"
  echo "Icon=/opt/${pkgname}/icons/hyperbox.ico" >> "${pkgdir}/usr/share/applications/hyperbox-client.desktop"
}