quaternion-0.0.9.4.recipe revision b1d4b5ee
1SUMMARY="A Qt5-based IM client for Matrix"
2DESCRIPTION="Quaternion is a cross-platform Qt5-based desktop IM client for Matrix, \
3a reference desktop application using libQMatrixClient."
4HOMEPAGE="https://github.com/QMatrixClient/Quaternion/"
5COPYRIGHT="2017-2019 QMatrixClient team"
6LICENSE="GNU GPL v3
7	GNU LGPL v2.1
8	"
9REVISION="1"
10SOURCE_URI="https://github.com/QMatrixClient/Quaternion/archive/$portVersion-beta2.tar.gz"
11CHECKSUM_SHA256="b0175d3cb521805da391255615e97f1d755c865bb14c878af5246c1091cb7bad"
12SOURCE_FILENAME="Quaternion-$portVersion-beta2.tar.gz"
13SOURCE_DIR="Quaternion-$portVersion-beta2"
14libVersion="0.5.0.2"
15SOURCE_URI_2="https://github.com/QMatrixClient/libqmatrixclient/archive/$libVersion.tar.gz"
16CHECKSUM_SHA256_2="dcd5cc1e6f01812bed1e234021eda0d73bfec5271e63fe0f7132a63296e3701c"
17SOURCE_FILENAME_2="libqmatrixclient-$libVersion.tar.gz"
18SOURCE_DIR_2="libqmatrixclient-$libVersion"
19
20PATCHES="quaternion-$portVersion.patchset"
21ADDITIONAL_FILES="quaternion.rdef.in"
22
23ARCHITECTURES="!x86_gcc2 x86 x86_64"
24SECONDARY_ARCHITECTURES="x86"
25
26PROVIDES="
27	quaternion$secondaryArchSuffix = $portVersion
28	app:Quaternion$secondaryArchSuffix = $portVersion
29	"
30REQUIRES="
31	haiku$secondaryArchSuffix
32	lib:libGL$secondaryArchSuffix
33	lib:libQt5Core$secondaryArchSuffix
34	lib:libQt5Gui$secondaryArchSuffix
35	lib:libQt5Network$secondaryArchSuffix
36	lib:libQt5Widgets$secondaryArchSuffix
37	lib:libQt5Xml$secondaryArchSuffix
38	lib:libz$secondaryArchSuffix
39	"
40
41BUILD_REQUIRES="
42	haiku${secondaryArchSuffix}_devel
43	devel:libQt5Core$secondaryArchSuffix
44	devel:libQt5Gui$secondaryArchSuffix
45	devel:libQt5Network$secondaryArchSuffix
46	devel:libQt5Widgets$secondaryArchSuffix
47	devel:libQt5Xml$secondaryArchSuffix
48	devel:libz$secondaryArchSuffix
49	"
50BUILD_PREREQUIRES="
51	cmd:g++$secondaryArchSuffix
52	cmd:cmake
53	cmd:lrelease$secondaryArchSuffix >= 5
54	cmd:make
55	"
56
57BUILD()
58{
59	rm -rf lib
60	ln -sfn $sourceDir2 lib
61	mkdir -p build
62	cd build
63	cmake .. -DCMAKE_BUILD_TYPE=Release \
64		-DCMAKE_INSTALL_PREFIX=$appsDir/Quaternion
65	make $jobArgs
66}
67
68INSTALL()
69{
70	mkdir -p $appsDir/Quaternion/translations
71	cp build/quaternion $appsDir/Quaternion/Quaternion
72	cp build/*.qm $appsDir/Quaternion/translations
73
74	local APP_SIGNATURE="application/x-vnd.quaternion"
75	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
76	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
77	local MINOR="`echo "$portVersion" | cut -d. -f3`"
78	sed \
79		-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
80		-e "s|@MAJOR@|$MAJOR|" \
81		-e "s|@MIDDLE@|$MIDDLE|" \
82		-e "s|@MINOR@|$MINOR|" \
83		-e "s|@LONG_INFO@|$LONG_INFO|" \
84		$portDir/additional-files/quaternion.rdef.in > quaternion.rdef
85
86	addResourcesToBinaries quaternion.rdef $appsDir/Quaternion/Quaternion
87	addAppDeskbarSymlink $appsDir/Quaternion/Quaternion
88}
89