summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7f3e6a5595551ac06d02b3ed91495951b5a90d01 (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
59
60
61
# Maintainer: nl6720 <nl6720@archlinux.org>
# Contributor: Jack Random <jack (@) random.to>
# Contributor: Jerome Leclanche <jerome.leclanche+arch@gmail.com>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Antonio Rojas <arojas@archlinux.org
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgbase=akonadi-git
pkgname=(akonadi-git libakonadi-git)
pkgver=24.01.75.r7.gca58c45
pkgrel=1
pkgdesc='PIM layer, which provides an asynchronous API to access all kind of PIM data'
arch=(x86_64)
url='https://invent.kde.org/pim/akonadi'
license=(LGPL)
depends=(kconfig kconfigwidgets kiconthemes kio kxmlgui)
makedepends=(git extra-cmake-modules mariadb postgresql qt6-tools boost kitemmodels kaccounts-integration)
source=("git+https://invent.kde.org/pim/akonadi.git")
sha512sums=('SKIP')

pkgver() {
	cd "${pkgname%-git}"
	git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'

}

prepare() {
	mkdir -p build
}

build() {
	cmake -B build -S "${pkgname%-git}" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=OFF
	cmake --build build
}

package_libakonadi-git() {
	pkgdesc='Libraries used by applications based on Akonadi'
	depends+=(kitemmodels kaccounts-integration)
	conflicts=("${pkgname%-git}")
	provides=("${pkgname%-git}=${pkgver}")

	DESTDIR="$pkgdir" cmake --install build
	rm -r "$pkgdir"/usr/bin # Provided by akonadi
}

package_akonadi-git() {
	depends=(libakonadi-git)
	optdepends=('mariadb: MariaDB backend'
	            'postgresql: PostgreSQL backend'
	            'postgresql-old-upgrade: upgrade from previous major PostgreSQL version using pg_upgrade'
	            'sqlite: SQLite backend')
	conflicts=("${pkgname%-git}")
	provides=("${pkgname%-git}=${pkgver}")

	DESTDIR="$pkgdir" cmake --install build
	rm -r "$pkgdir"/{etc,usr/{include,lib,share}} # Provided by libakonadi
}