summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 05b9a5e2463e3581ba83806af9bfee35d7baccc9 (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
# Maintainer: Andy Weidenbaum <archbaum@gmail.com>

pkgname=dcrdocs
pkgver=20170428
pkgrel=1
pkgdesc="Documentation for Decred"
arch=('any')
makedepends=('git' 'python')
optdepends=('darkhttpd: serve static webpages')
groups=('decred')
url="https://docs.decred.org"
license=('ISC')
source=(git+https://github.com/decred/dcrdocs)
sha256sums=('SKIP')
install=dcrdocs.install

pkgver() {
  cd "$srcdir/$pkgname"
  git log -1 --format="%cd" --date=short | sed "s|-||g"
}

build() {
  cd "$srcdir/$pkgname"

  msg2 'Building...'
  python -m venv .
  bin/pip \
    --isolated \
    --no-cache-dir \
    --disable-pip-version-check \
    install \
    https://github.com/mkdocs/mkdocs/archive/master.zip \
    fontawesome-markdown \
    mkdocs-bootswatch \
    python-markdown-math
  bin/mkdocs build --clean
}

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

  msg2 'Installing documentation...'
  install -Dm 644 README.md -t "$pkgdir/usr/share/doc/dcrdocs"

  msg2 'Installing...'
  install -dm 755 "$pkgdir/srv/http/dcrdocs"
  cp -dpr --no-preserve=ownership site/* "$pkgdir/srv/http/dcrdocs"
}