summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson2022-01-11 19:06:42 +0100
committer Willy Sudiarto Raharjo2022-01-17 03:03:29 +0100
commit7978e324d5b2aad21b6ea5a9862d97e32a7bbcf3 (patch)
treeeb9824fcef4098ca59c2a3ace5c92341498e0155
parent8d93c32470175f84ef081ede5346d58ccc043950 (diff)
downloadslackbuilds-7978e324d5b2aad21b6ea5a9862d97e32a7bbcf3.tar.gz
system/snore: Added (sleep with visual feedback)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/snore/README10
-rw-r--r--system/snore/slack-desc19
-rw-r--r--system/snore/snore.SlackBuild72
-rw-r--r--system/snore/snore.info10
4 files changed, 111 insertions, 0 deletions
diff --git a/system/snore/README b/system/snore/README
new file mode 100644
index 0000000000..a9acf28aac
--- /dev/null
+++ b/system/snore/README
@@ -0,0 +1,10 @@
+snore (sleep with visual feedback)
+
+Usage: snore [-v] [NUMBER[SUFFIX]...]
+
+snore pauses for NUMBER seconds. SUFFIX may be 's' for seconds
+(default), 'm' for minutes, 'h' four hours or 'd' for days. Given two
+or more arguments, pause for the amount of time specified by the sum
+of their values. A visual feedback is given by printing the flowing
+of time in both ascending and descending order. If no arguments are
+given, snore pauses for 1d (one day).
diff --git a/system/snore/slack-desc b/system/snore/slack-desc
new file mode 100644
index 0000000000..1995c751e7
--- /dev/null
+++ b/system/snore/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+snore: snore (sleep with visual feedback)
+snore:
+snore: Usage: snore [-v] [NUMBER[SUFFIX]...]
+snore:
+snore: snore pauses for NUMBER seconds. SUFFIX may be 's' for seconds
+snore: (default), 'm' for minutes, 'h' four hours or 'd' for days. Given two
+snore: or more arguments, pause for the amount of time specified by the sum
+snore: of their values. A visual feedback is given by printing the flowing
+snore: of time in both ascending and descending order. If no arguments are
+snore: given, snore pauses for 1d (one day).
+snore:
diff --git a/system/snore/snore.SlackBuild b/system/snore/snore.SlackBuild
new file mode 100644
index 0000000000..04104eebd3
--- /dev/null
+++ b/system/snore/snore.SlackBuild
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+# Slackware build script for snore
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=snore
+VERSION=${VERSION:-0.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod 644 *
+
+# grammar fix and path to license
+sed -i -e 's,^pause for,pauses for,' \
+ -e "s,LICENSE,/usr/doc/$PRGNAM-$VERSION/LICENSE,g" \
+ $PRGNAM.1
+
+sed -i "s|-Os|$SLKCFLAGS -Wl,-s|" config.mk
+make
+make install PREFIX=/usr MANPREFIX=/usr/man DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README* LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/snore/snore.info b/system/snore/snore.info
new file mode 100644
index 0000000000..b9956b13f6
--- /dev/null
+++ b/system/snore/snore.info
@@ -0,0 +1,10 @@
+PRGNAM="snore"
+VERSION="0.2"
+HOMEPAGE="https://github.com/clamiax/snore"
+DOWNLOAD="https://github.com/clamiax/snore/archive/0.2/snore-0.2.tar.gz"
+MD5SUM="f497682c63e0cf14959f3f76e9c72721"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"