diff options
author | zxp19821005 | 2024-04-18 09:32:00 +0800 |
---|---|---|
committer | zxp19821005 | 2024-04-18 09:32:00 +0800 |
commit | c3836ba44255024574cf3b56461caee84dcd7cac (patch) | |
tree | 9617534b8239428c715be34f862a33db5c65ffae | |
parent | 52db7513b287fb15bf3b5143f2849ec94d648cbf (diff) | |
download | aur-evernote-for-linux-bin.tar.gz |
fix errors
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | evernote-for-linux-bin.install | 23 | ||||
-rw-r--r-- | evernote-for-linux.sh | 16 | ||||
-rwxr-xr-x | prepare.sh | 4 |
5 files changed, 77 insertions, 62 deletions
@@ -1,22 +1,24 @@ pkgbase = evernote-for-linux-bin pkgdesc = Official Evernote client for Windows repackaged for Linux pkgver = 10.60.4 - pkgrel = 1 + pkgrel = 2 url = https://github.com/search5/Evernote-for-Linux - install = evernote-for-linux-bin.install arch = x86_64 - license = custom - depends = libnotify - depends = libappindicator-gtk3 - depends = libxtst - depends = nss - depends = attr - optdepends = gnome-keyring: for credentials persistence after reboot - provides = evernote - conflicts = evernote-beta-bin - conflicts = evernote-bin - noextract = evernote-client_10.60.4-stable_amd64.deb - source = https://github.com/search5/Evernote-for-Linux/releases/download/v10.60.4-linux-ddl-ga-stable/evernote-client_10.60.4-stable_amd64.deb + license = LicenseRef-custom + depends = electron19 + depends = libsecret + depends = perl + depends = nodejs + provides = evernote=10.60.4 + conflicts = evernote-for-linux + conflicts = evernote + options = !strip + options = !emptydirs + source = evernote-for-linux-10.60.4.deb::https://github.com/search5/Evernote-for-Linux/releases/download/v10.60.4-linux-ddl-ga-stable/evernote-client_10.60.4-stable_amd64.deb + source = LICENSE + source = evernote-for-linux.sh sha256sums = 6465469e3ac3cfeb1ecb3de9b3168713ec2469bf944dfa4d375779e63c2f7476 + sha256sums = c88a6b5dfa7faad1e21de4ad78241ef441f6e3d688da2df560f52f3772336978 + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 pkgname = evernote-for-linux-bin @@ -1,30 +1,54 @@ -# Maintainer: Alexander Jacocks <alexander@redhat.com> +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +# Contributor: Alexander Jacocks <alexander@redhat.com> # Contributor: Konrad Malik (https://konradmalik.github.io/) - -pkgname=evernote-for-linux-bin +_pkgname=evernote +pkgname="${_pkgname}-for-linux-bin" +_appname="${_pkgname}-client" pkgver=10.60.4 -buildver=stable -_archivename="evernote-client_${pkgver}-${buildver}_amd64.deb" -pkgrel=1 +_electronversion=19 +pkgrel=2 pkgdesc="Official Evernote client for Windows repackaged for Linux" arch=('x86_64') url="https://github.com/search5/Evernote-for-Linux" -license=('custom') -provides=('evernote') +license=('LicenseRef-custom') +provides=("${_pkgname}=${pkgver}") +conflicts=( + "${pkgname%-bin}" + "${_pkgname}" +) depends=( - 'libnotify' 'libappindicator-gtk3' 'libxtst' 'nss' 'attr' + "electron${_electronversion}" + 'libsecret' + 'perl' + 'nodejs' +) +options=( + '!strip' + '!emptydirs' ) -optdepends=('gnome-keyring: for credentials persistence after reboot') -conflicts=("evernote-beta-bin" "evernote-bin") -replaces=() -install=$pkgname.install source=( - "https://github.com/search5/Evernote-for-Linux/releases/download/v${pkgver}-linux-ddl-ga-${buildver}/${_archivename}" - ) -noextract=("${_archivename}") -sha256sums=('6465469e3ac3cfeb1ecb3de9b3168713ec2469bf944dfa4d375779e63c2f7476') - -package() { - # extract only data - bsdtar -O -xf "${_archivename}" data.tar.xz | bsdtar -C "${pkgdir}" -xJf - + "${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}-linux-ddl-ga-stable/${_appname}_${pkgver}-stable_amd64.deb" + "LICENSE" + "${pkgname%-bin}.sh" +) +sha256sums=('6465469e3ac3cfeb1ecb3de9b3168713ec2469bf944dfa4d375779e63c2f7476' + 'c88a6b5dfa7faad1e21de4ad78241ef441f6e3d688da2df560f52f3772336978' + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') +build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@runname@|app|g" \ + -e "s|@options@||g" \ + -i "${srcdir}/${pkgname%-bin}.sh" + bsdtar -xf "${srcdir}/data."* + sed "s|process.resourcesPath|\"\/usr\/lib\/${pkgname%-bin}\"|g" -i "${srcdir}/usr/lib/${_appname}/resources/app/main.js" + sed "s|${_appname}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${_appname}.desktop" } +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}" + cp -r "${srcdir}/usr/lib/${_appname}/resources/"{app,static} "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/usr/share/pixmaps/${_appname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png" + install -Dm644 "${srcdir}/usr/share/applications/${_appname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop" + install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" +}
\ No newline at end of file diff --git a/evernote-for-linux-bin.install b/evernote-for-linux-bin.install deleted file mode 100644 index 5a37ec3a5ae8..000000000000 --- a/evernote-for-linux-bin.install +++ /dev/null @@ -1,23 +0,0 @@ -## arg 1: the new package version -post_install() { - update-mime-database /usr/share/mime || true - update-desktop-database /usr/share/applications || true -} - -## arg 1: the new package version -## arg 2: the old package version -pre_upgrade() { - post_remove $2 -} - -## arg 1: the new package version -## arg 2: the old package version -post_upgrade() { - post_install $1 -} - -## arg 1: the old package version -post_remove() { - # Delete the link to the binary - rm -f '/usr/bin/evernote-client' -} diff --git a/evernote-for-linux.sh b/evernote-for-linux.sh new file mode 100644 index 000000000000..7ddcaab8d734 --- /dev/null +++ b/evernote-for-linux.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +_APPDIR="/usr/lib/@appname@" +_RUNNAME="${_APPDIR}/@runname@" +_OPTIONS="@options@" +export PATH="${_APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +export ELECTRON_IS_DEV=0 +export ELECTRON_FORCE_IS_PACKAGED=true +export NODE_ENV=production +cd "${_APPDIR}" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +else + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? +fi
\ No newline at end of file diff --git a/prepare.sh b/prepare.sh deleted file mode 100755 index 99b9d943ba18..000000000000 --- a/prepare.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -e - -makepkg --printsrcinfo > .SRCINFO |