summaryrefslogtreecommitdiff
path: root/user/quaternion/APKBUILD
blob: 370e689005a3d5df8cdf0128d42124023c295435 (plain) (blame)
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
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=quaternion
pkgver=0.0.5
_libver=0.2
pkgrel=0
pkgdesc="Qt5-based Matrix chat client"
url="https://matrix.org/docs/projects/client/quaternion.html"
arch="all"
license="GPL-3.0"
makedepends="cmake qt5-qtbase-dev qt5-qtdeclarative-dev"
subpackages=""
source="quaternion-$pkgver.tar.gz::https://github.com/QMatrixClient/Quaternion/archive/v$pkgver.tar.gz
	libqmatrixclient-$_libver.tar.gz::https://github.com/QMatrixClient/libqmatrixclient/archive/v0.2-q0.0.5.tar.gz
	install-library.patch
	"
builddir="$srcdir/Quaternion-$pkgver"

unpack() {
	default_unpack
	mv "$srcdir"/libqmatrixclient-$_libver-q$pkgver/* "$builddir"/lib/
}

build() {
	cd "$builddir"
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS}
	make
}

check() {
	cd "$builddir"
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	for i in "$builddir" "$builddir"/lib; do
		cd $i
		make DESTDIR="$pkgdir" install
	done
}

sha512sums="ec4a6196ff687d08de49f47141a7869e8d0c56eee142a70682bd9880eb5ae8fb96c38616eec0d61b250a3f0a4cf358debeaa7c001f8dc88c58367bd0d125cb93  quaternion-0.0.5.tar.gz
3065793171ee60b5bc325756b9c82a57db0e4993b608d080ed6f54e9c55a835a594cf519681aede3063d0126c6f778ac885ab301569d25970aa22b7aa85bdadb  libqmatrixclient-0.2.tar.gz
a814970d408bf43706c20f01a39b1503c5054efc5e8c36aadae36fd7a028e9ed286c79b846d960ca0c4791be463a5aa33ecf7a09d5dd6e87268af79b791fe58d  install-library.patch"