summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-07-27 22:36:53 +0700
committerShulhan <ms@kilabit.info>2022-07-27 22:36:53 +0700
commit9c76b237875f3097ac1149e7790afd9640ccc141 (patch)
treedfb8382425866b8605b27c013e8d87185d837cf3
parentcf3761a7ce3270bf44ad405cc10378ea49bd1d80 (diff)
downloadpakakeh.go-9c76b237875f3097ac1149e7790afd9640ccc141.tar.xz
all: add PKGBUILD for shared tools in cmd
The PKGBUILD create Arch package named share-tools. Its include command epoch, ini, and xtrk.
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore4
-rw-r--r--Makefile6
-rw-r--r--PKGBUILD46
4 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000..38870a37
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = share-tools
+ pkgdesc = Miscellaneous CLI tools: epoch, ini, xtrk
+ pkgver = 0.39.0.r30.gcf3761a
+ pkgrel = 1
+ url = https://github.com/shuLhan/share
+ arch = x86_64
+ license = BSD
+ makedepends = go
+ makedepends = git
+ provides = share-tools
+ source = share-tools::git+https://github.com/shuLhan/share.git
+ md5sums = SKIP
+
+pkgname = share-tools
diff --git a/.gitignore b/.gitignore
index a36d3ea2..38419cb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@
*.stat
*.stats
*.test
+*.zst
/_doc/*.html
/cmd/smtpcli/smtpcli
/gofmtcomment
@@ -58,3 +59,6 @@
/lib/websocket/testdata/server/server
_bin/linux-amd64
cover.*
+pkg/
+share-tools/
+src/
diff --git a/Makefile b/Makefile
index 4f2e391e..af16444e 100644
--- a/Makefile
+++ b/Makefile
@@ -64,3 +64,9 @@ clean:
distclean:
go clean -i ./...
+
+## For AUR.
+
+aur-release:
+ namcap PKGBUILD
+ makepkg --printsrcinfo > .SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000..235e8d5f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: shulhan <ms@kilabit.info>
+
+pkgname=share-tools
+pkgver=0.39.0.r30.gcf3761a
+pkgrel=1
+
+pkgdesc="Miscellaneous CLI tools: epoch, ini, xtrk"
+arch=(x86_64)
+url='https://github.com/shuLhan/share'
+license=('BSD')
+
+makedepends=(
+ 'go'
+ 'git'
+)
+
+provides=('share-tools')
+
+source=(
+ "$pkgname::git+https://github.com/shuLhan/share.git"
+)
+md5sums=(
+ 'SKIP'
+)
+
+pkgver() {
+ cd "${pkgname}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${pkgname}"
+}
+
+build() {
+ cd "${pkgname}"
+ make
+}
+
+package() {
+ cd "${pkgname}"
+ install -Dm755 _bin/linux-amd64/epoch $pkgdir/usr/bin/epoch
+ install -Dm755 _bin/linux-amd64/ini $pkgdir/usr/bin/ini
+ install -Dm755 _bin/linux-amd64/xtrk $pkgdir/usr/bin/xtrk
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}