summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorNarrat2024-02-20 23:01:37 +0100
committerNarrat2024-02-20 23:01:37 +0100
commitb30526acbbcc9b98fbcbc0a48bf9edd6e1463247 (patch)
treead6d85015b216b1e6cf5f8b3cb3dfbc40a994133 /PKGBUILD
parentd237113173d6afd4e3f2f1133db9cc7a7b9319a8 (diff)
downloadaur-prosody-filer.tar.gz
prosody-filer: update to 1.0.3
Build from tarball (dunno if that is really a benefit as I needed to add a patch which avoids using git to get the version string). Update GOFLAGS
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 16 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 572097c33017..e949e62c76db 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,36 +2,36 @@
# Contributor: Silvio Ankermann < silvio at booq dot org >
pkgname=prosody-filer
-pkgver=1.0.2
-pkgrel=4
-pkgdesc='Golang mod_http_upload_external server for Prosody and Ejabberd'
+pkgver=1.0.3
+pkgrel=1
url='https://github.com/ThomasLeister/prosody-filer'
license=('MIT')
+pkgdesc='Golang mod_http_upload_external server for Prosody and Ejabberd'
arch=('i686' 'x86_64')
-makedepends=(go git)
+makedepends=(go)
backup=("etc/prosody-filer.toml")
install=prosody-filer.install
-source=("git+https://github.com/ThomasLeister/${pkgname}.git#tag=v${pkgver}"
- "prosody-filer.service")
-sha256sums=('SKIP'
+source=(${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz
+ 0001_non-git-version.patch
+ prosody-filer.service)
+sha256sums=('577e2a5c5ed1043a360ff291bb280bda346769f635d55d4e607e93bd9036afe5'
+ '8091470335cba3a1560c0241cef92c14426121e21ffee9830e77acbe02a20739'
'3f64c61eb4bd0d801c8a24d4bf3eae1e04c82ade000d363081d0d673eaaabe9f')
+
prepare() {
- cd "${pkgname}"
- if [ ! -e go.mod ]; then
- go mod init "${url#https://}"
- go mod tidy
- fi
+ cd "${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/0001_non-git-version.patch"
}
build() {
- cd "${pkgname}"
- export GOFLAGS="-trimpath"
+ cd "${pkgname}-${pkgver}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
./build.sh
}
package() {
- install -D -m755 ${pkgname}/prosody-filer "${pkgdir}/usr/bin/prosody-filer"
- install -D -m644 ${pkgname}/config.example.toml "${pkgdir}/etc/prosody-filer.toml"
+ install -D -m755 ${pkgname}-${pkgver}/prosody-filer "${pkgdir}/usr/bin/prosody-filer"
+ install -D -m644 ${pkgname}-${pkgver}/config.example.toml "${pkgdir}/etc/prosody-filer.toml"
install -D -m644 prosody-filer.service "${pkgdir}/usr/lib/systemd/system/prosody-filer.service"
}