diff options
author | joelvaz0x01 | 2023-02-16 22:48:52 +0000 |
---|---|---|
committer | joelvaz0x01 | 2023-02-16 22:48:52 +0000 |
commit | 5beb90921a960fa094971e5e1c8f3ad25c2a3ff4 (patch) | |
tree | 22294facbc197634b0edb6dcbb3ef5ea6a0e23f2 | |
parent | 5cbd64010c69e17740c86a4290ff23704b0e3722 (diff) | |
download | aur-5beb90921a960fa094971e5e1c8f3ad25c2a3ff4.tar.gz |
PKGBUILD minimal update and update to version 2.4.3
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 50 |
2 files changed, 32 insertions, 35 deletions
@@ -1,30 +1,21 @@ pkgbase = notesnook pkgdesc = Take private notes, capture ideas, make lists & sync them anywhere - pkgver = 2.4.2 - pkgrel = 2 + pkgver = 2.4.3 + pkgrel = 1 url = https://notesnook.com/ arch = x86_64 license = GPLv3 makedepends = nvm makedepends = git - depends = c-ares - depends = ffmpeg + depends = electron21 depends = gtk3 - depends = http-parser - depends = libevent - depends = libvpx - depends = libxslt depends = libxss - depends = minizip - depends = nss - depends = re2 - depends = snappy depends = libnotify depends = libappindicator-gtk3 provides = notesnook conflicts = notesnook options = !strip - source = git+https://github.com/streetwriters/notesnook.git + source = notesnook::git+https://github.com/streetwriters/notesnook.git source = notesnook.desktop sha512sums = SKIP sha512sums = 3b321b067f3123884bd8bd15cfcaea3d9d5745f82c8ee60ece7a6606f39f0113310544f8e93244cc620f3ee97fa47cc8b62496387d553a6b6c69c9deaf48382b @@ -5,8 +5,9 @@ # Contributor: Christian Finnberg <christian@finnberg.net> pkgname=notesnook -pkgver=2.4.2 -pkgrel=2 +pkgver=2.4.3 +pkgrel=1 +_electronversion=21 pkgdesc="Take private notes, capture ideas, make lists & sync them anywhere" arch=('x86_64') url="https://notesnook.com/" @@ -14,51 +15,56 @@ license=('GPLv3') options=(!strip) provides=(${pkgname}) conflicts=(${pkgname}) -depends=('c-ares' 'ffmpeg' 'gtk3' 'http-parser' 'libevent' 'libvpx' 'libxslt' 'libxss' 'minizip' 'nss' 're2' 'snappy' 'libnotify' 'libappindicator-gtk3') +depends=("electron$_electronversion" 'gtk3' 'libxss' 'libnotify' 'libappindicator-gtk3') makedepends=('nvm' 'git') -source=(git+https://github.com/streetwriters/${pkgname}.git +source=(notesnook::git+https://github.com/streetwriters/notesnook.git ${pkgname}.desktop) sha512sums=('SKIP' '3b321b067f3123884bd8bd15cfcaea3d9d5745f82c8ee60ece7a6606f39f0113310544f8e93244cc620f3ee97fa47cc8b62496387d553a6b6c69c9deaf48382b') prepare() { - cd "${srcdir}"/${pkgname} - git checkout v${pkgver} source /usr/share/nvm/init-nvm.sh && nvm install lts/gallium } build() { + cd notesnook + git checkout tags/v${pkgver} source /usr/share/nvm/init-nvm.sh && nvm use lts/gallium --silent + electronDist=/usr/lib/electron$_electronversion + electronVer=$(electron$_electronversion --version | tail -c +2) + export npm_config_build_from_source=true + export npm_config_cache="$srcdir/npm_cache" + export ELECTRON_SKIP_BINARY_DOWNLOAD=1 # Build @notesnook/web - cd "${srcdir}"/${pkgname} npm install npm run build:web # Prepare files to pack with electron - cd apps/web/desktop && npm install - rm -rf ./build && cp -r ../build ./ && npm run build + cd apps/web/desktop + npm install + rm -rf ./build && cp -r ../build ./ + npm run build # Build with electron - npx electron-builder --publish=never --config.directories.output=release --config.artifactName=notesnook.tar.xz --linux tar.xz + npx electron-builder --linux --x64 --dir -c.electronDist=$electronDist -c.electronVersion=$electronVer --publish=never } package() { - cd "${srcdir}"/${pkgname}/apps/web/desktop - install -d "${pkgdir}"/{opt,usr/bin} - - # Extract electron build - tar -xvf release/${pkgname}.tar.xz -C "${pkgdir}"/opt + cd notesnook/apps/web/desktop + install -d "${pkgdir}"/{opt/${pkgname},usr/bin} - # Symlink - ln -s /opt/${pkgname}/${pkgname} "${pkgdir}"/usr/bin - - # Desktop file - install -Dm 644 "${srcdir}"/../${pkgname}.desktop -t "${pkgdir}"/usr/share/applications + # Copy electron build + cp -va dist/linux-unpacked/. -t "${pkgdir}/opt/${pkgname}" # Icons for i in 16 24 32 48 64 128 256 512 1024; do - install -Dm 644 "${srcdir}"/${pkgname}/apps/web/desktop/assets/icons/${i}x${i}.png \ - "${pkgdir}"/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png + install -vDm644 assets/icons/${i}x${i}.png "${pkgdir}"/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png done + + # Symlink + ln -s /opt/${pkgname}/${pkgname} "${pkgdir}/usr/bin" + + # Desktop file + install -vDm644 "${srcdir}"/${pkgname}.desktop -t "${pkgdir}"/usr/share/applications } |