mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
ruby/rbenv: Updated for version 1.3.0.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
2e23f19ef6
commit
611a0030e0
3 changed files with 18 additions and 61 deletions
|
@ -1,12 +0,0 @@
|
||||||
diff -Naur rbenv-1.0.0.orig/libexec/rbenv rbenv-1.0.0/libexec/rbenv
|
|
||||||
--- rbenv-1.0.0.orig/libexec/rbenv 2015-12-25 07:12:47.000000000 +1300
|
|
||||||
+++ rbenv-1.0.0/libexec/rbenv 2016-04-02 14:50:55.733994971 +1300
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
-if enable -f "${BASH_SOURCE%/*}"/../libexec/rbenv-realpath.dylib realpath 2>/dev/null; then
|
|
||||||
+if enable -f /usr/lib/rbenv/libexec/rbenv-realpath.dylib realpath 2>/dev/null; then
|
|
||||||
abs_dirname() {
|
|
||||||
local path="$(realpath "$1")"
|
|
||||||
echo "${path%/*}"
|
|
|
@ -3,6 +3,7 @@
|
||||||
# Slackware build script for rbenv
|
# Slackware build script for rbenv
|
||||||
|
|
||||||
# Copyright 2016-2017,2019,2021 Andrew Clemons, Wellington New Zealand
|
# Copyright 2016-2017,2019,2021 Andrew Clemons, Wellington New Zealand
|
||||||
|
# Copyright 2024 Andrew Clemons, Tokyo Japan
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use of this script, with or without modification, is
|
# Redistribution and use of this script, with or without modification, is
|
||||||
|
@ -26,22 +27,13 @@
|
||||||
cd $(dirname $0) ; CWD=$(pwd)
|
cd $(dirname $0) ; CWD=$(pwd)
|
||||||
|
|
||||||
PRGNAM=rbenv
|
PRGNAM=rbenv
|
||||||
VERSION=${VERSION:-1.2.0}
|
VERSION=${VERSION:-1.3.0}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
PKGTYPE=${PKGTYPE:-tgz}
|
PKGTYPE=${PKGTYPE:-tgz}
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
ARCH=noarch
|
||||||
case "$( uname -m )" in
|
|
||||||
i?86) ARCH=i586 ;;
|
|
||||||
arm*) ARCH=arm ;;
|
|
||||||
*) ARCH=$( uname -m ) ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
|
||||||
# the name of the created package would be, and then exit. This information
|
|
||||||
# could be useful to other scripts.
|
|
||||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -51,34 +43,14 @@ TMP=${TMP:-/tmp/SBo}
|
||||||
PKG=$TMP/package-$PRGNAM
|
PKG=$TMP/package-$PRGNAM
|
||||||
OUTPUT=${OUTPUT:-/tmp}
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
if [ "$ARCH" = "i586" ]; then
|
|
||||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
elif [ "$ARCH" = "i686" ]; then
|
|
||||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
elif [ "$ARCH" = "x86_64" ]; then
|
|
||||||
SLKCFLAGS="-O2 -fPIC"
|
|
||||||
LIBDIRSUFFIX="64"
|
|
||||||
else
|
|
||||||
SLKCFLAGS="-O2"
|
|
||||||
LIBDIRSUFFIX=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
rm -rf $PKG
|
rm -rf $PKG
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
cd $TMP
|
cd $TMP
|
||||||
rm -rf $PRGNAM-$VERSION
|
rm -rf $PRGNAM-$VERSION
|
||||||
|
|
||||||
tar xvf "$CWD/$PRGNAM-$VERSION.tar.gz"
|
tar xvf "$CWD/$PRGNAM-$VERSION.tar.gz"
|
||||||
|
|
||||||
cd $PRGNAM-$VERSION
|
cd $PRGNAM-$VERSION
|
||||||
|
|
||||||
# fix finding native lib when rbenv is symlinked to /usr/bin
|
|
||||||
patch -p1 < $CWD/dylib-patch.diff
|
|
||||||
|
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find -L . \
|
find -L . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||||
|
@ -86,24 +58,21 @@ find -L . \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||||
|
|
||||||
(
|
|
||||||
cd src
|
|
||||||
|
|
||||||
CFLAGS="$SLKCFLAGS" \
|
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
|
||||||
./configure
|
|
||||||
|
|
||||||
make
|
|
||||||
)
|
|
||||||
|
|
||||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
|
||||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
|
||||||
|
|
||||||
mkdir -p $PKG/usr/lib/rbenv
|
mkdir -p $PKG/usr/lib/rbenv
|
||||||
mv completions libexec rbenv.d $PKG/usr/lib/rbenv
|
cp -r rbenv.d/ $PKG/usr/lib/rbenv
|
||||||
|
|
||||||
|
mv share/man $PKG/usr/
|
||||||
|
find $PKG/usr/man -name '*.adoc' -exec rm {} \;
|
||||||
|
|
||||||
mkdir -p $PKG/usr/bin
|
mkdir -p $PKG/usr/bin
|
||||||
ln -s /usr/lib/rbenv/libexec/rbenv $PKG/usr/bin/
|
install -m0755 libexec/* -t $PKG/usr/bin/
|
||||||
|
sed -i 's,#!/usr/bin/env bash,#!/bin/bash,g' $PKG/usr/bin/*
|
||||||
|
|
||||||
|
install -Dm0644 completions/rbenv.bash $PKG/usr/share/bash-completion/completions/$PRGNAM
|
||||||
|
install -Dm0644 completions/_rbenv $PKG/usr/share/zsh/site-functions/_$PRGNAM
|
||||||
|
|
||||||
|
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
||||||
|
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||||
|
|
||||||
# add rbenv to path
|
# add rbenv to path
|
||||||
mkdir -p $PKG/etc/profile.d/
|
mkdir -p $PKG/etc/profile.d/
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
PRGNAM="rbenv"
|
PRGNAM="rbenv"
|
||||||
VERSION="1.2.0"
|
VERSION="1.3.0"
|
||||||
HOMEPAGE="https://github.com/rbenv/rbenv"
|
HOMEPAGE="https://github.com/rbenv/rbenv"
|
||||||
DOWNLOAD="https://github.com/rbenv/rbenv/archive/v1.2.0/rbenv-1.2.0.tar.gz"
|
DOWNLOAD="https://github.com/rbenv/rbenv/archive/v1.3.0/rbenv-1.3.0.tar.gz"
|
||||||
MD5SUM="ea260ab924cfc22c607a219d26a5a195"
|
MD5SUM="e4ce1106663b713fe512082781535bd0"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
REQUIRES=""
|
REQUIRES=""
|
||||||
|
|
Loading…
Reference in a new issue