summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe51a4c134b0de132ec6aad83fb31e1e1f3cfc0c (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
# Maintainer: Joseph R. Prostko <joe dot prostko at gmail dot com>
# Upstream: Immersed Inc. <info at immersed dot com>

pkgname=immersed
pkgver=10.6.0
pkgrel=1
pkgdesc="Immersed Desktop Agent"
arch=('x86_64')
url="https://immersed.com/"
license=('unknown')
depends=('fuse')
optdepends=('V4L2LOOPBACK-MODULE: Virtual webcam support')
options=(!strip !debug)

_pkgname_ucfirst="${pkgname^}"
_appimage_unversioned="${_pkgname_ucfirst}-${arch}.AppImage"
_appimage_versioned="${_pkgname_ucfirst}-${pkgver}-${arch}.AppImage"

source=("${_appimage_versioned}::https://static.immersed.com/dl/${_appimage_unversioned}")
sha256sums=('bb4ed0a465c45dba7b0296607abab7eb1fb85b1b33d3c600aee2159d9792d1c9')

prepare() {
    chmod +x "${srcdir}/${_appimage_versioned}"
    "${srcdir}/${_appimage_versioned}" --appimage-extract
}

package() {
    # Deploy AppImage
    install -Dm755 "${srcdir}/${_appimage_versioned}" "${pkgdir}/opt/${_pkgname_ucfirst}/${_appimage_unversioned}"

    # Symlink executable
    install -dm755 "${pkgdir}/usr/bin"
    ln -s "/opt/${_pkgname_ucfirst}/${_appimage_unversioned}" "${pkgdir}/usr/bin/${pkgname}"

    # Modify and install .desktop file
    sed -i "s/Exec=Immersed/Exec=${pkgname}/" "${srcdir}/squashfs-root/${_pkgname_ucfirst}.desktop"
    install -Dm644 "${srcdir}/squashfs-root/${_pkgname_ucfirst}.desktop" "${pkgdir}/usr/share/applications/${_pkgname_ucfirst}.desktop"

    # Install icon
    install -Dm644 "${srcdir}/squashfs-root/${_pkgname_ucfirst}.png" "${pkgdir}/usr/share/pixmaps/${_pkgname_ucfirst}.png"
}