summaryrefslogtreecommitdiff
path: root/openlens-bin/PKGBUILD
blob: 1e8271f4f107339747b433d7b6efa1e983c24911 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: beliys <aur at bil dot co dot ua>
# based on lens-bin

_pkgname=OpenLens
pkgname=openlens-bin
pkgver=6.5.2
pkgrel=98
pkgdesc='The Kubernetes IDE (fork lens-bin without lenscloud-lens-extension). Read more - https://github.com/lensapp/lens/issues/5444'
arch=('x86_64' 'aarch64')
license=('MIT')
url='https://k8slens.dev'
_pinned_dependencies=(
  'gcc-libs=14.2.1+r134+gab884fffe3fc'
  'glibc>=2.37'
  'libasound.so=2'
  'libatk-1.0.so=0'
  'libatk-bridge-2.0.so=0'
  'libatspi.so=0'
  'libcairo.so=2'
  'libcups=2:2.4.11'
  'libdbus-1.so=3'
  'libdrm=2.4.123'
  'libexpat.so=1'
  'libgio-2.0.so=0'
  'libglib-2.0.so=0'
  'libgobject-2.0.so=0'
  'libgtk-3.so=0'
  'libpango-1.0.so=0'
  'libx11=1.8.10'
  'libxcb=1.17.0'
  'libxcomposite=0.4.6'
  'libxdamage=1.1.6'
  'libxext=1.3.6'
  'libxfixes=6.0.1'
  'libxkbcommon.so=0'
  'libxrandr=1.5.4'
  'mesa=1:24.2.6'
  'nspr=4.36'
  'nss=3.106'
)
depends=('gtk3' 'libxss' 'nss' "${_pinned_dependencies[@]}")
provides=('lens')
conflicts=('lens' 'lens-bin')
source=("${_pkgname}.desktop")
source_x86_64=(${_pkgname}-${pkgver}-x86_64.AppImage::"https://github.com/beliys/OpenLens/releases/download/v${pkgver}/${_pkgname}-${pkgver}.x86_64.AppImage")
source_aarch64=(${_pkgname}-${pkgver}-aarch64.AppImage::"https://github.com/beliys/OpenLens/releases/download/v${pkgver}/${_pkgname}-${pkgver}.arm64.AppImage")
sha256sums=('30ab2e9f91ca6be993b5893fb385a225c6d06f6d11caa305e0d109348b5d132c')
sha256sums_x86_64=('1af3e53480705c6349523b16481fc5b62e94734a91ff5b72c2154582d8a91dcb')
sha256sums_aarch64=('8275b73d6eae7b91afebd6d4ba278e28ea5bb554d9e556eace7d767a7c85c0f8')

prepare() {
  chmod +x "${_pkgname}-${pkgver}-${CARCH}.AppImage"
  "./${_pkgname}-${pkgver}-${CARCH}.AppImage" --appimage-extract
}

package() {
  # move the entire distribution to /usr/share
  mkdir -p "${pkgdir}"/usr/share/${_pkgname}
  mv "${srcdir}"/squashfs-root/* \
    "${pkgdir}"/usr/share/${_pkgname}

  # icon
  install -Dm 644 "${pkgdir}"/usr/share/${_pkgname}/usr/share/icons/hicolor/512x512/apps/open-lens.png \
    "${pkgdir}"/usr/share/icons/hicolor/512x512/apps/open-lens.png

  # desktop file
  install -Dm 644 "${srcdir}"/${_pkgname}.desktop \
    "${pkgdir}"/usr/share/applications/${_pkgname}.desktop

  # symlink binary
  mkdir -p "${pkgdir}"/usr/bin
  ln -sf /usr/share/${_pkgname}/open-lens \
    "${pkgdir}"/usr/bin/open-lens

  # clean and fix permissions
  find "${pkgdir}" -type d -exec chmod 755 {} \;
  chmod -x "${pkgdir}"/usr/share/${_pkgname}/*.so
  rm -rf "${pkgdir}"/usr/share/${_pkgname}/AppRun
  rm -rf "${pkgdir}"/usr/share/${_pkgname}/lens.{desktop,png}
  rm -rf "${pkgdir}"/usr/share/${_pkgname}/usr
  rm -rf "${pkgdir}"/usr/share/${_pkgname}/resources/extensions/*/dist/*-arm64
}