diff options
author | database64128 | 2023-03-16 19:09:22 +0800 |
---|---|---|
committer | database64128 | 2023-03-16 19:09:22 +0800 |
commit | af9eebe8f7c3987e1103cd2dc2b7df7e322b6ba0 (patch) | |
tree | 211ff0260c89a01b0041d0fe2539c065cbc5d62b | |
download | aur-af9eebe8f7c3987e1103cd2dc2b7df7e322b6ba0.tar.gz |
🌸 Initial commit
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3c5e9127404f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = cubic-rce-bot-git + pkgdesc = Execute commands on a remote host via a Telegram bot + pkgver = 1.0.0.r0.g820c2d7 + pkgrel = 1 + url = https://github.com/database64128/cubic-rce-bot + arch = x86_64 + arch = aarch64 + license = AGPL3 + makedepends = git + makedepends = go + provides = cubic-rce-bot + conflicts = cubic-rce-bot + backup = etc/cubic-rce-bot/config.json + source = cubic-rce-bot-git::git+https://github.com/database64128/cubic-rce-bot.git + b2sums = SKIP + +pkgname = cubic-rce-bot-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..fd252351de42 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg/ +src/ +cubic-rce-bot-git/ +*.tar.zst diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cc6dca68388f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: database64128 <free122448@hotmail.com> + +_pkgname=cubic-rce-bot +pkgname=$_pkgname-git +pkgver=1.0.0.r0.g820c2d7 +pkgrel=1 +pkgdesc="Execute commands on a remote host via a Telegram bot" +arch=('x86_64' 'aarch64') +url="https://github.com/database64128/$_pkgname" +license=('AGPL3') +makedepends=('git' 'go') +provides=("$_pkgname") +conflicts=("$_pkgname") +backup=("etc/$_pkgname/config.json") +source=("$pkgname::git+$url.git") +b2sums=('SKIP') + +pkgver() { + cd $pkgname + git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd $pkgname + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath" + go build -ldflags='-s -w -linkmode=external' ./cmd/$_pkgname +} + +package() { + cd $pkgname + install -Dm644 docs/$_pkgname.service "$pkgdir"/usr/lib/systemd/system/$_pkgname.service + install -Dm644 docs/$_pkgname@.service "$pkgdir"/usr/lib/systemd/system/$_pkgname@.service + install -d "$pkgdir"/etc/$_pkgname + install -Dm644 docs/config.json "$pkgdir"/etc/$_pkgname/config.json + install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname +} |