aboutsummaryrefslogtreecommitdiffstats
path: root/community/okular/APKBUILD
blob: 8e1b80743e0308d68548898eb5d13311f41a8841 (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
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=okular
pkgver=20.12.1
pkgrel=1
# 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-dev $pkgname-doc $pkgname-lang $pkgname-common $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"
	mkdir -p \
		"$subpkgdir"/usr/lib/qt5 \
		"$subpkgdir"/usr/share
	mv "$pkgdir"/usr/lib/qt5/plugins "$subpkgdir"/usr/lib/qt5/
	find "$pkgdir"/usr -name "libOkular5Core.so.*" -exec mv {} "$subpkgdir"/usr/lib/ +
	mv "$pkgdir"/usr/share/okular "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/config.kcfg "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/qlogging-categories5 "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/icons "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/metainfo "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/kconf_update "$subpkgdir"/usr/share/
}

mobile() {
	depends="$pkgname-common kirigami2"
	mkdir -p "$subpkgdir"/usr/bin
	mkdir -p "$subpkgdir"/usr/lib/qt5
	mkdir -p "$subpkgdir"/usr/share/applications

	mv "$pkgdir"/usr/bin/okularkirigami "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/lib/qt5/qml "$subpkgdir"/usr/lib/qt5/
	mv "$pkgdir"/usr/share/applications/org.kde.okular.kirigami.desktop "$subpkgdir"/usr/share/applications/
	mv "$pkgdir"/usr/share/applications/org.kde.mobile* "$subpkgdir"/usr/share/applications/
}

sha512sums="6266d34b69123ed09ca0de9ce250ea7d98a576efdd6f4fc79ecf1bc0d360c8d6a2fde2700cfc9101e34ab1039ce05225d33ca5f173b5a9845ec7fb00499d658f  okular-20.12.1.tar.xz"