diff options
author | zenekron | 2021-08-17 08:35:13 +0200 |
---|---|---|
committer | zenekron | 2021-08-17 08:43:32 +0200 |
commit | 8c6ffaf052f1b5798d4e68886fd2f3b4c81ae895 (patch) | |
tree | 603898031c7b7c1fcb180f1a4c2416144ba61d8d | |
parent | a3561ecc289667654c5867dccff84eaa48b35f56 (diff) | |
download | aur-konsole-dracula-git.tar.gz |
fix missing pkgver() function and bump .SRCINFO on commit
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rwxr-xr-x | bump.sh | 2 | ||||
-rwxr-xr-x | install.sh | 15 |
5 files changed, 31 insertions, 14 deletions
@@ -1,16 +1,15 @@ pkgbase = konsole-dracula-git pkgdesc = Dracula theme for konsole - pkgver = 1 - pkgrel = 2 + pkgver = r16.fa85573 + pkgrel = 1 url = https://draculatheme.com/konsole/ arch = any license = MIT makedepends = git - depends = konsole + optdepends = konsole provides = konsole-dracula conflicts = konsole-dracula source = konsole-dracula-git::git+https://github.com/dracula/konsole md5sums = SKIP pkgname = konsole-dracula-git - diff --git a/.gitignore b/.gitignore index c5006dfce351..130bb638fef5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ -* -!/PKGBUILD -!/.SRCINFO -!/.gitignore -!/bump.sh +*.zst +konsole-dracula-git/ @@ -1,18 +1,26 @@ # Maintainer: zenekron <zenekron@gmail.com> pkgname=konsole-dracula-git -pkgver=1 -pkgrel=2 +pkgver=r16.fa85573 +pkgrel=1 pkgdesc="Dracula theme for konsole" arch=("any") url="https://draculatheme.com/konsole/" license=("MIT") -depends=("konsole") makedepends=("git") +optdepends=("konsole") provides=("konsole-dracula") conflicts=("konsole-dracula") source=("$pkgname::git+https://github.com/dracula/konsole") md5sums=("SKIP") +pkgver() { + cd "$pkgname" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + package() { cd "$srcdir/$pkgname" install -Dm 644 "Dracula.colorscheme" "$pkgdir/usr/share/konsole/Dracula.colorscheme" diff --git a/bump.sh b/bump.sh deleted file mode 100755 index 6deb2828f8d3..000000000000 --- a/bump.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -makepkg --printsrcinfo > .SRCINFO diff --git a/install.sh b/install.sh new file mode 100755 index 000000000000..2e80458aac04 --- /dev/null +++ b/install.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +set -e + +# pre-commit +cat > ./.git/hooks/pre-commit <<EOF +#!/bin/sh +set -e + +# make sure the package builds +makepkg --syncdeps --clean --force + +# bump .SRCINFO +makepkg --printsrcinfo > ".SRCINFO" && git add ".SRCINFO" +EOF +chmod +x ./.git/hooks/pre-commit |