summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD14
-rwxr-xr-xbump.sh2
-rwxr-xr-xinstall.sh15
5 files changed, 31 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f1cbd21c179f..730b5e032064 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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/
diff --git a/PKGBUILD b/PKGBUILD
index 7a9465cdd840..3f817e424e6a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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