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

pkgname=dcrdocs
pkgver=20171214
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 --no-show-signature | sed "s|-||g"
}

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

  msg2 'Building...'
  python -m venv .
  bin/pip \
    --isolated \
    --no-cache-dir \
    --disable-pip-version-check \
    install \
    -r requirements.txt
  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"
}