diff options
author | zxp19821005 | 2023-09-03 09:00:16 +0800 |
---|---|---|
committer | zxp19821005 | 2023-09-03 09:00:16 +0800 |
commit | 285dbebd85add0cf8ae1f27ce4e9117031f18906 (patch) | |
tree | 2457c250779ed678bea962af3f759d230ce59272 | |
download | aur-285dbebd85add0cf8ae1f27ce4e9117031f18906.tar.gz |
update to 2.6.1
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | leafview.sh | 8 |
3 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9f80d41b5898 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = leafview-bin + pkgdesc = A minimalist image viewer based on Leaflet.js and Electron. + pkgver = 2.6.1 + pkgrel = 1 + url = https://github.com/sprout2000/leafview + arch = x86_64 + license = MIT + depends = bash + depends = electron26 + depends = hicolor-icon-theme + provides = leafview=2.6.1 + conflicts = leafview + source = leafview-2.6.1.deb::https://github.com/sprout2000/leafview/releases/download/v2.6.1/LeafView-2.6.1-linux-amd64.deb + source = LICENSE::https://raw.githubusercontent.com/sprout2000/leafview/v2.6.1/LICENSE.md + source = leafview.sh + sha256sums = 1c7079c2513345d22e94610b878527114a8a5cacf8ed708bf3246b384cf7544a + sha256sums = f172a0a7953ce3cda2b0cb38f6a3d28e7dfa9824a8c62de981520af32b9c138f + sha256sums = f656dd4bcac72e33542483aeefaaea49d7fca6fcdf3ff0333081a35602c7568d + +pkgname = leafview-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..84665f613747 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=leafview-bin +_pkgname=LeafView +pkgver=2.6.1 +pkgrel=1 +pkgdesc="A minimalist image viewer based on Leaflet.js and Electron." +arch=("x86_64") +url="https://github.com/sprout2000/leafview" +license=('MIT') +provides=("${pkgname%-bin}=${pkgver}") +conflicts=("${pkgname%-bin}") +depends=('bash' 'electron26' 'hicolor-icon-theme') +source=("${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-linux-amd64.deb" + "LICENSE::https://raw.githubusercontent.com/sprout2000/leafview/v${pkgver}/LICENSE.md" + "${pkgname%-bin}.sh") +sha256sums=('1c7079c2513345d22e94610b878527114a8a5cacf8ed708bf3246b384cf7544a' + 'f172a0a7953ce3cda2b0cb38f6a3d28e7dfa9824a8c62de981520af32b9c138f' + 'f656dd4bcac72e33542483aeefaaea49d7fca6fcdf3ff0333081a35602c7568d') +prepare() { + bsdtar -xf "${srcdir}/data.tar.xz" + sed "s|/opt/${_pkgname}/${pkgname%-bin} %U|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.asar" + install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" + for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do + install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \ + -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps" + done + install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" +}
\ No newline at end of file diff --git a/leafview.sh b/leafview.sh new file mode 100644 index 000000000000..0b612c3ca9a1 --- /dev/null +++ b/leafview.sh @@ -0,0 +1,8 @@ +#!/bin/bash +_ELECTRON=/usr/bin/electron26 +_ASAR="/opt/leafview/leafview.asar" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec ${_ELECTRON} ${_ASAR} "$@" +else + exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" +fi
\ No newline at end of file |