summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authordatabase641282021-06-04 02:59:41 +0800
committerdatabase641282021-06-04 02:59:41 +0800
commitc88de668e871ef9685d81a5e1116794a02784daf (patch)
tree9389a2c1e3b4a8a24c12327b3dcefb676b8e1dde /PKGBUILD
downloadaur-c88de668e871ef9685d81a5e1116794a02784daf.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..b4344c8d2fa2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: database64128 <free122448@hotmail.com>
+pkgname=cubic-bot-telegram-git
+pkgver=v1.0.r30.c65f907
+pkgrel=1
+pkgdesc="A stupid and annoying chatbot for your group chats"
+arch=(x86_64)
+url="https://github.com/database64128/CubicBot"
+license=('GPL3')
+makedepends=('git' 'dotnet-sdk>=5.0.0')
+provides=("cubic-bot-telegram")
+conflicts=("cubic-bot-telegram")
+options=(!strip)
+source=("$pkgname::git+$url.git")
+b2sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+ dotnet publish CubicBot.Telegram -c Release \
+ -p:DefineConstants=PACKAGED \
+ -p:PublishReadyToRun=true \
+ -p:PublishSingleFile=true \
+ -p:PublishTrimmed=true \
+ -p:TrimMode=link \
+ -p:DebuggerSupport=false \
+ -p:EnableUnsafeBinaryFormatterSerialization=false \
+ -p:EnableUnsafeUTF7Encoding=false \
+ -p:InvariantGlobalization=true \
+ -r linux-x64 --self-contained
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ install -Dm755 CubicBot.Telegram/bin/Release/net5.0/linux-x64/publish/cubic-bot-telegram $pkgdir/usr/bin/cubic-bot-telegram
+ install -Dm644 systemd/user/cubic-bot-telegram.service $pkgdir/usr/lib/systemd/user/cubic-bot-telegram.service
+}