aboutsummaryrefslogblamecommitdiffstats
path: root/community/okular/APKBUILD
blob: 5628b9e1ba9a72976f2e324aeab95923c10b920d (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                  
              
        
                                      
                                                    

                                                  


                                                        
                         

































                                  
                       
                                                                                          







                                      

         
                        
                                         

                                             
                                
                           


         
                
 




                                                                   
                                               

 

                                                           
                                 
                                                                                          












                                                                       

 
          
                                                               
 


                                                                    

 
            
                                                                                                                                                       
 
# 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
"