summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c125128a926935d53141ebabdb85e024d1497c2e (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
# Maintainer: hrdl <git@hrdl.eu>
# Contributor: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Philipp Kühn <p dot kuehn at posteo dot de>
# Contributor: Krut Patel <kroot.patel@gmail.com>

pkgname=sioyek-git
pkgver=2.0.0.r945.gb5e6f50
pkgrel=1
pkgdesc="PDF viewer for research papers and technical books."
arch=(x86_64)
license=(GPL3)
url="https://github.com/ahrm/sioyek"
depends=(libmupdf qt6-speech qt6-declarative qt6-svg)
optdepends=(qt6-wayland)
makedepends=(git qt6-3d)
provides=(sioyek)
conflicts=(sioyek)
source=("git+https://github.com/ahrm/sioyek.git#branch=development"
        "standard-path-mupdf-build.patch")
sha256sums=('SKIP'
            '3f781450b34cf06bb3d9f5499c197f8be1fb6b9d25a77f98b03a226149a096c1')

pkgver() {
  cd "sioyek"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "sioyek"

  patch --forward --strip=1 --input="${srcdir}/standard-path-mupdf-build.patch"
  sed -i 's/<C-S-o>$/<C-S-O>/' pdf_viewer/keys.config
}

build() {
  cd sioyek
  qmake6 "CONFIG+=linux_app_image" pdf_viewer_build_config.pro
  make
}

package() {
  cd "sioyek"
  make INSTALL_ROOT="${pkgdir}/" install
  install -D tutorial.pdf -t "${pkgdir}/usr/share/sioyek"
  install -Dm644 -t "${pkgdir}/etc/sioyek" pdf_viewer/keys.config pdf_viewer/prefs.config
  install -Dm644 -t "${pkgdir}/usr/share/man/man1" resources/sioyek.1
  install -d "${pkgdir}/usr/share/sioyek/shaders"
  cp -r pdf_viewer/shaders/* "${pkgdir}/usr/share/sioyek/shaders"
}