summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiusz Drabczyk <arkadiusz@drabczyk.org>2020-07-01 21:20:36 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-08-29 10:07:59 +0700
commitcf4838634f35d7e82974bd48e011867a10134d59 (patch)
tree665734547145ae03cda4bc5fd9a1018e9b5228ef
parentc29597cef148e579062a0ff4733df6dc6b4b3ffb (diff)
downloadslackbuilds-cf4838634f35d7e82974bd48e011867a10134d59.tar.gz
misc/moreutils: Make requirements optional, add a build variable
Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org> Co-developed-by: B Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--misc/moreutils/README8
-rw-r--r--misc/moreutils/moreutils.SlackBuild10
-rw-r--r--misc/moreutils/moreutils.info2
3 files changed, 17 insertions, 3 deletions
diff --git a/misc/moreutils/README b/misc/moreutils/README
index 793048affb..3a234765a3 100644
--- a/misc/moreutils/README
+++ b/misc/moreutils/README
@@ -1,4 +1,10 @@
moreutils is a growing collection of the unix tools that nobody
thought to write long ago when unix was young.
-This package conflicts with system/parallel.
+perl-IPC-Run is an optional dependency, if it's missing chronic will
+not be installed.
+
+This package conflicts with system/parallel so moreutils version of
+parallel is not installed by default. To install it:
+
+ PARALLEL=yes ./moreutils.SlackBuild
diff --git a/misc/moreutils/moreutils.SlackBuild b/misc/moreutils/moreutils.SlackBuild
index 077644d309..9a441d49bb 100644
--- a/misc/moreutils/moreutils.SlackBuild
+++ b/misc/moreutils/moreutils.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=moreutils
VERSION=${VERSION:-0.63}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -77,6 +77,14 @@ mkdir $PKG/usr/man
mv $PKG/usr/share/man/* $PKG/usr/man
rm -rf $PKG/usr/share/ $PKG/usr/man/man1/ts.1
+if [ "${PARALLEL:-yes}" = "no" ]; then
+ rm -f $PKG/usr/bin/parallel $PKG/usr/man/man1/parallel.1
+fi
+
+if ! perl -MIPC::Run -e 1 2>/dev/null; then
+ rm -f $PKG/usr/bin/chronic $PKG/usr/man/man1/chronic.1
+fi
+
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/misc/moreutils/moreutils.info b/misc/moreutils/moreutils.info
index aee85fab27..d2a7785da8 100644
--- a/misc/moreutils/moreutils.info
+++ b/misc/moreutils/moreutils.info
@@ -5,6 +5,6 @@ DOWNLOAD="http://drabczyk.org/moreutils-0.63.tar.gz"
MD5SUM="0af12becbed31dc5d57c4a880ef398fc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="perl-IPC-Run"
+REQUIRES=""
MAINTAINER="Arkadiusz Drabczyk"
EMAIL="arkadiusz@drabczyk.org"