summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7968d55dbefe697d9afaa5c947198af862fffe7c (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
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: 88plug <https://github.com/88plug>
pkgname=intel-amt-linux
pkgver=0.1.2
pkgrel=1
pkgdesc="Linux GUI+CLI for Intel AMT/vPro: KVM, SOL, IDER, power control. IPMI/iLO/MeshCommander alt."
arch=('x86_64')
url="https://github.com/88plug/intel-amt-linux"
license=('MIT')
depends=('nodejs' 'npm' 'msitools' 'nss' 'libxtst' 'libxss' 'gtk3' 'alsa-lib')
optdepends=(
    'docker: LMS container for same-machine AMT access via /dev/mei0'
    'libsecret: GNOME keyring credential vault'
    'kwallet: KDE keyring credential vault'
    'libappindicator-gtk3: system tray icon support'
)
options=('!strip' '!debug')
install="${pkgname}.install"
source=("git+https://github.com/88plug/intel-amt-linux.git#tag=v${pkgver}")
sha256sums=('SKIP')

build() {
    cd "$srcdir/$pkgname"
    npm install --no-audit 2>/dev/null
}

package() {
    cd "$srcdir/$pkgname"

    install -dm755 "$pkgdir/opt/$pkgname"
    cp -r . "$pkgdir/opt/$pkgname/"

    # Remove native module build artifacts — prebuilt binaries handle platform support
    rm -rf "$pkgdir/opt/$pkgname/src/imrsdk/node_modules/deasync/build"

    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    # Launcher
    install -dm755 "$pkgdir/usr/bin"
    cat > "$pkgdir/usr/bin/$pkgname" << 'LAUNCHER'
#!/bin/bash
APP=/opt/intel-amt-linux
if [ ! -d "$APP/upstream/app/script" ]; then
    echo "intel-amt-linux: first run — downloading Intel Manageability Commander..."
    cd "$APP" && npm run setup
fi
exec "$APP/scripts/run.sh" "$@"
LAUNCHER
    chmod +x "$pkgdir/usr/bin/$pkgname"

    # Desktop entry
    install -dm755 "$pkgdir/usr/share/applications"
    cat > "$pkgdir/usr/share/applications/$pkgname.desktop" << 'DESKTOP'
[Desktop Entry]
Name=Intel AMT Linux
GenericName=AMT/vPro Management
Comment=Manage Intel vPro/AMT machines out-of-band - power, KVM, SOL, IDER, IPMI alternative
Exec=intel-amt-linux
Icon=intel-amt-linux
Terminal=false
Type=Application
Categories=System;Network;RemoteAccess;
Keywords=AMT;vPro;Intel;KVM;SOL;IDER;IPMI;iLO;BMC;out-of-band;manageability;remote;MeshCommander;
DESKTOP
}