aboutsummaryrefslogtreecommitdiff
path: root/office
diff options
context:
space:
mode:
authorJostein Berntsen <jvbernts@online.no>2022-05-20 16:50:16 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-05-21 08:25:27 +0700
commitfdc88f407c5cf122f3a3483f274e85c1a60dfe37 (patch)
treedc64db3b30dbe5ca979e1a7981fda452dd3a881f /office
parentd7cdd9ca3b51afa8ed4a23f6d30e989d82735c3a (diff)
office/timetrap: Fix to not remove executable.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office')
-rw-r--r--office/timetrap/timetrap.SlackBuild13
1 files changed, 10 insertions, 3 deletions
diff --git a/office/timetrap/timetrap.SlackBuild b/office/timetrap/timetrap.SlackBuild
index 7e85928e065a..a93f30c42fde 100644
--- a/office/timetrap/timetrap.SlackBuild
+++ b/office/timetrap/timetrap.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for timetrap
-# Copyright 2013-2021 Jostein Berntsen <jvbernts@online.no>
+# Copyright 2013-2022 Jostein Berntsen <jvbernts@online.no>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,11 +27,16 @@
# - get rid of hardcoded dependency versions in the gemspec.
# - remove redundant t and dev_t scripts from /usr/bin.
+# 20220520 bkw: Modified by Jostein Berntsen, BUILD=3:
+# - fix: Update removal line so the executable t is retained
+# - Added variable to check for Ruby version and sed line to ensure compatibility
+# for newer Ruby versions than 3.0.0
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=timetrap
VERSION=${VERSION:-1.15.2}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -102,7 +107,7 @@ gem install \
$CWD/$PRGNAM-$VERSION.gem
# 20220303 bkw: don't need these extra almost-identical scripts in /usr/bin:
-rm -f $PKG/usr/bin/{t,dev_t}
+rm -f $PKG/usr/bin/{dev_t}
# 20220303 bkw: the version numbers of the deps are hardcoded in the
# .gemspec. Any time someone updates one of them, it would break
@@ -118,6 +123,8 @@ rm -f $PKG/usr/bin/{t,dev_t}
cd $PKG
cp $CWD/remove_hardcoded_versions.diff tmp.diff
[ "$ARCH" = "x86_64" ] || sed -i 's,usr/lib64,usr/lib,g' tmp.diff
+RUBYVERSION=$(ls /usr/lib*/ruby/gems)
+sed -i "s/gems\/3\.[0-9]\.[0-9]\//gems\/$RUBYVERSION\//g" *.diff
patch -p1 < tmp.diff
rm -f tmp.diff