diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -1,29 +1,26 @@ # Maintainer: Tom Hale <tom[noodle]hale[point]ee> _pkgname=nixnote2 -pkgname=${_pkgname}-latest-bin -pkgver=2.1.0.beta5a +pkgname=${_pkgname}-release-bin +pkgver=2.1.0.beta4 pkgrel=1 pkgdesc='Evernote clone (formerly Nevernote) - latest binary release' url="https://github.com/robert7/$_pkgname" arch=(x86_64) license=(GPL3) -depends=(hicolor-icon-theme) +depends=(bash hicolor-icon-theme zlib) makedepends=(git) conflicts=(nixnote2-git) provides=("nixnote=${pkgver%.r*}" "$_pkgname=${pkgver%.r*}") replaces=(nevernote nixnote nixnote-beta) _appimage_path=$(curl -s 'https://github.com/robert7/nixnote2/releases' | - sed -En 's|.*(/releases/download/v[^"]+[Aa]pp[Ii]mage)".*|\1|p' | + sed -En 's:.*(/releases/download/v[^"/]+/[^"/]+[Aa]pp[Ii]mage)".*:\1:p' | head -n1) -echo XXX Using latest AppImage # XXX -_appimage_path='/releases/download/continuous-develop/NixNote2-x86_64.AppImage' source=("$url/$_appimage_path" nixnote2 nixnote2.desktop.patch) -# https://github.com/robert7/nixnote2/releases/tag/continuous-develop sha256sums=(SKIP - 3731377af54d7b98af271e5d2e1bdbc50ae82f07e445597aff89b6c2769faa31 + 5d73ed58f17b5c360a0068808cb74580f9bf2d9ce959bb6300b63f5f837ac818 4f12cddc49e0c694f41e344acebc0d8a3bce07a3496098eb2fae258ba9044967) OPTIONS=(!strip) # Stripping an AppImage makes it non-functional @@ -39,9 +36,9 @@ _extract_dirs=(usr/share/applications usr/share/nixnote2/help usr/share/nixnote2/translations) + prepare() { _appimage=${_appimage_path##*/} # basename of AppImage - yelp _appimage=$_appimage chmod 755 "$_appimage" # Due to this issue, all --appimage-extract target directories must already exist @@ -56,20 +53,24 @@ prepare() { # Directories are extracted with no permissions for group and other. Fix: find squashfs-root -type d -exec chmod go+rx -- {} + + + # Have the .desktop point explicitly at the icon + patch -d squashfs-root/usr/share/applications < nixnote2.desktop.patch } -# pkg/nixnote2-latest-bin/usr/share/icons/hicolor/48x48/apps/nixnote2.png pkgver() { - sed 's/-/./g' < squashfs-root/usr/share/nixnote2/version.txt + [[ $_appimage_path =~ /releases/download/v([^/]+).* ]] + local version=${BASH_REMATCH[1]} + version=${version//-/.} + echo "$version" } + package() { cd "$pkgdir" _appimage=${_appimage_path##*/} # basename of AppImage - yelp _appimage=$_appimage -yelp $PWD # User resources cp -pr "$srcdir"/squashfs-root/usr . |