summaryrefslogtreecommitdiff
path: root/libre/purple-matrix/PKGBUILD
blob: aaabd0ab3246a120bcf266e7748003c7e89aa3c5 (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
58
# Maintainer (aur): Olivia Mackintosh <livvy@base.nu>
# Contributor: Bryce Chidester <bryce@cobryce.com>
# Contributor: bill-auger <bill-auger@programmer.net>


# parabola changes and rationale:
# - in [libre] for pbot


pkgname=purple-matrix
pkgver=20210210
_gitrev=2fcd5b8f901034980616e5f719750c48f37a332f
pkgrel=2
pkgdesc="Libpurple protocol plugin for matrix."
arch=(armv7h ui686 x86_64)
url="https://github.com/matrix-org/purple-matrix"
license=('GPL2')
depends=('libpurple' 'http-parser' 'glib2' 'json-glib')
depends+=('libgcrypt' 'libolm')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/matrix-org/${pkgname}/archive/${_gitrev}.tar.gz)
sha256sums=('80a41992c6cb3bae3248af463e9b1a051e9553664ecba2d38ad1f193932e92d3')


source+=(matrix-segfault.patch
matrix-chat.patch
cloudflare.patch)
sha256sums+=('df440e7432e6dcce4afa176d3f4ae7c1725acae56614d944d2ec8dee9522a3d5'
            '0f4d8894108a0cb25187fc7c7dc135918e76898cb84bd32101c90ef966d858d7'
            'feb89040589f7d984cf5941f7a98578594a00551dceb2c3ce2a3833e8faf8202')


prepare()
{
  cd "${srcdir}"/${pkgname}-${_gitrev}

  echo "applying matrix-segfault.patch"
  patch -Np1 < "${srcdir}"/matrix-segfault.patch
  echo "applying matrix-chat.patch"
  patch -Np1 < "${srcdir}"/matrix-chat.patch
  echo "applying cloudflare.patch"
  patch -Np1 < "${srcdir}"/cloudflare.patch
}


build()
{
  cd "${srcdir}"/${pkgname}-${_gitrev}

  export CPPFLAGS="$CPPFLAGS -O2"
  make
}

package()
{
  cd "${srcdir}"/${pkgname}-${_gitrev}

  make DESTDIR="${pkgdir}" install
}