aboutsummaryrefslogtreecommitdiffstats
path: root/community/kdb/APKBUILD
blob: cb9a57382db896632ca406de4e4aeb4bb9dd0fac (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdb
pkgver=3.2.0
pkgrel=0
pkgdesc="Database connectivity and creation framework for various database vendors"
url="http://community.kde.org/KDb"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="LGPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	icu-dev
	kcoreaddons-dev
	mariadb-dev
	postgresql-dev
	python3
	qt5-qtbase-dev
	qt5-qttools-dev
	sqlite-dev
	"
subpackages="$pkgname-dev $pkgname-lang $pkgname-sqlite $pkgname-mysql $pkgname-postgresql"
source="https://download.kde.org/stable/kdb/src/kdb-$pkgver.tar.xz
	0001-fix-build-with-newer-qt.patch
	0002-fix-build-with-postgresql-12+.patch
	"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DPYTHON_EXECUTABLE=/usr/bin/python3
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sqlite() {
	pkgdesc="$pkgdesc (sqlite driver)"

	amove \
		usr/lib/qt5/plugins/kdb3/kdb_sqlitedriver.so \
		usr/lib/qt5/plugins/kdb3/sqlite3/kdb_sqlite_icu.so \
		usr/bin/kdb3_sqlite3_dump
}

mysql() {
	pkgdesc="$pkgdesc (mysql driver)"

	amove usr/lib/qt5/plugins/kdb3/kdb_mysqldriver.so
}

postgresql() {
	pkgdesc="$pkgdesc (postgresql driver)"

	amove usr/lib/qt5/plugins/kdb3/kdb_postgresqldriver.so
}

sha512sums="7df22f2c5b6e20ae3de71cb6c76b234d2f1f33b2abcdffa85be313c63d067a40a85ed102b6256207315db08ced5d69f8bc40afdf84a188463713a6b2ffdb2df7  kdb-3.2.0.tar.xz
7fc18bd99d45ed6f874d7aceff271d6262bae550340b243414026c1683837a27b6e261a992a187f4fbebfdf5ac5fd67400528b6d1b3b9c33abb35fe4237989bf  0001-fix-build-with-newer-qt.patch
c7d6fe068bf1dfd206d96e1214595d7001ce03cc591837bbb1e500d440178d95eedb3f07d2fe4a5d9c07fcfe6dad0ee5e0a74ede5ecca4e09572dea1ca35110b  0002-fix-build-with-postgresql-12+.patch"