42 lines
1.0 KiB
Bash
42 lines
1.0 KiB
Bash
# Template file for 'gotify-server'
|
|
pkgname=gotify-server
|
|
version=2.2.4
|
|
revision=2
|
|
build_style=go
|
|
go_import_path="github.com/gotify/server/v2"
|
|
go_ldflags="-extldflags=-fuse-ld=bfd -X main.Version=${version}
|
|
-X main.BuildDate=${SOURCE_DATE_EPOCH} -X main.Mode=prod"
|
|
hostmakedepends="yarn packr2"
|
|
short_desc="Simple server for sending and receiving messages"
|
|
maintainer="Michal Vasilek <michal@vasilek.cz>"
|
|
license="MIT"
|
|
homepage="https://gotify.net"
|
|
distfiles="https://github.com/gotify/server/archive/v${version}.tar.gz"
|
|
checksum=e8ebbbbccafe6d6ce44270f6af5ae59223edeb7dd51e0ab2ee7e689b88072df9
|
|
conf_files="/etc/gotify/config.yml"
|
|
|
|
system_accounts="_gotify"
|
|
_gotify_homedir="/var/lib/gotify"
|
|
make_dirs="/var/lib/gotify 0750 _gotify _gotify"
|
|
|
|
post_patch() {
|
|
vsed 's,data/,/var/lib/gotify/,' -i config.example.yml
|
|
}
|
|
|
|
pre_build() {
|
|
cd ui
|
|
yarn
|
|
yarn build
|
|
|
|
cd "$wrksrc"
|
|
packr2
|
|
}
|
|
|
|
post_install() {
|
|
mv ${DESTDIR}/usr/bin/server ${DESTDIR}/usr/bin/gotify-server
|
|
vlicense LICENSE
|
|
vinstall config.example.yml 644 etc/gotify config.yml
|
|
|
|
vsv gotify-server
|
|
}
|