From 69459823ccd7c78cc9a1d645af1dd9dbd5de240c Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Tue, 24 Feb 2015 07:00:13 +0700 Subject: [PATCH] development/hub: Updated for version 2.2.0 (moved from ruby). Signed-off-by: Willy Sudiarto Raharjo --- {ruby => development}/hub/README | 0 {ruby => development}/hub/hub.SlackBuild | 61 +++++++++--------------- {ruby => development}/hub/hub.info | 8 ++-- {ruby => development}/hub/slack-desc | 0 4 files changed, 27 insertions(+), 42 deletions(-) rename {ruby => development}/hub/README (100%) rename {ruby => development}/hub/hub.SlackBuild (67%) rename {ruby => development}/hub/hub.info (51%) rename {ruby => development}/hub/slack-desc (100%) diff --git a/ruby/hub/README b/development/hub/README similarity index 100% rename from ruby/hub/README rename to development/hub/README diff --git a/ruby/hub/hub.SlackBuild b/development/hub/hub.SlackBuild similarity index 67% rename from ruby/hub/hub.SlackBuild rename to development/hub/hub.SlackBuild index 5aee177739..10c0258693 100644 --- a/ruby/hub/hub.SlackBuild +++ b/development/hub/hub.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for hub -# Copyright 2014 Willy Sudiarto Raharjo +# Copyright 2014-2015 Willy Sudiarto Raharjo # 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 diff --git a/ruby/hub/hub.info b/development/hub/hub.info similarity index 51% rename from ruby/hub/hub.info rename to development/hub/hub.info index c17712319a..024ac76d00 100644 --- a/ruby/hub/hub.info +++ b/development/hub/hub.info @@ -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" diff --git a/ruby/hub/slack-desc b/development/hub/slack-desc similarity index 100% rename from ruby/hub/slack-desc rename to development/hub/slack-desc