aboutsummaryrefslogtreecommitdiffstats
path: root/community/okular/APKBUILD
blob: 9ad92a58d2507d6581e04b56d166f7ee447fc961 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=okular
pkgver=20.12.3
pkgrel=0
# armhf blocked by extra-cmake-modules
# s390x blocked by ebook-tools
arch="all !armhf !s390x !mips64"
url="https://kde.org/applications/office/org.kde.okular"
pkgdesc="A universal document viewer"
license="GPL-2.0-or-later AND LGPL-2.0-or-later"
depends="$pkgname-common"
makedepends="
	discount-dev
	djvulibre-dev
	ebook-tools-dev
	extra-cmake-modules
	kactivities-dev
	karchive-dev
	kbookmarks-dev
	kcompletion-dev
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	kdegraphics-mobipocket-dev
	kdoctools-dev
	kiconthemes-dev
	kio-dev
	kirigami2-dev
	kjs-dev
	kparts-dev
	kpty-dev
	kwallet-dev
	kwindowsystem-dev
	libkexiv2-dev
	libspectre-dev
	phonon-dev
	poppler-qt5-dev
	purpose-dev
	qca-dev
	qt5-qtbase-dev
	qt5-qtspeech-dev
	threadweaver-dev
	zlib-dev
	"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/okular-$pkgver.tar.xz"
subpackages="
	$pkgname-common
	$pkgname-common-qml:common_qml
	$pkgname-dev
	$pkgname-doc
	$pkgname-lang
	$pkgname-mobile
	"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DOKULAR_UI=both
	cmake --build build
}

check() {
	cd build

	# All other tests are broken, require OpenGL, etc
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -R "^shelltest"
}

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

common() {
	pkgdesc="Common files for okular and okular-mobile"
	amove usr/lib/qt5/plugins
	find "$pkgdir"/usr -name "libOkular5Core.so.*" -exec mv {} "$subpkgdir"/usr/lib/ +
	amove usr/share/okular
	amove usr/share/config.kcfg
	amove usr/share/qlogging-categories5
	amove usr/share/icons
	amove usr/share/metainfo
	amove usr/share/kconf_update
}

common_qml() {
	pkgdesc="Common qml files for okular-mobile and other packages"
	depends="kirigami2"

	amove usr/lib/qt5/qml
}

mobile() {
	depends="$pkgname-common $pkgname-common-qml kirigami2"

	amove usr/bin/okularkirigami
	amove usr/share/applications/org.kde.okular.kirigami.desktop
	amove usr/share/applications/org.kde.mobile*
}

sha512sums="f64eca81bdbd163b2780037026c330259d5dd7fed7a175b06601742bc6b98c25f26463d72764e5b77878b3c36df4f4657d4cd5349f389786a45df1a5fa9cda45  okular-20.12.3.tar.xz"