development/hub: Updated for version 2.2.0 (moved from ruby).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
21219b2025
commit
69459823cc
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Slackware build script for hub
|
||||
|
||||
# Copyright 2014 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
|
||||
# Copyright 2014-2015 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -23,7 +23,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=hub
|
||||
VERSION=${VERSION:-1.12.4}
|
||||
VERSION=${VERSION:-2.2.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -59,51 +59,36 @@ set -e
|
|||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/v$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
DESTDIR=$( ruby -r rbconfig -e '
|
||||
include RbConfig
|
||||
printf("%s/%s/gems/%s\n",
|
||||
CONFIG["libdir"],
|
||||
CONFIG["RUBY_INSTALL_NAME"],
|
||||
CONFIG["ruby_version"]
|
||||
)
|
||||
')
|
||||
./script/build
|
||||
mkdir -p $PKG/usr/bin
|
||||
install -m755 $PRGNAM $PKG/usr/bin/$PRGNAM
|
||||
|
||||
gem specification $CWD/$PRGNAM-$VERSION.gem | \
|
||||
ruby -r yaml -r rbconfig -e '
|
||||
c = Config::CONFIG
|
||||
path = sprintf("%s/%s/gems/%s",
|
||||
c["libdir"],
|
||||
c["RUBY_INSTALL_NAME"],
|
||||
c["ruby_version"])
|
||||
sys_gemspecs = Dir.glob(path + "/specifications/*").map {|g| gs = Gem::Specification.load(g); gs.name }
|
||||
obj = Gem::Specification.from_yaml($stdin)
|
||||
obj.dependencies.each {|dep|
|
||||
if not(dep.type == :runtime)
|
||||
next
|
||||
end
|
||||
if not(sys_gemspecs.include?(dep.name))
|
||||
$stderr.write("WARNING: #{dep.name} gem not found\n")
|
||||
sleep 0.5
|
||||
end
|
||||
|
||||
}'
|
||||
|
||||
gem install \
|
||||
--local \
|
||||
--no-update-sources \
|
||||
--ignore-dependencies \
|
||||
--backtrace \
|
||||
--install-dir $PKG/$DESTDIR \
|
||||
--bindir $PKG/usr/bin \
|
||||
$CWD/$PRGNAM-$VERSION.gem
|
||||
mkdir -p $PKG/usr/man/man1
|
||||
gzip -c man/hub.1 > $PKG/usr/man/man1/hub.1.gz
|
||||
|
||||
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/doc/$PRGNAM-$VERSION
|
||||
install -m644 LICENSE CONTRIBUTING.md README.md $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/usr/share/bash-completion/completions/hub
|
||||
install -m644 etc/hub.bash_completion.sh $PKG/usr/share/bash-completion/completions/hub
|
||||
|
||||
mkdir -p $PKG/usr/share/zsh/site-functions
|
||||
install -m644 etc/hub.zsh_completion $PKG/usr/share/zsh/site-functions/_hub
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="hub"
|
||||
VERSION="1.12.4"
|
||||
VERSION="2.2.0"
|
||||
HOMEPAGE="https://github.com/github/hub"
|
||||
DOWNLOAD="https://rubygems.org/downloads/hub-1.12.4.gem"
|
||||
MD5SUM="6a3dd795b50e462dc77b54972d29941a"
|
||||
DOWNLOAD="https://github.com/github/hub/archive/v2.2.0.tar.gz"
|
||||
MD5SUM="eddce830a079b8480f104aa7496f46fe"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
REQUIRES="google-go-lang"
|
||||
MAINTAINER="Willy Sudiarto Raharjo"
|
||||
EMAIL="willysr@slackbuilds.org"
|
Loading…
Reference in New Issue