summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMurad Bashirov2021-05-12 00:32:22 +0400
committerMurad Bashirov2021-05-12 00:32:22 +0400
commitd584cbeb78d8d41535fe909a93fe10e7bce90c7e (patch)
treee8d8f4c0d68750c18ea6bc6c1bd3d8352bec4f89 /PKGBUILD
downloadaur-d584cbeb78d8d41535fe909a93fe10e7bce90c7e.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f0f2ea92d134
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Murad Bashirov <carlsonmu@protonmail.com>
+
+pkgname=koneko-git
+_pkgname=koneko
+pkgver=17.88e2d6c
+pkgrel=1
+license=('MIT')
+pkgdesc='Koneko is a TUI Client for nyaa.si'
+depends=("glibc")
+makedepends=("git" "go")
+arch=("x86_64")
+url="https://github.com/irevenko/koneko"
+source=("${_pkgname}::git+${url}.git")
+sha256sums=('SKIP')
+provides=("koneko")
+
+# https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver()_function
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ version=$(printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
+ echo "${version:1}"
+}
+
+build() {
+ export GOPATH="${srcdir}/go"
+
+ cd "${srcdir}/${_pkgname}"
+ go mod vendor
+ go build
+ # clean now to ensure makepkg --clean works
+ go clean -modcache
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}"
+ install -Dm755 -t "${pkgdir}/usr/bin" ./koneko
+
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ./LICENSE
+ install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" ./README.md
+}