blob: 91a2251f2863e6929f77e45999731651e16e1ef1 (
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
|
# Maintainer: envolution
# Contributor: Miguel Vazquez https://github.com/mikisvaz
# Contributor: Vojtěch Aschenbrenner <v@asch.cz>
_gemname=lockfile
pkgname=ruby-lockfile
#this version is altered by the patches, not the original author. See link below
pkgver=2.1.8
pkgrel=1
pkgdesc='A Ruby library for creating lockfiles'
arch=(any)
url='https://github.com/ahoward/lockfile'
license=(Ruby)
depends=(ruby)
options=(!emptydirs)
_tag='20ab06f29bda69b9773d799510d00585b6a27e3b'
source=(
"$pkgname-$pkgver::git+https://github.com/ahoward/lockfile.git#tag=${_tag}"
"semiphore.patch" # https://github.com/mikisvaz/lockfile/tree/8c6dd8177f569e4bb555703abfb26d24ae141865
)
sha1sums=('1fe94eabbe9030b9d56590c0aa0ade80c5764d12'
'8526ba6d7860b5e7d137f5c64dd3087e0ae5fff6')
build() {
cd "${pkgname}-${pkgver}"
# Apply patch if necessary
patch -p1 < "${srcdir}/semiphore.patch"
# Build the gem directly from the gemspec
gem build "${_gemname}.gemspec"
}
package() {
cd "${pkgname}-${pkgver}"
# Install the gem to the appropriate directory
local _gemdir="$(ruby -e 'puts Gem.default_dir')"
gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" "${_gemname}-${pkgver}.gem"
# Install binaries and docs
install -Dm755 "bin/rlock" "$pkgdir/usr/bin/rlock"
install -Dm644 "doc/rlock.help" "$pkgdir/usr/share/doc/${pkgname}/rlock.help"
install -Dm644 "README" "$pkgdir/usr/share/doc/${pkgname}/README"
# Install samples
install -d "$pkgdir/usr/share/${pkgname}/samples"
cp -r samples/* "$pkgdir/usr/share/${pkgname}/samples/"
}
# vim:set ts=2 sw=2 et:
|