aboutsummaryrefslogtreecommitdiffstats
path: root/community/okular/APKBUILD
blob: 5628b9e1ba9a72976f2e324aeab95923c10b920d (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
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
106
107
108
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=okular
pkgver=21.12.1
pkgrel=0
# armhf blocked by extra-cmake-modules
# s390x, mips64 and riscv64 blocked by polkit -> kio
# ppc64le blocked by qt5-qtwebengine -> purpose
arch="all !armhf !s390x !mips64 !riscv64 !ppc64le"
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="
14ddf38910703bf3bda4a78769f7f6328163d84a6c4336fa120aee0957fc10ed6abde42c875f59c90adb9e09c6421f8cc19712833a5ca9a14ad932ea6e18a730  okular-21.12.1.tar.xz
"