summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: a7bd00d63b3ad95e383199207088242a51e53d73 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (Arch): Jiachen Yang <farseerfc@gmail.com>
# Maintainer (AUR): Vlad M. <vlad@archlinux.net>
# Contributor (Arch): Håvard Pettersson <mail@haavard.me>
# Contributor (Arch): Kevin MacMartin <prurigro at gmail dot com>

# # I maintain this because:
# Artix version uses emoticons
# Artix version uses incorrect repo
# Artix version uses incorrect gpg fingerprints

pkgname=qtox
_pkgname=qTox
pkgver=1.17.2
pkgrel=1
_gitver='8eed684c37bd711de2ca4bd863f5f0509edcdc2d'
pkgdesc='Powerful Tox client written in C++/Qt that follows the Tox design guidelines'
arch=('x86_64' 'aarch64')
url='https://github.com/qTox/qTox'
license=('GPL3')
depends=('desktop-file-utils'
         'libxss'
         'openal'
         'ffmpeg'
         'qrencode'
         'qt5-svg'
         'sqlcipher'
         'libexif'
         'toxcore'
         'libgl')
makedepends=('qt5-tools' 'check' 'cmake' 'mesa' 'libglvnd')

source=( 
        "$pkgname-$pkgver.tar.lz::https://github.com/$_pkgname/$_pkgname/releases/download/v$pkgver/v$pkgver.tar.lz"
        "$pkgname-$pkgver.tar.lz.asc::https://github.com/$_pkgname/$_pkgname/releases/download/v$pkgver/v$pkgver.tar.lz.asc"
        )
b2sums=('80c9c7d94a904a26b31ff14ae027e8d3cce169a5714a8b8d5ca5f4655060c44561700834f14f32b7c22415ff2dd6a5a047d48c0ec2d3fbf7af1599861cf103cc'
        'SKIP')

validpgpkeys=('DA262CC93C0E1E525AD21C8596775D454B8EBF44'  # - sudden6 <sudden6@gmx.at>
              '31039166FA902CA50D05D6085AF9F2E29107C727'  # - Diadlo
              '2880C860D95C909D3DA45C687E086DD661263264'  # - tux3
              '7EB339FE881747E701B7D472EBE36E66A8429B99'  # - AnthonyBilinski
              'CA9221C5389B7C50AA5F779352A50775BE13DF17'  # - noavarice
              '141C880E8BA25B198D0F850F7C132143C1A3A7D4'  # – tox-user
             )

prepare() {
  # disable -Werror for release packaging
  sed -e 's|-Werror||' -i CMakeLists.txt
}

build() {
  mkdir -p build
  cd build
  export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4 -fPIE"
  export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4 -fPIE"
  export LDFLAGS="$LDFLAGS,-pie"
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
           -DGIT_VERSION=$_gitver \
           -DGIT_DESCRIBE=v$pkgver \
           -DSMILEYS=DISABLED
  make
}

check() {
  cd build
  make test
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}