summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0ff4af4522fa78468b414c33df34c6df360351e8 (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
# Maintainer: Josip Ponjavic <josipponjavic at gmail dot com>

pkgname=bookworm-git
pkgver=1.1.2.r179.g3b1cc9d
pkgrel=1
pkgdesc='A simple user centric eBook reader which displays multiple eBooks formats uniformly'
arch=(x86_64)
url='https://babluboy.github.io/bookworm'
license=(GPL3)
depends=(granite poppler-glib python unarchiver unzip webkit2gtk python-html2text)
makedepends=(git meson vala ninja)
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=("${pkgname%-*}::git+https://github.com/babluboy/bookworm.git"
        'html2text.patch')
sha256sums=('SKIP'
            'a90f0753d54aa8f3b72816494928f8e9b72bf26fccd477adfa495e9e2c93dc42')

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

prepare() {
  cd "${pkgname%-*}"
  patch -p1 < ../html2text.patch
  mkdir build
}

build() {
  cd "${pkgname%-*}"
  meson build --prefix=/usr
  cd build
  ninja
}

package() {
  cd "${pkgname%-*}"/build
  DESTDIR="$pkgdir" ninja install
  install -m644 -D ../COPYING "$pkgdir"/usr/share/licenses/bookworm/COPYING
}