# Maintainer: Rafael "Auyer" Passos _pkgname=lens _pkgdate=20211201.1 pkgname=lens-bin pkgver=5.3.2 pkgrel=1 pkgdesc='The Kubernetes IDE' arch=('x86_64') license=('MIT') url='https://k8slens.dev' depends=('libgtk-3-0' 'libxss1' 'libnss3') provides=('lens') conflicts=('lens') source=(${_pkgname}-${pkgver}.${arch}.AppImage::"https://api.k8slens.dev/binaries/Lens-${pkgver}-latest.${_pkgdate}.${arch}.AppImage" "${_pkgname}.desktop") sha256sums=('a9f102c54c6eed35928d9c48b1387e01e2f5e8c96639172160e44c3bccee006e' '09d155a8f8697dba7e718c22123c08af8b2b22605a9a1998d97ac72a9dacbe54') prepare() { chmod +x "${_pkgname}-${pkgver}.${arch}.AppImage" "./${_pkgname}-${pkgver}.${arch}.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/${_pkgname}.png \ "${pkgdir}"/usr/share/icons/hicolor/512x512/apps/open-${_pkgname}.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}/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 }