summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreyson Christoforo2020-03-31 18:06:31 +0100
committerGreyson Christoforo2020-03-31 18:06:31 +0100
commit04818545a97ba2e6e66be1f6884c49c2f14b8e60 (patch)
treecfac207ca5ec0e2a754f6ff57e62f37a28e75a50
downloadaur-04818545a97ba2e6e66be1f6884c49c2f14b8e60.tar.gz
initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD49
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..98ab8572e265
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = gollum
+ pkgdesc = A simple, Git-powered wiki with a sweet API and local frontend.
+ pkgver = 5.0.0
+ pkgrel = 1
+ url = https://github.com/gollum/gollum
+ arch = any
+ license = MIT
+ makedepends = cmake
+ makedepends = ruby-bundler
+ depends = ruby
+ depends = ruby-rdoc
+ options = !emptydirs
+ source = https://github.com/gollum/gollum/archive/v5.0.0.tar.gz
+ sha512sums = 7634743ceaee9ef502a1f686db066d51933ec48e3b5616d7b885fd1d8230ff7fa6491c6f08dd01b1930c0fc284d091e76a3cb58ae47c32190254e41c757ef469
+
+pkgname = gollum
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..dc741155127a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.gem
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7c2679bc994f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Grey Christoforo <first name at last name dot net>
+
+pkgname=gollum
+pkgver=5.0.0
+pkgrel=1
+pkgdesc='A simple, Git-powered wiki with a sweet API and local frontend.'
+arch=('any')
+url='https://github.com/gollum/gollum'
+license=('MIT')
+makedepends=('cmake' 'ruby-bundler')
+depends=('ruby' 'ruby-rdoc')
+options=(!emptydirs)
+source=("https://github.com/gollum/gollum/archive/v${pkgver}.tar.gz")
+sha512sums=('7634743ceaee9ef502a1f686db066d51933ec48e3b5616d7b885fd1d8230ff7fa6491c6f08dd01b1930c0fc284d091e76a3cb58ae47c32190254e41c757ef469')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+
+ # a fix for https://github.com/gollum/gollum/issues/1532
+ sed -i "s/ s.add_dependency 'gollum-lib', '~> 5.0'/ s.add_dependency 'gollum-lib', '~> 5.0'\n s.add_dependency 'rdoc', '~> 6.2'/g" gollum.gemspec
+
+ bundle config build.rdoc --use-system-libraries
+ bundle config set --local path vendor/bundle
+ bundle config set --local without development test
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ bundle install
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ install -d "${pkgdir}/opt/${pkgname}"
+ cp -ra --no-preserve=owner . "${pkgdir}/opt/${pkgname}"
+
+ install -d "${pkgdir}/usr/bin"
+ cat > "${pkgdir}/usr/bin/${pkgname}" << EOF
+#!/bin/sh
+BUNDLE_GEMFILE=/opt/${pkgname}/Gemfile bundle exec ruby /opt/${pkgname}/bin/${pkgname} "\$@"
+EOF
+ chmod 755 "${pkgdir}/usr/bin/${pkgname}"
+
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ find "${pkgdir}" \( -name gem_make.out -or -name mkmf.log \) -delete
+ rm -r "${pkgdir}"/opt/${pkgname}/vendor/bundle/ruby/*/cache
+}