summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fc4dc65df5e7c71fbb68f81b226d1dce8f2a54da (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: Hauke Stieler <mail@hauke-stieler.d>

pkgname=wiki2book
pkgver=0.1.1
pkgrel=1
pkgdesc="Wiki2book is a CLI tool to convert one or multiple Wikipedia articles into an eBook."
arch=("any")
url="https://github.com/hauke96/wiki2book"
license=("GPL-3.0")
depends=("pandoc" "imagemagick")
optdepends=("ttf-dejavu: Font used in the default style")
makedepends=("go>=1.20")
backup=()
conflicts=()
provides=("wiki2book=${pkgver}")
source=("git+https://github.com/hauke96/wiki2book#tag=v${pkgver}")
sha256sums=("SKIP")

build() {
  cd ${srcdir}

  # Make go work
  export GOPATH="$srcdir"/gopath
  export GOBIN="$GOPATH"/bin

  # Go into repo folder
  cd "wiki2book"
  
  # Build wiki2book and place it into the current working dir.
  ./build.sh -o linux -a $CARCH -f wiki2book-bin
}

package() {
  cd "${srcdir}/"

  install -Dm755 wiki2book/wiki2book-bin "${pkgdir}"/usr/bin/wiki2book

  install -d "${pkgdir}"/usr/share/wiki2book/configs/
  install -D -Dm644 wiki2book/configs/* "${pkgdir}"/usr/share/wiki2book/configs/
  install -Dm644 wiki2book/projects/style.css "${pkgdir}"/usr/share/wiki2book/style.css
}