upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / matterbridge / repos / community-x86_64 / PKGBUILD
blob00eb838166e0fda1ad9b8591ee904c098738a1a4
1 # Maintainer: Caleb Macalennan <caleb@alerque.com>
2 # Maintainer: Justin Kromlinger <hashworks@archlinux.org>
3 # Contributor: Bruno Pagani <archange@archlinux.org>
5 pkgname=matterbridge
6 pkgver=1.26.0
7 pkgrel=1
8 pkgdesc='Multi-protocols (IRC/XMPP/Mattermost/Slack/Matrix/etc) bridge'
9 arch=(x86_64)
10 url="https://github.com/42wim/$pkgname"
11 license=(Apache GPL3)
12 depends=(glibc
13          gcc-libs)
14 makedepends=(go
15              git)
16 backup=("etc/$pkgname.toml")
17 _archive="$pkgname-$pkgver"
18 source=("$url/archive/v$pkgver/$_archive.tar.gz"
19         "$_archive.tar.gz.asc::$url/releases/download/v$pkgver/v$pkgver.tar.gz.asc"
20         "$pkgname.service")
21 sha256sums=('00e1bbfe3b32f2feccf9a7f13a6f12b1ce28a5eb04cc7b922b344e3493497425'
22             'SKIP'
23             '338171f409a0e55589b86959e37871d61d21dc89cec6b212b552eaf4e516e069')
24 validpgpkeys=(CC7D978417C1AEA1E4CDD7240E41AB4BF4C610B4) # wim <wim@42.be>
26 prepare() {
27         cd "$_archive"
28         go mod vendor
31 build() {
32         cd "$_archive"
33         export CGO_CPPFLAGS="$CPPFLAGS"
34         export CGO_CFLAGS="$CFLAGS"
35         export CGO_CXXFLAGS="$CXXFLAGS"
36         # export CGO_LDFLAGS="$LDFLAGS"
37         # See https://bugs.archlinux.org/task/75560
38         export CGO_LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
39         export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external"
40         go build -tags whatsappmulti -v -o "$pkgname" .
43 package() {
44         cd "$_archive"
45         install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname"
46         install -Dm0644 -t "$pkgdir/usr/lib/systemd/system/" "../$pkgname.service"
47         install -Dm0600 matterbridge.toml.sample "$pkgdir/etc/$pkgname.toml"