summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD47
-rw-r--r--dcrdocs.install3
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7a4ae2c0839
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+# Generated by mksrcinfo v8
+# Sat Jun 25 00:01:12 UTC 2016
+pkgbase = dcrdocs
+ pkgdesc = Documentation for Decred
+ pkgver = 20160623
+ pkgrel = 1
+ url = https://docs.decred.org
+ install = dcrdocs.install
+ arch = any
+ groups = decred
+ license = ISC
+ makedepends = git
+ makedepends = python-virtualenv
+ optdepends = darkhttpd: serve static webpages
+ source = dcrdocs-20160623::git+https://github.com/decred/dcrdocs
+ sha256sums = SKIP
+
+pkgname = dcrdocs
+
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"
+}
diff --git a/dcrdocs.install b/dcrdocs.install
new file mode 100644
index 00000000000..bf0424ebe3a
--- /dev/null
+++ b/dcrdocs.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo serve dcrdocs: darkhttpd /srv/http/dcrdocs --port 54321
+}