summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD10
-rw-r--r--omnigollum-support.patch76
3 files changed, 87 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e179f38f4dcf..98e05778309f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ruby-gollum
pkgdesc = A simple, Git-powered wiki.
pkgver = 4.1.4
- pkgrel = 1
+ pkgrel = 2
url = http://github.com/gollum/gollum
arch = any
license = MIT
@@ -21,6 +21,7 @@ pkgbase = ruby-gollum
noextract = rack-protection-1.4.0.gem
options = !emptydirs
source = https://rubygems.org/downloads/gollum-4.1.4.gem
+ source = omnigollum-support.patch
source = https://rubygems.org/downloads/sinatra-1.4.4.gem
source = https://rubygems.org/downloads/sanitize-2.1.1.gem
source = https://rubygems.org/downloads/twitter-text-1.14.7.gem
@@ -29,6 +30,7 @@ pkgbase = ruby-gollum
source = https://rubygems.org/downloads/tilt-1.3.4.gem
source = https://rubygems.org/downloads/rack-protection-1.4.0.gem
sha256sums = 87c2dc6c68c91a423727a59b9d3e78e9e4656e2308065a1d779dd1711c586146
+ sha256sums = 51df2fc63662b6a81bd8cf41a8285e154f80bf4e9677419508e1c4ad23a37e2f
sha256sums = 1a16a552d559be0fff6cefd2c84c1fecafcc54668fba540e99fe8f2692033e8a
sha256sums = 28a17c1adbb14f167410d8f0f1e67cbd8b309718ec581c8461af810c500b378a
sha256sums = 6fbf511d449d61a2e2198dd758622193aa74d6e95a6ec7111725cce0e181629c
diff --git a/PKGBUILD b/PKGBUILD
index c64b05a62370..63904a2e1ac3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_gemname=gollum
pkgname=ruby-$_gemname
pkgver=4.1.4
-pkgrel=1
+pkgrel=2
pkgdesc='A simple, Git-powered wiki.'
arch=(any)
url='http://github.com/gollum/gollum'
@@ -19,6 +19,7 @@ depends=(
options=(!emptydirs)
source=(
https://rubygems.org/downloads/$_gemname-$pkgver.gem
+ omnigollum-support.patch
https://rubygems.org/downloads/sinatra-1.4.4.gem
https://rubygems.org/downloads/sanitize-2.1.1.gem
https://rubygems.org/downloads/twitter-text-1.14.7.gem
@@ -28,6 +29,7 @@ source=(
https://rubygems.org/downloads/rack-protection-1.4.0.gem
)
sha256sums=('87c2dc6c68c91a423727a59b9d3e78e9e4656e2308065a1d779dd1711c586146'
+ '51df2fc63662b6a81bd8cf41a8285e154f80bf4e9677419508e1c4ad23a37e2f'
'1a16a552d559be0fff6cefd2c84c1fecafcc54668fba540e99fe8f2692033e8a'
'28a17c1adbb14f167410d8f0f1e67cbd8b309718ec581c8461af810c500b378a'
'6fbf511d449d61a2e2198dd758622193aa74d6e95a6ec7111725cce0e181629c'
@@ -63,10 +65,14 @@ package() {
rack-protection-1.4.0.gem \
$_gemname-$pkgver.gem
+ # apply the patch
+ pushd "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/"
+ patch -p1 < $srcdir/omnigollum-support.patch
+ popd
+
# remove some build path leakage
find "$pkgdir/$_gemdir/" -name "gem_make.out" | xargs rm -f
rm -rf "$pkgdir/$_gemdir/cache"
install -D -m644 "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
-
diff --git a/omnigollum-support.patch b/omnigollum-support.patch
new file mode 100644
index 000000000000..b33f5e58063c
--- /dev/null
+++ b/omnigollum-support.patch
@@ -0,0 +1,76 @@
+diff --git a/lib/gollum/public/gollum/css/gollum.css b/lib/gollum/public/gollum/css/gollum.css
+index de90e47d..b94dfe33 100755
+--- a/lib/gollum/public/gollum/css/gollum.css
++++ b/lib/gollum/public/gollum/css/gollum.css
+@@ -42,6 +42,14 @@ a:hover, a:visited {
+ text-decoration: underline;
+ }
+
++/* @section user */
++#user p {
++ text-align: right;
++ padding-right:0.5em;
++ font-size: .8em;
++ line-height: 2.0em;
++ color: #999;
++}
+
+ /* @section head */
+ #head {
+diff --git a/lib/gollum/templates/layout.mustache b/lib/gollum/templates/layout.mustache
+index 3165df9b..8adea8d0 100644
+--- a/lib/gollum/templates/layout.mustache
++++ b/lib/gollum/templates/layout.mustache
+@@ -60,6 +60,7 @@
+ <title>{{title}}</title>
+ </head>
+ <body>
++{{< user}}
+
+ {{{yield}}}
+
+diff --git a/lib/gollum/templates/user.mustache b/lib/gollum/templates/user.mustache
+new file mode 100644
+index 00000000..9d2eab46
+--- /dev/null
++++ b/lib/gollum/templates/user.mustache
+@@ -0,0 +1,12 @@
++{{#omnigollum_enabled}}
++<div id="user">
++ <p>
++ {{#user_authed}}
++ {{user_name}} | {{user_provider}} | <strong><a href="/__omnigollum__/logout">[Logout]</a></strong>
++ {{/user_authed}}
++ {{^user_authed}}
++ not logged in | <strong><a href="/__omnigollum__/login">[Login]</a></strong>
++ {{/user_authed}}
++ <p>
++</div>
++{{/omnigollum_enabled}}
+diff --git a/lib/gollum/views/layout.rb b/lib/gollum/views/layout.rb
+index e2d14166..30be33d5 100644
+--- a/lib/gollum/views/layout.rb
++++ b/lib/gollum/views/layout.rb
+@@ -40,6 +40,22 @@ module Precious
+ @js
+ end
+
++ # Passthrough additional omniauth parameters for status bar
++ def user_authed
++ @user_authed
++ end
++
++ def user_provider
++ @user.provider
++ end
++
++ def user_name
++ @user.name
++ end
++
++ def omnigollum_enabled
++ @omnigollum_enabled
++ end
+ end
+ end
+ end