summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7feca7b9046fe5e0fc0c95cb61b3de8e3d7ba899 (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
#!/bin/bash
# shellcheck disable=SC2034,SC2164
# Maintainer: Alexandre Bouvier <contact@amb.tf>
# Contributor: Pierre Choffet <peuc@wanadoo.fr>
_pkgname=ring-kde
pkgname=$_pkgname-git
pkgver=2.0.0.r651.g82a6286b
pkgrel=1
pkgdesc="The KDE client for the Ring communication framework (www.ring.cx)"
arch=('x86_64')
url="https://ring.cx/"
license=('GPL')
groups=('ring')
depends=('libringqt' 'knotifyconfig' 'kdeclarative' 'kirigami2')
makedepends=('git' 'extra-cmake-modules' 'kdoctools')
provides=("$_pkgname")
conflicts=("$_pkgname")
changelog="ChangeLog"
source=('git://anongit.kde.org/ring-kde.git')
md5sums=('SKIP')

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

prepare() {
	mkdir -p build
	# fix missing tray icon
	sed -i 's/setIconByPixmap(.*);/setIconByName("ring-kde");/' \
		"$_pkgname"/src/widgets/systray.cpp
}

build() {
	cd build
	cmake ../"$_pkgname" \
		-DCMAKE_INSTALL_PREFIX="$(qtpaths --install-prefix)" \
		-DCMAKE_BUILD_TYPE=Release
	make
}

package() {
	cd build
	# shellcheck disable=SC2154
	make DESTDIR="$pkgdir" install
}