makedeb


viper-browser-appimage 1-1


Viper Browser - A powerful yet lightweight web browser built with the Qt framework - Appimage version

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for viper-browser-appimage.

# Maintainer: Giovanni Ivan Alberotanza <ivan81@disroot.org>
pkgname=viper-browser-appimage
_pkgname=Viper_Browser
provides=('viper-browser')
conflicts=('viper-browser')
pkgver=1
pkgrel=1
pkgdesc="Viper Browser - A powerful yet lightweight web browser built with the Qt framework - Appimage version"
arch=('x86_64')
license=('MIT')
depends=('fuse2fs')
options=(!strip)
url="https://github.com/LeFroid/Viper-Browser"
_filename="${_pkgname}-${pkgver}-x86_64.AppImage"

source=(
  ${url}/releases/download/continuous/${_pkgname}-${pkgver}-x86_64.AppImage
  https://raw.githubusercontent.com/LeFroid/Viper-Browser/master/LICENSE
)
sha512sums=(
  SKIP
  SKIP
)


package() {
    chmod +x $_filename
    mkdir -p squashfs-root/usr/share/icons/hicolor/64x64/apps
    ./$_filename --appimage-extract "viper-browser.png" > /dev/null 2>&1
    ./$_filename --appimage-extract viper-browser.desktop > /dev/null 2>&1
    INSTALL_PATH="/opt/appimages/Viper_Browser.AppImage"
    sed -i -E "s|Exec=viper-browser %u|Exec=env APPIMAGELAUNCHER_DISABLE=true QT_QPA_PLATFORM=xcb ${INSTALL_PATH}|" squashfs-root/viper-browser.desktop

    # install icons
    install -dm755 "$pkgdir/usr/share/icons"
    cp -dpr --no-preserve=ownership "squashfs-root/usr/share/icons" "$pkgdir/usr/share"
    chmod -R 755 "$pkgdir/usr/share/icons"
    find "$pkgdir/usr/share/icons" -type f -name "viper-browser.png" -exec chmod 644 {} \;

    # install .desktop file and image file
    install -Dm644 "squashfs-root/viper-browser.desktop" "$pkgdir/usr/share/applications/viper-browser.desktop"
    install -Dm755 "$_filename" "$pkgdir$INSTALL_PATH"

    # install license file
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/viper-browser-appimage/LICENSE"

    # disable AppImage integration prompt
    # https://github.com/electron-userland/electron-builder/issues/1962
    install -dm755 "$pkgdir/usr/share/appimagekit"
    touch "$pkgdir/usr/share/appimagekit/no_desktopintegration"
    chmod 644 "$pkgdir/usr/share/appimagekit/no_desktopintegration"
}