40 lines
1.4 KiB
Bash
40 lines
1.4 KiB
Bash
# simple PKGBUILD for packaging locally
|
|
pkgname=telegramAlert
|
|
pkgver=0.0.0
|
|
pkgrel=0
|
|
pkgdesc="Server that listens for alerts and forwards them to a telegram user"
|
|
arch=(x86_64 i686 armv5 armv6h armv7h aarch64)
|
|
license=("MIT")
|
|
backup=(
|
|
etc/$pkgname/$pkgname.env #Don't overwrite config file
|
|
)
|
|
depends=()
|
|
makedepends=("go")
|
|
source=(
|
|
'main.go'
|
|
'go.mod'
|
|
'telegramAlert.env'
|
|
'telegramAlert.service'
|
|
'telegramAlert.sysusers'
|
|
'LICENSE'
|
|
)
|
|
sha256sums=(
|
|
'f2d19e3b2ed8244d2f539a4d9485961b5ed0fb14a29c3094387cc97124e5b571' #main.go
|
|
'6d215015f4084363c15c7710b406f7981d759913b88a22060e8c8ad95a3eb18a' #go.mod
|
|
'8ab2d17885a3dee972db1e74d9371cb9b35cc47fbb8c2d25968a46f3dc351002' #telegramAlert.env
|
|
'6aedcf80266e272b54cf8385bf4fa9f125ab8aadc92ad1775207e55521226c7b' #telegramAlert.service
|
|
'13db81008358f744fe84ca20a1f27e46dd11614ff847976a3aa2c95672cf2e02' #telegramAlert.sysusers
|
|
'5dd6c227cb4a3821fd8d0ddea2b84ceb50f370b121f5e9fbd0986325948aaa78' #LICENSE
|
|
)
|
|
|
|
build() {
|
|
go build -trimpath
|
|
}
|
|
package() {
|
|
install -D -m555 "$pkgname" "$pkgdir/usr/bin/$pkgname"
|
|
install -D -m644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
|
install -D -m644 "$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
|
|
install -D -m600 "$pkgname.env" "$pkgdir/etc/$pkgname/$pkgname.env"
|
|
install -D -m644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|