summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiří Kuchyňka (Anty)2021-03-03 20:47:10 +0100
committerJiří Kuchyňka (Anty)2021-03-03 20:47:10 +0100
commit200f21b97012166a11c430d39aca0bf512380925 (patch)
treef84f003db6e631843455c872b8bbf1828936acb1
parent410a7e0d7d67ce6792a5fe8c2978aa8696cda353 (diff)
downloadaur-200f21b97012166a11c430d39aca0bf512380925.tar.gz
add updaurpkg update checking helper;
-rw-r--r--PKGBUILD17
-rwxr-xr-xupdate.sh36
2 files changed, 12 insertions, 41 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f1b1a516d518..99f659c865fd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,28 @@
# Maintainer: Anty0 <anty150 at gmail dot com>
+
+# Helper variables for updaurpkg (https://aur.archlinux.org/packages/updaurpkg-git)
+_nextcloud_appname='integration_dropbox'
+_upstreamver='v0.0.18'
+_upstreamver_regex='^v[0-9]+\.[0-9]+\.[0-9]+$'
+_source_type='github-releases'
+_repo='eneiluj/integration_dropbox'
+
+
pkgdesc='Dropbox integration into Nextcloud'
pkgname=('nextcloud-app-integration-dropbox')
-_appname='integration_dropbox'
-pkgver='0.0.18'
+pkgver="${_upstreamver:1}"
pkgrel=1
arch=('any')
license=('AGPL3')
-_repo="eneiluj/integration_dropbox"
url="https://github.com/${_repo}"
makedepends=()
depends=('nextcloud')
options=('!strip')
-source=("${_appname}-v${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${_appname}-${pkgver}.tar.gz")
+source=("${_nextcloud_appname}-v${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${_nextcloud_appname}-${pkgver}.tar.gz")
sha512sums=('025c3fb49046569a79a56b53a5933ec109015fc224b406846fb8b793531cfc79bdf9def11d67e61eb0fabbd45de2ed3ce03f5f0d67e56fa716b4e017201eef80')
package() {
install -d "${pkgdir}/usr/share/webapps/nextcloud/apps"
- cp -a "${srcdir}/${_appname}" "${pkgdir}/usr/share/webapps/nextcloud/apps/${_appname}"
+ cp -a "${srcdir}/${_nextcloud_appname}" "${pkgdir}/usr/share/webapps/nextcloud/apps/${_nextcloud_appname}"
}
diff --git a/update.sh b/update.sh
deleted file mode 100755
index 71479f11658a..000000000000
--- a/update.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-set -e
-
-SCRIPT_DIR="$(dirname "$0")"
-cd "$SCRIPT_DIR"
-
-source ./PKGBUILD
-
-#VERSION="$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${_repo}/tags" 2>/dev/null | jq -r '.[0].name')"
-#VERSION="$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${_repo}/releases/latest" 2>/dev/null | jq -r '.tag_name')"
-#VERSION="$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${_repo}/tags" 2>/dev/null | jq -r '.[0].name' | cut -c 2-)"
-VERSION="$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${_repo}/releases/latest" 2>/dev/null | jq -r '.tag_name' | cut -c 2-)"
-
-if [ "${pkgver}" = "${VERSION}" ]; then
- echo "${pkgname}: No updates"
- exit
-fi
-
-echo "${pkgname}: ${pkgver} -> ${VERSION}"
-
-if [ "$1" = "--check" ]; then
- exit
-fi
-
-# Update
-sed -i -e "s/^pkgver=.*\$/pkgver='${VERSION}'/" -e "s/^pkgrel=.*\$/pkgrel=1/" PKGBUILD
-updpkgsums
-makepkg --printsrcinfo > .SRCINFO
-
-# Build and install
-makepkg -sicr
-
-# Commit
-git add .
-git commit -m "update to ${VERSION};"