summaryrefslogtreecommitdiff
path: root/pcr/qtox-git/PKGBUILD
blob: 9df6d8221d276345a2ae20798b7f5b6c9b9c2d44 (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 (Arch): Håvard Pettersson <mail@haavard.me>
# Contributor (Arch): Kevin MacMartin <prurigro at gmail dot com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_pkgname=qtox
pkgname=qtox-git
pkgver=1.2.r96.g698144c
pkgrel=1
pkgdesc='Powerful Tox client written in C++/Qt that follows the Tox design guidelines.'
arch=('i686' 'x86_64')
url='https://github.com/tux3/qTox'
license=('GPL3')
depends=('desktop-file-utils'
         'libfilteraudio-git'
         'libxkbcommon-x11'
         'libxss'
         'openal'
         'opencv'
         'qrencode'
         'qt5-svg'
         'sqlcipher'
         'toxcore')
makedepends=('git' 'qt5-tools')
provides=("$_pkgname")
conflicts=("$_pkgname")
install=$pkgname.install
source=("$_pkgname::git+https://github.com/tux3/qTox.git")
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $_pkgname
  install -d build
  cd build
  qmake-qt5 ENABLE_SYSTRAY_UNITY_BACKEND=NO ..
  make
}

package() {
  # executable
  cd $_pkgname
  install -Dm755 build/$_pkgname "$pkgdir/usr/bin/$_pkgname"

  # xdg desktop file
  install -Dm644 qTox.desktop "$pkgdir/usr/share/applications/qTox.desktop"

  # icons
  cd img/icons
  for _icon in *.png; do
    _size=$(sed 's|^[^-]*-||;s|\.png||' <<< "$_icon")
    install -Dm644 "$_icon" "$pkgdir/usr/share/icons/hicolor/$_size/apps/$_pkgname.png"
  done
  install -Dm644 $_pkgname.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$_pkgname.svg"
}