Skip to content

Commit

Permalink
Update to 2.1.3 and fix for other architectures.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyne committed Dec 10, 2021
1 parent 69523f8 commit c2d4b76
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
19 changes: 11 additions & 8 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
pkgbase = gotify-server-bin
pkgdesc = A simple server for sending and receiving messages
pkgver = 2.1.0
pkgver = 2.1.3
pkgrel = 1
url = https://github.com/gotify/server
arch = x86_64
arch = i686
arch = armv7h
arch = aarch64
license = MIT
depends = glibc
provides = gotify-server
conflicts = gotify-server
backup = etc/gotify/config.yml
source = https://raw.githubusercontent.com/gotify/server/v2.1.0/config.example.yml
source = https://raw.githubusercontent.com/gotify/server/v2.1.3/config.example.yml
source = config.patch
source = tmpfiles.conf
source = sysusers.conf
Expand All @@ -21,11 +22,13 @@ pkgbase = gotify-server-bin
sha256sums = 14bd1a9270b089b99d9bbe8ebdd0c208c3f74c7347a792d508ffce75b0e1c641
sha256sums = 150a84f2f89d70c147cc3a2dbddb469f262ed2e8b6d3ffcb74eccb49dfdb2a24
sha256sums = 9aa04ff9a2981aa885d4f8df7467c4d7722aa12de7ae27376a4a11b559a0d1e2
source_x86_64 = https://github.com/gotify/server/releases/download/v2.1.0/gotify-linux-amd64.zip
sha256sums_x86_64 = 7c2bb7946580d5cc7586033e03216336b133cd57a7ad1661ab6da4915ccbdfce
source_armv7h = https://github.com/gotify/server/releases/download/v2.1.0/gotify-linux-arm-7.zip
sha256sums_armv7h = 1b56be7c8793ce359b755fb96aeb2c209df8f859027e6671b0439ec830ae7a70
source_aarch64 = https://github.com/gotify/server/releases/download/v2.1.0/gotify-linux-arm64.zip
sha256sums_aarch64 = ba9665812a0966b83f308e209ef6c808774e4ee98eced508a60b08e5b9929715
source_x86_64 = gotify-linux-amd64-2.1.3.zip::https://github.com/gotify/server/releases/download/v2.1.3/gotify-linux-amd64.zip
sha256sums_x86_64 = 94255062144505bbf48eaf23762140d2d2d34bf72d17165b8a85e52d3bf45493
source_i686 = gotify-linux-386-2.1.3.zip::https://github.com/gotify/server/releases/download/v2.1.3/gotify-linux-386.zip
sha256sums_i686 = cec96fb0189ef401a7252417008aa2889e9d51eec079f5009ed583daf5591c70
source_armv7h = gotify-linux-arm-7-2.1.3.zip::https://github.com/gotify/server/releases/download/v2.1.3/gotify-linux-arm-7.zip
sha256sums_armv7h = bb7394414379d3f09b24bfd0778431f1b71b85ff14ccdbc2505afef47c7a3d3f
source_aarch64 = gotify-linux-arm64-2.1.3.zip::https://github.com/gotify/server/releases/download/v2.1.3/gotify-linux-arm64.zip
sha256sums_aarch64 = 78e7d5495e8c6bd2348bb709903ee0e84c65788ac768a7629c10becfe3a0bd52

pkgname = gotify-server-bin
35 changes: 25 additions & 10 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Maintainer: buckket <[email protected]>

_pkgname=gotify-server
pkgname=$_pkgname-bin
pkgver=2.1.0
pkgname=${_pkgname}-bin
pkgver=2.1.3
pkgrel=1
pkgdesc='A simple server for sending and receiving messages'
arch=('x86_64' 'armv7h' 'aarch64')
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url='https://github.com/gotify/server'
depends=('glibc')
license=('MIT')
Expand All @@ -17,24 +17,39 @@ source=("https://raw.githubusercontent.com/gotify/server/v${pkgver}/config.examp
'tmpfiles.conf'
'sysusers.conf'
'gotify-server.service')
source_x86_64=("$url/releases/download/v${pkgver}/gotify-linux-amd64.zip")
source_armv7h=("$url/releases/download/v${pkgver}/gotify-linux-arm-7.zip")
source_aarch64=("$url/releases/download/v${pkgver}/gotify-linux-arm64.zip")

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=('d6f9716c7f67cfb518f3f50a18cbc950ef3e8e9c8ba1f226654dfdd3bf8226d4'
'a8a511e2b98fa548391a1602fcfa05df0e10fae6f5904cbfc4202566f2dd8265'
'14bd1a9270b089b99d9bbe8ebdd0c208c3f74c7347a792d508ffce75b0e1c641'
'150a84f2f89d70c147cc3a2dbddb469f262ed2e8b6d3ffcb74eccb49dfdb2a24'
'9aa04ff9a2981aa885d4f8df7467c4d7722aa12de7ae27376a4a11b559a0d1e2')
sha256sums_x86_64=('7c2bb7946580d5cc7586033e03216336b133cd57a7ad1661ab6da4915ccbdfce')
sha256sums_armv7h=('1b56be7c8793ce359b755fb96aeb2c209df8f859027e6671b0439ec830ae7a70')
sha256sums_aarch64=('ba9665812a0966b83f308e209ef6c808774e4ee98eced508a60b08e5b9929715')
sha256sums_x86_64=('94255062144505bbf48eaf23762140d2d2d34bf72d17165b8a85e52d3bf45493')
sha256sums_i686=('cec96fb0189ef401a7252417008aa2889e9d51eec079f5009ed583daf5591c70')
sha256sums_armv7h=('bb7394414379d3f09b24bfd0778431f1b71b85ff14ccdbc2505afef47c7a3d3f')
sha256sums_aarch64=('78e7d5495e8c6bd2348bb709903ee0e84c65788ac768a7629c10becfe3a0bd52')

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 gotify-linux-amd64 "$pkgdir/usr/bin/$_pkgname"
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"
Expand Down

0 comments on commit c2d4b76

Please sign in to comment.