summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMoses Narrow2023-01-12 10:37:30 -0600
committerMoses Narrow2023-01-12 10:37:30 -0600
commitc3218c1fa975a86a0d3ae9ddd6df7c0c365162eb (patch)
tree222115849c191c830111e7ea05fbfebf062a2e13 /PKGBUILD
downloadaur-github-markdown-toc-go.tar.gz
first commit ; aDd PKGBUILD .SRCINFO
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 33 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5bb0beaed117
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Moses Narrow <moe_narrow@use.startmail.com>
+pkgname=github-markdown-toc-go
+pkgver=1.2.0
+pkgrel=1
+pkgdesc='Easy TOC creation for GitHub README.md - golang implemerntation'
+arch=('any')
+url='https://github.com/ekalinin/github-markdown-toc.go'
+makedepends=('git' 'go')
+provides=('github-markdown-toc')
+conflicts=('github-markdown-toc')
+license=('MIT')
+source=("git+${url}.git#branch=${BRANCH:-master}")
+sha1sums=('SKIP')
+
+pkgver() {
+_version=$(git ls-remote --tags --refs --sort="version:refname" ${url}.git | tail -n1)
+_version=${_version##*/}
+_version=${_version%%-*}
+_version=${_version//v/}
+echo ${_version}
+}
+
+
+build() {
+ cd "$srcdir/github-markdown-toc.go"
+ go build -race -o gh-md-toc cmd/gh-md-toc/main.go
+}
+
+package() {
+ cd "$srcdir/github-markdown-toc.go"
+ install -Dm755 gh-md-toc -t "$pkgdir/usr/bin"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+}