summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTonkku2020-03-15 20:12:23 +0200
committerTonkku2020-03-15 20:12:23 +0200
commit620833a45aa4402b6173104ed41df4af0ac948ed (patch)
tree47315d7a6a11f80285dba8fabbeaf1394b340f84
downloadaur-620833a45aa4402b6173104ed41df4af0ac948ed.tar.gz
Initial version 1.8.0-1
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD36
3 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a5324b6228e4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = authy-snap
+ pkgdesc = Two factor authentication desktop application
+ pkgver = 1.8.0
+ pkgrel = 1
+ url = https://authy.com/
+ arch = x86_64
+ license = ISC
+ makedepends = squashfs-tools
+ depends = nss
+ depends = gtk3
+ depends = libxss
+ depends = libdbusmenu-glib
+ provides = authy
+ source = https://api.snapcraft.io/api/v1/snaps/download/H8ZpNgIoPyvmkgxOWw5MSzsXK1wRZiHn_1.snap
+ sha256sums = 6189c2439fbddae802b1f7f86132ffdeeed6f8e911108c41cd353ef1a70858d9
+
+pkgname = authy-snap
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..eec7f6a68c26
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src/
+pkg/
+*.pkg.tar.zst
+*.snap
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3ce1bd42e284
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Tonkku <contact@tonkku.me>
+
+pkgname=authy-snap
+pkgver=1.8.0
+pkgrel=1
+pkgdesc="Two factor authentication desktop application"
+arch=('x86_64')
+url='https://authy.com/'
+provides=('authy')
+license=('ISC') # According to the authy(AUR) package...
+depends=('nss' 'gtk3' 'libxss' 'libdbusmenu-glib')
+optdepends=()
+makedepends=('squashfs-tools')
+_snapid="H8ZpNgIoPyvmkgxOWw5MSzsXK1wRZiHn"
+_snaprev="1"
+source=("https://api.snapcraft.io/api/v1/snaps/download/${_snapid}_${_snaprev}.snap")
+sha256sums=('6189c2439fbddae802b1f7f86132ffdeeed6f8e911108c41cd353ef1a70858d9')
+
+prepare() {
+ echo "Extracting snap file..."
+ unsquashfs -q -f -d "${srcdir}/authy" "${_snapid}_${_snaprev}.snap"
+}
+
+package() {
+ # Install files
+ install -d "${pkgdir}/opt/${pkgname}"
+ cp -r "${srcdir}/authy/." "${pkgdir}/opt/${pkgname}"
+
+ # Desktop Entry
+ sed -i "s/\${SNAP}/\/opt\/${pkgname}/" "${pkgdir}/opt/${pkgname}/meta/gui/authy.desktop"
+ install -Dm644 "${pkgdir}/opt/${pkgname}/meta/gui/authy.desktop" -t "${pkgdir}/usr/share/applications"
+
+ # Symlink binary to /usr/bin
+ install -d "${pkgdir}/usr/bin"
+ ln -s "/opt/${pkgname}/authy" "${pkgdir}/usr/bin"
+}