blob: a485ad3f1b761b5471911502239b0ad064592dc5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Maintainer: buckket <felix@buckket.org>
_pkgname=gotify-server
pkgname=${_pkgname}-bin
pkgver=2.6.1
pkgrel=1
pkgdesc='A simple server for sending and receiving messages'
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url='https://github.com/gotify/server'
depends=('glibc')
license=('MIT')
provides=('gotify-server')
conflicts=('gotify-server')
backup=('etc/gotify/config.yml')
source=("https://raw.githubusercontent.com/gotify/server/v${pkgver}/config.example.yml"
'config.patch'
'tmpfiles.conf'
'sysusers.conf'
'gotify-server.service')
declare -xA _arches
_arches['x86_64']=amd64
_arches['i686']=386
_arches['armv7h']=arm-7
_arches['aarch64']=arm64
# Add sources for the supported architectures.
for key in "${!_arches[@]}"
do
declare -n source_x="source_${key}"
source_x=("gotify-linux-${_arches[$key]}-${pkgver}.zip::$url/releases/download/v${pkgver}/gotify-linux-${_arches[$key]}.zip")
done
sha256sums=('2fa745496bf234879d18b417f10911ac145be5ed13a5379e38e2b50a650f5fc0'
'c251cc61b80968f606df9f9840519456fa5ba5f35ced44f73fda49059ed650b6'
'e09a6bcb2bbc1d8d28ec21c86cef260a42a93650b13bd82f59cfc0e3838a3c66'
'150a84f2f89d70c147cc3a2dbddb469f262ed2e8b6d3ffcb74eccb49dfdb2a24'
'9aa04ff9a2981aa885d4f8df7467c4d7722aa12de7ae27376a4a11b559a0d1e2')
sha256sums_x86_64=('77c90e271011d0a9f9024b0f869d0e044d886593639b5884050de0073739fab3')
sha256sums_i686=('c16993051294701a71933859b1b4512e9095d95edbf1bce43e69115f6f08353b')
sha256sums_armv7h=('43f300ae5985f2520a91b437925141a925356fa3074f075d4e9b7fe9fdfffd1b')
sha256sums_aarch64=('1e333b1b2bdb7d9c7c128819331132d023808352684129e43d2d338368a848b7')
prepare() {
patch --follow-symlinks --forward -o "$srcdir/config.yml" config.example.yml config.patch
}
# The _arches associative array is not visible inside package(). I don't know
# why. If someone does, please post a solution in the comments.
_exe_name=gotify-linux-${_arches[$CARCH]}
package() {
install -Dm755 "${_exe_name}" "$pkgdir/usr/bin/$_pkgname"
install -Dm644 "$srcdir/config.yml" "$pkgdir/etc/gotify/config.yml"
install -Dm644 gotify-server.service "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
install -Dm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf"
install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
}
|