summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndy Weidenbaum2016-06-24 17:01:24 -0700
committerAndy Weidenbaum2016-06-24 17:01:24 -0700
commit917d279e46d1d6dc5ee35c37a4ac23b604e39f20 (patch)
tree8585959ae7b5350b4f7649e1a2f7581886836cc1 /PKGBUILD
downloadaur-917d279e46d1d6dc5ee35c37a4ac23b604e39f20.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a11e00186f0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=dcrdocs
+pkgver=20160623
+pkgrel=1
+pkgdesc="Documentation for Decred"
+arch=('any')
+makedepends=('git' 'python-virtualenv')
+optdepends=('darkhttpd: serve static webpages')
+groups=('decred')
+url="https://docs.decred.org"
+license=('ISC')
+source=($pkgname-$pkgver::git+https://github.com/decred/dcrdocs)
+sha256sums=('SKIP')
+install=dcrdocs.install
+
+pkgver() {
+ cd "$srcdir/$pkgname-$pkgver"
+ git log -1 --format="%cd" --date=short | sed "s|-||g"
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ msg2 'Building...'
+ virtualenv .
+ bin/pip \
+ --isolated \
+ --no-cache-dir \
+ --disable-pip-version-check \
+ install \
+ https://github.com/mkdocs/mkdocs/archive/master.zip \
+ python-markdown-math \
+ mkdocs-bootswatch
+ bin/mkdocs build --clean
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ 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"
+}