summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlibia Tsati2015-11-15 19:17:32 +0200
committerOlibia Tsati2015-11-15 19:17:32 +0200
commitc9e88b67ccab7462e92bff4b222d5924a17d11ce (patch)
tree8992628a8555f73f32ee089fb07415930fa88d05
downloadaur-c9e88b67ccab7462e92bff4b222d5924a17d11ce.tar.gz
initial commit
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD55
-rwxr-xr-xdevdocs-cli3
-rwxr-xr-xdevdocs-server3
-rw-r--r--devdocs.service11
5 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2e78f68a8351
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = devdocs-git
+ pkgdesc = API Documentation Browser
+ pkgver = r1002.de1c879
+ pkgrel = 1
+ url = http://devdocs.io
+ arch = any
+ license = GPL
+ makedepends = git
+ depends = ruby
+ depends = ruby-bundler
+ depends = curl
+ depends = nodejs
+ depends = coffee-script
+ provides = devdocs-git
+ source = devdocs-git::git+https://github.com/Thibaut/devdocs
+ source = devdocs-server
+ source = devdocs-cli
+ source = devdocs.service
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = devdocs-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..bd0edbd20543
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Jonian Guveli <https://github.com/jonian/>
+pkgname=devdocs-git
+pkgver=r1002.de1c879
+pkgrel=1
+pkgdesc="API Documentation Browser"
+arch=('any')
+url="http://devdocs.io"
+license=('GPL')
+groups=()
+depends=('ruby' 'ruby-bundler' 'curl' 'nodejs' 'coffee-script')
+makedepends=('git')
+optdepends=()
+provides=('devdocs-git')
+conflicts=()
+replaces=()
+backup=()
+options=()
+install=
+changelog=
+source=($pkgname::git+https://github.com/Thibaut/devdocs devdocs-server devdocs-cli devdocs.service)
+noextract=()
+md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+package() {
+ mkdir -p "$pkgdir/opt"
+ mkdir -p "$pkgdir/usr/bin"
+ mkdir -p "$pkgdir/usr/lib/systemd/system"
+
+ cp -a "$srcdir/$pkgname" "$pkgdir/opt/$pkgname"
+ sed -i "/ruby /d" "$pkgdir/opt/$pkgname/Gemfile"
+
+ cp -a "$srcdir/devdocs-server" "$pkgdir/usr/bin/devdocs-server"
+ cp -a "$srcdir/devdocs-cli" "$pkgdir/usr/bin/devdocs-cli"
+ cp -a "$srcdir/devdocs.service" "$pkgdir/usr/lib/systemd/system/devdocs.service"
+
+ cd "$pkgdir/opt/$pkgname" && bundle install --path .bundle
+ cd "$pkgdir/opt/$pkgname" && thor assets:clean && thor assets:compile
+
+ mkdir -p "$pkgdir/opt/$pkgname/tmp"
+
+ chown -R http:wheel "$pkgdir/opt/$pkgname/public"
+ chown -R http:wheel "$pkgdir/opt/$pkgname/tmp"
+
+ chmod -R g+w "$pkgdir/opt/$pkgname/public"
+ chmod -R g+w "$pkgdir/opt/$pkgname/tmp"
+}
+
diff --git a/devdocs-cli b/devdocs-cli
new file mode 100755
index 000000000000..bf13728fd31e
--- /dev/null
+++ b/devdocs-cli
@@ -0,0 +1,3 @@
+#!/bin/bash
+cd "/opt/devdocs-git" && thor "$@"
+
diff --git a/devdocs-server b/devdocs-server
new file mode 100755
index 000000000000..1fd3844e6ef4
--- /dev/null
+++ b/devdocs-server
@@ -0,0 +1,3 @@
+#!/bin/bash
+cd "/opt/devdocs-git" && bundle exec rackup "$@"
+
diff --git a/devdocs.service b/devdocs.service
new file mode 100644
index 000000000000..3c1263e7697e
--- /dev/null
+++ b/devdocs.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=DevDocs
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/devdocs-server
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+