summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorDhabyX <slack.dhabyx@gmail.com>2017-03-13 22:20:25 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-03-18 06:58:26 +0700
commit7c51c9105e651a5aa57cb7dc2772f444285c60db (patch)
tree7f8f885d13ff89c16ab943309837a5fd24ae0555 /system
parent003a2110e1e1f2daa50bf95cd1b23374bd1beb78 (diff)
downloadslackbuilds-7c51c9105e651a5aa57cb7dc2772f444285c60db.tar.gz
system/betty: Patched, build bump.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/betty/README6
-rw-r--r--system/betty/betty.SlackBuild9
-rw-r--r--system/betty/betty.info6
-rw-r--r--system/betty/fix-slackware.patch96
4 files changed, 112 insertions, 5 deletions
diff --git a/system/betty/README b/system/betty/README
index 267f37925f..5268b6aa61 100644
--- a/system/betty/README
+++ b/system/betty/README
@@ -5,3 +5,9 @@ run into situations like this.
This means you don't have to leave your command line to look up an
obscure but useful command. Just ask Betty!
+
+
+Optional Dependency
+
+If you want enable the speak functionality, install espeak or any
+equivalent software and speech-dispatcher.
diff --git a/system/betty/betty.SlackBuild b/system/betty/betty.SlackBuild
index c9e0ef71a3..d72ab0c2c8 100644
--- a/system/betty/betty.SlackBuild
+++ b/system/betty/betty.SlackBuild
@@ -2,6 +2,7 @@
#
# Slackware build script for betty
# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
+# 2017 Dhaby Xiloj <slack.dhabyx@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,12 +24,12 @@
PRGNAM=betty
VERSION=${VERSION:-0.1.7}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -50,6 +51,10 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -C $PKG/opt/$PRGNAM || tar xvf $CWD/v$VERSI
mv $PKG/opt/$PRGNAM/$PRGNAM-$VERSION/* $PKG/opt/$PRGNAM
rm -rf $PKG/opt/$PRGNAM/$PRGNAM-$VERSION
+pushd $PKG/opt/$PRGNAM
+ patch -p1 < $CWD/fix-slackware.patch
+popd
+
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
diff --git a/system/betty/betty.info b/system/betty/betty.info
index 8373cfc586..1bab8e647b 100644
--- a/system/betty/betty.info
+++ b/system/betty/betty.info
@@ -1,10 +1,10 @@
PRGNAM="betty"
VERSION="0.1.7"
HOMEPAGE="https://github.com/pickhardt/betty"
-DOWNLOAD="https://github.com/pickhardt/betty/archive/v0.1.7.tar.gz"
+DOWNLOAD="https://github.com/pickhardt/betty/archive/v0.1.7/betty-0.1.7.tar.gz"
MD5SUM="c98f5b3733f3eaeeeb531d6a0b4b0062"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Ryan P.C. McQuen"
-EMAIL="ryanpcmcquen@member.fsf.org"
+MAINTAINER="DhabyX"
+EMAIL="slack.dhabyx@gmail.com"
diff --git a/system/betty/fix-slackware.patch b/system/betty/fix-slackware.patch
new file mode 100644
index 0000000000..b62fdd19a8
--- /dev/null
+++ b/system/betty/fix-slackware.patch
@@ -0,0 +1,96 @@
+diff -Naur betty-0.1.7a/lib/user.rb betty-0.1.7b/lib/user.rb
+--- betty-0.1.7a/lib/user.rb 2014-09-21 20:23:43.000000000 -0600
++++ betty-0.1.7b/lib/user.rb 2017-03-12 16:20:56.147749890 -0600
+@@ -1,19 +1,19 @@
+-module User
++module User
+ def self.has_command?(command)
+- response = `which #{ command }`
++ response = `which #{ command } 2> /dev/null`
+ response != ""
+ end
+
+ def self.interpret(command)
+ responses = []
+-
++
+ if command.match(/^who\s+am\si$/i) || command.match(/^what\'?s?(\s+is)?\s+my\s(user)?name\??$/i)
+ responses << {
+ :command => "whoami",
+ :explanation => "Gets your system username."
+ }
+ end
+-
++
+ if command.match(/^who\s+am\si$/i) || command.match(/^what\'?s?(\s+is)?\s+my\s((real|full|actual)\s+)?name\??$/i)
+ responses << {
+ :command => "finger $(whoami) | sed 's/.*: *//;q'",
+@@ -23,7 +23,7 @@
+
+ if command.match(/^what\'?s?(\s+is)?(\s+my)?\s?(public|external|internal|private|local)?(\s+ip)?\s?(address)?\??$/i)
+ responses << {
+- :command => "ifconfig",
++ :command => "/sbin/ifconfig",
+ :explanation => "Gets your internal ip address."
+ } if not command.match(/(public|external)/)
+ responses << {
+@@ -31,7 +31,7 @@
+ :explanation => "Gets your external ip address."
+ } if not command.match(/(internal|private|local)/)
+ end
+-
++
+ if command.match(/^who\'?s?(\s+else)?(\s+is)?\s(logged|signed|connected)\s+?in\??$/i)
+ responses << {
+ :command => "who | cut -f 1 -d ' ' | uniq",
+@@ -45,11 +45,11 @@
+ :explanation => "Shows you your current directory."
+ }
+ end
+-
+-
++
++
+ if command.match(/^what\'?s?(?:\s+is)?(?:\s+(?:the|my))?\s+version(?:\s+of)?(\s[a-zA-Z\-_]+)+\??$/i)
+ program = $1.strip
+-
++
+ command_to_use = ""
+ case program
+ when "go"
+@@ -61,7 +61,7 @@
+ else
+ command_to_use = "#{ program } --version"
+ end
+-
++
+ responses << {
+ :command => command_to_use,
+ :explanation => "Gets the version of #{ program }."
+diff -Naur betty-0.1.7a/main.rb betty-0.1.7b/main.rb
+--- betty-0.1.7a/main.rb 2014-09-21 20:23:43.000000000 -0600
++++ betty-0.1.7b/main.rb 2017-03-12 16:13:11.337693583 -0600
+@@ -135,7 +135,7 @@
+
+ if Internet.connection_enable?
+
+- if has_afplay || has_mpg123
++ if has_afplay
+ require 'open-uri'
+ text = sanitize(text)
+ speech_path = '/tmp/betty_speech.mp3'
+@@ -156,12 +156,12 @@
+ end
+ else
+ if has_spd_say
+- system("spd-say -t female2 -m some -r 5 -p -25 -s #{text}")
++ system("spd-say -t female2 -m some -r 5 -p -25 -s \"#{text}\"")
+ end
+ end
+ else
+ if has_spd_say
+- system("spd-say -t female2 -m some -r 5 -p -25 -s #{text}")
++ system("spd-say -t female2 -m some -r 5 -p -25 -s \"#{text}\"")
+ end
+ end
+ end