-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
55 lines (46 loc) · 1.48 KB
/
PKGBUILD
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
# Maintainer: Simon Kohlmeyer <[email protected]>
pkgname=rbenv-git
pkgver=1.2.0.r14.c6cc0a1
pkgrel=1
pkgdesc="Simple Ruby version manager"
arch=('i686' 'x86_64')
url="http://github.com/rbenv/rbenv"
license=('custom:MIT')
groups=()
depends=('ruby' 'bash')
makedepends=('git')
optdepends=('ruby-build')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install="rbenv.install"
source=('git+https://github.com/rbenv/rbenv')
noextract=()
md5sums=('SKIP')
build() {
cd "${pkgname%-git}/src"
./configure
make
}
pkgver() {
cd "$srcdir/${pkgname%-git}"
printf "%s" "$(git describe --tags --long | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}
package() {
cd "${pkgname%-git}"
mkdir -p "$pkgdir/usr/share/licenses/${pkgname}"
install -m 644 ./LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
mkdir -p "$pkgdir/usr/lib/rbenv/completions/"
install -m 644 ./completions/* "$pkgdir/usr/lib/rbenv/completions/"
mkdir -p "$pkgdir/usr/lib/rbenv/libexec/"
install -m 755 ./libexec/* "$pkgdir/usr/lib/rbenv/libexec/"
mkdir -p "$pkgdir/usr/bin/"
ln -s /usr/lib/rbenv/libexec/rbenv "$pkgdir/usr/bin/"
mkdir -p "$pkgdir/usr/lib/rbenv/hooks/exec/gem-rehash"
install -m 644 rbenv.d/exec/gem-rehash/rubygems_plugin.rb \
"$pkgdir/usr/lib/rbenv/hooks/exec/gem-rehash/rubygems_plugin.rb"
install -m 644 rbenv.d/exec/gem-rehash.bash \
"$pkgdir/usr/lib/rbenv/hooks/exec/gem-rehash.bash"
}