summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 670fe443cfd7fd289d0b48e9ed0cfea4a0e30a38 (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
45
46
47
48
49
50
51
# Maintainer: tunalad <tunalad@proton.me>
pkgname=hlam
pkgver=3.0.0
pkgrel=1
pkgdesc="Half-Life Asset Manager"
arch=('x86_64')
url="https://github.com/SamVanheer/HalfLifeAssetManager"
license=('custom:HLAM') # Custom license
depends=(
    'glibc'
    'gcc-libs'
    'openal'
    'qt5-base'
    'qt5-x11extras'
    #'qt5-networkauth'
    'qt5-tools'
)
makedepends=()
source=("https://github.com/SamVanheer/HalfLifeAssetManager/releases/download/HLAM-V${pkgver}/halflifeassetmanager_${pkgver}_amd64.deb" "hlam.desktop")
sha256sums=(SKIP SKIP)

prepare() {
    # extract the debian package
    ar -x halflifeassetmanager_${pkgver}_amd64.deb
}

package() {
    cd "$srcdir"

    # extract the data.tar.gz
    tar -xzvf data.tar.gz

    # install the binary
    install -Dm755 usr/bin/hlam "${pkgdir}/usr/bin/${pkgname}"

    # copy the other necessary files
    cp -r usr/share "${pkgdir}/usr/share"

    # install the desktop file
    install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"

    # install the icon
    mkdir -p "${pkgdir}/usr/share/icons/hicolor/128x128/apps"
    cp usr/share/icons/hicolor/128x128/apps/hlam.png "${pkgdir}/usr/share/icons/hicolor/128x128/apps/${pkgname}.png"

    # install the manual
    mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
    cp -r usr/share/'Half-Life Asset Manager'/'Half-Life Asset Manager'/HalfLifeAssetManagerManual.pdf "${pkgdir}/usr/share/doc/${pkgname}/manual.pdf"

    # there's no license file found in the debian package :/
}