archrelease: copy trunk to community-any
[ArchLinux/community.git] / coolreader / trunk / PKGBUILD
blobf5b83682274a954d9ac22e5b822105082272ed33
1 # Maintainer: Balló György <ballogyor+arch at gmail dot com>
2 # Contributor: Ivan Naumeiko <Ivan.Naumeiko  AT gmail DOT com>
4 pkgname=coolreader
5 pkgver=3.2.59
6 pkgrel=5
7 pkgdesc='Fast and small XML/CSS based eBook reader'
8 arch=('x86_64')
9 url='https://github.com/buggins/coolreader'
10 license=('GPL2')
11 depends=('fribidi' 'hicolor-icon-theme' 'libunibreak' 'qt5-base')
12 makedepends=('cmake' 'ninja' 'qt5-tools')
13 source=("https://github.com/buggins/coolreader/archive/cr$pkgver/$pkgname-$pkgver.tar.gz"
14         'cr3.appdata.xml')
15 sha256sums=('54253ce3da8f3575d7e64f0afd3d2e9d369ca4e785584cfad4462eead1b8f51e'
16             '9d868cfd61b686b5a398797819367f16d7a65f1f5420441fb34c8d39236f7382')
18 prepare() {
19   sed -i 's|src/desktop/cr3.png DESTINATION share/pixmaps|src/desktop/cr3.png DESTINATION share/icons/hicolor/32x32/apps|
20           s|src/desktop/cr3.xpm DESTINATION share/pixmaps|src/icons/cr3.png DESTINATION share/icons/hicolor/48x48/apps|' $pkgname-cr$pkgver/cr3qt/CMakeLists.txt
23 build() {
24   cmake -S $pkgname-cr$pkgver -B build -G Ninja \
25     -DCMAKE_INSTALL_PREFIX='/usr' \
26     -DGUI=QT5 \
27     -DMAX_IMAGE_SCALE_MUL=2 \
28     -DDOC_DATA_COMPRESSION_LEVEL=3 \
29     -DDOC_BUFFER_SIZE=0x140000
30   cmake --build build
33 package() {
34   DESTDIR="$pkgdir" cmake --install build
35   install -Dm644 cr3.appdata.xml "$pkgdir/usr/share/metainfo/cr3.appdata.xml"