summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 24e90d67c7ca3f3173ae8bc41e9de51f98009799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Generated by gem2arch (https://github.com/anatol/gem2arch)
# Maintainer: Grey Christoforo <first name at last name dot net>

_gemname=gollum-lib
pkgname=ruby-$_gemname
pkgver=4.2.10
pkgrel=1
pkgdesc='A simple, Git-powered wiki, external library dependencies.'
arch=(any)
url='http://github.com/gollum/gollum-lib'
license=(MIT)
depends=(ruby ruby-gollum-grit_adapter ruby-rouge ruby-nokogiri ruby-stringex ruby-sanitize ruby-github-markup ruby-gemojione)
options=(!emptydirs)
source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem)
noextract=($_gemname-$pkgver.gem)
provides=()

# The following section contains a hack to add quite a few packages without repeating myself too often.
# This should be removed once dependency hell is fixed.

_packagefixes=(
'gollum-grit_adapter=1.0.1'
'mini_portile2=2.1.0'
'sanitize=2.1.0'
'github-markup=1.6.1'
'kramdown=1.9.0'
'rack=1.6.8'
'mustache=0.99.8'
)

for _buggeddep in ${_packagefixes[@]}; do
	_buggedgem=$(echo $_buggeddep | cut -d '=' -f 1)
	_buggedver=$(echo $_buggeddep | cut -d '=' -f 2)

	source+=("https://rubygems.org/downloads/$_buggedgem-$_buggedver.gem")
	noextract+=("$_buggedgem-$_buggedver.gem")
	provides+=("ruby-$_buggeddep")
done

package() {
  local _gemdir="$(ruby -e'puts Gem.default_dir')"
  gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" ${noextract[@]}

  # Remove cache, since we are a pacman package.
  rm -rf "$pkgdir/$_gemdir/cache"

  # Remove binaries, as they are not needed.
  rm -rf "$pkgdir/usr/bin"

  install -D -m644 "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

sha256sums=('6eb75173fbd6ed18621e650f747e0581b53f6c070f8fc995474a389363e42999'
            '8b644bac7bd10f38b7944c324263b3f6d4506a0571e6221d604e853d4c5d9139'
            '0b0e83fe0fc190640a93c48cef0c8e1f1f40f77840d82c160fefc1b07a5345f8'
            'c3be075f5b38a1b02404be5778b181e50fba9ab253bac851cb217d9a71375b77'
            '38828ee5b49a2f645919d08fc4b6bdd888500117251f6b50c4e52726264bcbdb'
            'e00ef90f083f845118577dd6a040b4a4aa475bd7a2a645b2ad6944da0555598b'
            'eae37ccb7686b2c672f64bc6be366cfda4d828ea58e1086cb82766b17a54a7a6'
            '826a96db895819c13fffa4fa3c20b85e80b60aaec1f28f79e7db80092abdb0bc')