diff options
-rw-r--r-- | PKGBUILD | 17 | ||||
-rwxr-xr-x | update.sh | 36 |
2 files changed, 12 insertions, 41 deletions
@@ -1,21 +1,28 @@ # Maintainer: Anty0 <anty150 at gmail dot com> + +# Helper variables for updaurpkg (https://aur.archlinux.org/packages/updaurpkg-git) +_nextcloud_appname='checksum' +_upstreamver='v1.1.1' +_upstreamver_regex='^v[0-9]+\.[0-9]+\.[0-9]+$' +_source_type='github-releases' +_repo='westberliner/checksum' + + pkgdesc='Plugin for Nextcloud to create hashes of files' pkgname=('nextcloud-app-checksum') -_appname='checksum' -pkgver='1.1.1' +pkgver="${_upstreamver:1}" pkgrel=1 arch=('any') license=('GPL3') -_repo="westberliner/checksum" url="https://github.com/${_repo}" makedepends=() depends=('nextcloud') options=('!strip') -source=("${_appname}-v${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${_appname}.tar.gz") +source=("${_nextcloud_appname}-v${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${_nextcloud_appname}.tar.gz") sha512sums=('919e8d6a40264372513229fdd3f227c9c1c75c536c427c60af537817a816b3feb13eb5c48c3663f4582f33d9d33587b940b313e74afab6d49ec5dd406889d881') 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};" |