aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Shick2020-11-02 17:25:58 -0500
committerDan Shick2020-11-02 17:27:14 -0500
commit3b179907531d642d112427155ab076dcb5f80a44 (patch)
tree95aa692ac68898a2ab4a2fc98463ae3a8e839065
downloadaur-3b179907531d642d112427155ab076dcb5f80a44.tar.gz
Add Senpai IRC client to Arch AUR
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD44
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..deee6b943303
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = senpai-irc-git
+ pkgdesc = TUI IRC Client Created by ~taiite
+ pkgver = r132.a370adb
+ pkgrel = 1
+ url = https://ellidri.org/senpai/
+ arch = x86_64
+ license = ISC
+ makedepends = git
+ makedepends = go
+ provides = senpai-irc
+ conflicts = senpai-irc
+ source = senpai-irc::git+https://git.sr.ht/~taiite/senpai
+ sha512sums = SKIP
+
+pkgname = senpai-irc-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..79b6df984b80
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Dan Shick <dan.shick@gmail.com>
+
+pkgname=senpai-irc-git
+_pkgname=senpai-irc
+pkgver=r132.a370adb
+pkgrel=1
+pkgdesc='TUI IRC Client Created by ~taiite'
+url=https://ellidri.org/senpai/
+arch=(x86_64)
+license=('ISC')
+provides=("senpai-irc")
+conflicts=("senpai-irc")
+makedepends=('git' 'go')
+source=(
+ "${_pkgname}::git+https://git.sr.ht/~taiite/senpai"
+)
+sha512sums=('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)"
+ )
+}
+
+build () {
+ cd "${srcdir}/${_pkgname}"
+ rm -rf build
+ mkdir build
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -o build "./cmd/irc"
+}
+
+package () {
+ mkdir -p "${pkgdir}/usr/bin"
+ cp "${srcdir}/${_pkgname}/build/irc" "${pkgdir}/usr/bin/senpai-irc"
+}
+