summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom "Ravi" Hale2018-11-04 13:52:38 +0700
committerTom "Ravi" Hale2023-06-29 09:40:08 +0700
commit33c2f252ca190d047359748f8b2f56714aeacbdf (patch)
tree15c6e4373f3780e65695adcff389c872ec85b4bd
parentdf8a312c18c29a6e70ac178e5049d5808b5ee25d (diff)
downloadaur-33c2f252ca190d047359748f8b2f56714aeacbdf.tar.gz
Generate pkgver from download directory
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD27
2 files changed, 27 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a172a57ea6e9..e30aea3ab272 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,26 @@
-pkgbase = nixnote2-appimage-bin
+pkgbase = nixnote2-release-bin
pkgdesc = Evernote clone (formerly Nevernote) - latest binary release
- pkgver = 2.1.0.beta4j
+ pkgver = 2.1.0.beta4
pkgrel = 1
url = https://github.com/robert7/nixnote2
arch = x86_64
license = GPL3
makedepends = git
+ depends = bash
+ depends = hicolor-icon-theme
depends = zlib
- provides = nixnote=2.1.0.beta4j
- provides = nixnote2=2.1.0.beta4j
+ provides = nixnote=2.1.0.beta4
+ provides = nixnote2=2.1.0.beta4
+ conflicts = nixnote2-git
replaces = nevernote
replaces = nixnote
replaces = nixnote-beta
- source = nixnote2.AppImage::https://github.com/robert7/nixnote2/releases/download/continuous/NixNote2-x86_64.AppImage
+ source = https://github.com/robert7/nixnote2//releases/download/v2.1.0-beta4/NixNote2-x86_64.AppImage
+ source = nixnote2
+ source = nixnote2.desktop.patch
sha256sums = SKIP
+ sha256sums = 5d73ed58f17b5c360a0068808cb74580f9bf2d9ce959bb6300b63f5f837ac818
+ sha256sums = 4f12cddc49e0c694f41e344acebc0d8a3bce07a3496098eb2fae258ba9044967
-pkgname = nixnote2-appimage-bin
+pkgname = nixnote2-release-bin
diff --git a/PKGBUILD b/PKGBUILD
index 2083237d5eca..8c782fc59194 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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 .