summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 264765197cf9ccd598408f61701233e57d60ab0e (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
# Maintainer: begin-theadventure <begin-thecontact.ncncb at dralias dot com>
# Contributor: Fabrizio Pietrucci <bamlessnty5@gmail.com>
# Contributor: Zhiwei Chen <condy0919@gmail.com>

_pkgname=hotspot
pkgname=$_pkgname-appimage
pkgver=1.5.1
pkgrel=1
pkgdesc="The Linux perf GUI for performance analysis (AppImage release)"
arch=('x86_64')
url="https://github.com/KDAB/hotspot"
license=('GPL')
depends=('fuse2')
provides=($_pkgname)
conflicts=($_pkgname)
options=('!strip')
_appimage="$_pkgname-v$pkgver-x86_64.AppImage"
source=("$url/releases/download/v$pkgver/$_appimage")
sha256sums=('ce60db8f571b5b41ca5bc5417054558c5f7fd6e5801a47cf9390f3b888fcd297')

prepare() {
  # Extract the AppImage
  chmod +x "$_appimage"
  ./"$_appimage" --appimage-extract
  chmod 755 squashfs-root
  # Create an exec file with an environment variable that disables AppImageLauncher integration
  echo env APPIMAGELAUNCHER_DISABLE=true /opt/$_pkgname/$_pkgname > $_pkgname
}

package() {
  cd squashfs-root
  for i in 16x16 22x22 32x32 48x48 64x64 512x512; do
    install -Dm644 usr/share/icons/hicolor/$i/apps/$_pkgname.png "$pkgdir/usr/share/icons/hicolor/$i/apps/$_pkgname.png"
  done
  install -Dm644 usr/share/applications/com.kdab.$_pkgname.desktop "$pkgdir/usr/share/applications/$_pkgname.desktop"
  install -Dm755 ../$_appimage "$pkgdir/opt/$_pkgname/$_pkgname"
  install -Dm755 ../$_pkgname -t "$pkgdir/usr/bin"
}