new package: hollywood
Requested in https://github.com/termux/termux-packages/issues/809.
This commit is contained in:
parent
fd839b396f
commit
377e59e2f5
17
packages/hollywood/build.sh
Normal file
17
packages/hollywood/build.sh
Normal file
@ -0,0 +1,17 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://launchpad.net/hollywood
|
||||
TERMUX_PKG_DESCRIPTION="Fill your console with Hollywood melodrama technobabble"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_VERSION=1.20
|
||||
TERMUX_PKG_SRCURL=https://launchpad.net/hollywood/trunk/${TERMUX_PKG_VERSION}/+download/hollywood_${TERMUX_PKG_VERSION}.orig.tar.gz
|
||||
TERMUX_PKG_SHA256=5d6d366ab7e2fd15833f6d2fbd390e39deecf516f04710d3fee9662169f94677
|
||||
TERMUX_PKG_DEPENDS="apg, bmon, byobu, cmatrix, coreutils, dash, gawk, htop, man, tree, util-linux"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
|
||||
termux_step_make_install() {
|
||||
install -dm0700 "$TERMUX_PREFIX"/{bin,lib/hollywood,share/{man/man1,hollywood}}
|
||||
install -m 0700 "$TERMUX_PKG_SRCDIR"/bin/hollywood "$TERMUX_PREFIX"/bin/
|
||||
install -m 0700 "$TERMUX_PKG_SRCDIR"/lib/hollywood/* "$TERMUX_PREFIX"/lib/hollywood/
|
||||
install -m 0600 "$TERMUX_PKG_SRCDIR"/share/hollywood/* "$TERMUX_PREFIX"/share/hollywood/
|
||||
install -m 0600 "$TERMUX_PKG_SRCDIR"/share/man/man1/* "$TERMUX_PREFIX"/share/man/man1/
|
||||
}
|
22
packages/hollywood/hollywood-1.20_lib_hollywood_apg.patch
Normal file
22
packages/hollywood/hollywood-1.20_lib_hollywood_apg.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -uNr hollywood-1.20/lib/hollywood/apg hollywood-1.20.mod/lib/hollywood/apg
|
||||
--- hollywood-1.20/lib/hollywood/apg 2019-07-17 18:21:02.000000000 +0300
|
||||
+++ hollywood-1.20.mod/lib/hollywood/apg 2020-01-02 15:09:52.119776707 +0200
|
||||
@@ -16,8 +16,17 @@
|
||||
|
||||
command -v apg >/dev/null 2>&1 || exit 1
|
||||
|
||||
+_HAS_CCZE=false
|
||||
+if command -v ccze >/dev/null 2>&1; then
|
||||
+ _HAS_CCZE=true
|
||||
+fi
|
||||
+
|
||||
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
|
||||
while true; do
|
||||
- apg -qlt -c /dev/urandom -n 1 -m 4 | ccze -A -c default=$(printf "red\ngreen\nyellow\nblue\nmagenta\ncyan" | sort -R | head -n1)
|
||||
+ if ${_HAS_CCZE}; then
|
||||
+ apg -qlt -c /dev/urandom -n 1 -m 4 | ccze -A -c default=$(printf "red\ngreen\nyellow\nblue\nmagenta\ncyan" | sort -R | head -n1)
|
||||
+ else
|
||||
+ apg -qlt -c /dev/urandom -n 1 -m 4 | sort -R | head -n1)
|
||||
+ fi
|
||||
sleep 0.2
|
||||
done
|
24
packages/hollywood/hollywood-1.20_lib_hollywood_errno.patch
Normal file
24
packages/hollywood/hollywood-1.20_lib_hollywood_errno.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -uNr hollywood-1.20/lib/hollywood/errno hollywood-1.20.mod/lib/hollywood/errno
|
||||
--- hollywood-1.20/lib/hollywood/errno 2019-06-12 07:07:01.000000000 +0300
|
||||
+++ hollywood-1.20.mod/lib/hollywood/errno 2020-01-02 15:10:58.776335349 +0200
|
||||
@@ -15,10 +15,18 @@
|
||||
# limitations under the License.
|
||||
|
||||
command -v errno >/dev/null 2>&1 || exit 1
|
||||
-command -v ccze >/dev/null 2>&1 || exit 1
|
||||
+
|
||||
+_HAS_CCZE=false
|
||||
+if command -v ccze >/dev/null 2>&1; then
|
||||
+ _HAS_CCZE=true
|
||||
+fi
|
||||
|
||||
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
|
||||
while true; do
|
||||
- errno --list | sort -R | ccze -A
|
||||
+ if ${_HAS_CCZE}; then
|
||||
+ errno --list | sort -R | ccze -A
|
||||
+ else
|
||||
+ errno --list | sort -R
|
||||
+ fi
|
||||
sleep 0.6
|
||||
done
|
@ -0,0 +1,32 @@
|
||||
diff -uNr hollywood-1.20/lib/hollywood/hexdump hollywood-1.20.mod/lib/hollywood/hexdump
|
||||
--- hollywood-1.20/lib/hollywood/hexdump 2019-06-12 07:07:01.000000000 +0300
|
||||
+++ hollywood-1.20.mod/lib/hollywood/hexdump 2020-01-02 15:02:15.718797672 +0200
|
||||
@@ -15,12 +15,25 @@
|
||||
# limitations under the License.
|
||||
|
||||
command -v hexdump >/dev/null 2>&1 || exit 1
|
||||
-command -v ccze >/dev/null 2>&1 || exit 1
|
||||
+
|
||||
+_HAS_CCZE=false
|
||||
+if command -v ccze >/dev/null 2>&1; then
|
||||
+ _HAS_CCZE=true
|
||||
+fi
|
||||
|
||||
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
|
||||
while true; do
|
||||
- for f in $(ls /usr/bin/ | sort -R); do
|
||||
- head -c 4096 "/usr/bin/$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
|
||||
+ for f in $(ls @TERMUX_PREFIX@/bin/ | sort -R); do
|
||||
+ if [ -d "@TERMUX_PREFIX@/bin/$f" ]; then
|
||||
+ continue
|
||||
+ fi
|
||||
+
|
||||
+ if ${_HAS_CCZE}; then
|
||||
+ head -c 4096 "@TERMUX_PREFIX@/bin/$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
|
||||
+ else
|
||||
+ head -c 4096 "@TERMUX_PREFIX@/bin/$f" | hexdump -C
|
||||
+ fi
|
||||
+
|
||||
sleep 0.7
|
||||
done
|
||||
done
|
27
packages/hollywood/hollywood-1.20_lib_hollywood_logs.patch
Normal file
27
packages/hollywood/hollywood-1.20_lib_hollywood_logs.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff -uNr hollywood-1.20/lib/hollywood/logs hollywood-1.20.mod/lib/hollywood/logs
|
||||
--- hollywood-1.20/lib/hollywood/logs 2019-06-12 07:07:54.000000000 +0300
|
||||
+++ hollywood-1.20.mod/lib/hollywood/logs 2020-01-02 15:03:57.646716697 +0200
|
||||
@@ -14,13 +14,20 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
-command -v ccze >/dev/null 2>&1 || exit 1
|
||||
+_HAS_CCZE=false
|
||||
+if command -v ccze >/dev/null 2>&1; then
|
||||
+ _HAS_CCZE=true
|
||||
+fi
|
||||
|
||||
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
|
||||
while true; do
|
||||
- LOGS=$(find /var/log -type f -name "*.log" 2>/dev/null | head -n 4096 | sort -R)
|
||||
+ LOGS=$(find @TERMUX_PREFIX@/var/log -type f -name "*.log" 2>/dev/null | head -n 4096 | sort -R)
|
||||
for log in $LOGS; do
|
||||
- cat "$log" 2>/dev/null | ccze -A
|
||||
+ if ${_HAS_CCZE}; then
|
||||
+ cat "$log" 2>/dev/null | ccze -A
|
||||
+ else
|
||||
+ cat "$log" 2>/dev/null
|
||||
+ fi
|
||||
sleep 0.5
|
||||
done
|
||||
done
|
28
packages/hollywood/hollywood-1.20_lib_hollywood_man.patch
Normal file
28
packages/hollywood/hollywood-1.20_lib_hollywood_man.patch
Normal file
@ -0,0 +1,28 @@
|
||||
diff -uNr hollywood-1.20/lib/hollywood/man hollywood-1.20.mod/lib/hollywood/man
|
||||
--- hollywood-1.20/lib/hollywood/man 2019-06-12 07:07:01.000000000 +0300
|
||||
+++ hollywood-1.20.mod/lib/hollywood/man 2020-01-02 15:05:56.654764283 +0200
|
||||
@@ -15,13 +15,21 @@
|
||||
# limitations under the License.
|
||||
|
||||
command -v man >/dev/null 2>&1 || exit 1
|
||||
-command -v ccze >/dev/null 2>&1 || exit 1
|
||||
+
|
||||
+_HAS_CCZE=false
|
||||
+if command -v ccze >/dev/null 2>&1; then
|
||||
+ _HAS_CCZE=true
|
||||
+fi
|
||||
|
||||
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
|
||||
while true; do
|
||||
- FILES=$(ls /usr/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096)
|
||||
+ FILES=$(ls @TERMUX_PREFIX@/share/man/man1/ | sort -R | sed "s/\.1\.gz.*$//" | head -n 4096)
|
||||
for f in $FILES; do
|
||||
- man "$f" | ccze -A
|
||||
+ if ${_HAS_CCZE}; then
|
||||
+ man "$f" | ccze -A
|
||||
+ else
|
||||
+ man "$f"
|
||||
+ fi
|
||||
sleep 0.2
|
||||
done
|
||||
done
|
32
packages/hollywood/hollywood-1.20_lib_hollywood_sshart.patch
Normal file
32
packages/hollywood/hollywood-1.20_lib_hollywood_sshart.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff -uNr hollywood-1.20/lib/hollywood/sshart hollywood-1.20.mod/lib/hollywood/sshart
|
||||
--- hollywood-1.20/lib/hollywood/sshart 2019-06-12 07:18:12.000000000 +0300
|
||||
+++ hollywood-1.20.mod/lib/hollywood/sshart 2020-01-02 15:07:40.390659364 +0200
|
||||
@@ -15,10 +15,14 @@
|
||||
# limitations under the License.
|
||||
|
||||
command -v ssh-keygen >/dev/null 2>&1 || exit 1
|
||||
-command -v ccze >/dev/null 2>&1 || exit 1
|
||||
+
|
||||
+_HAS_CCZE=false
|
||||
+if command -v ccze >/dev/null 2>&1; then
|
||||
+ _HAS_CCZE=true
|
||||
+fi
|
||||
|
||||
PKG=hollywood
|
||||
-tmpdir="/tmp/$PKG"
|
||||
+tmpdir="@TERMUX_PREFIX@/tmp/$PKG"
|
||||
trap "rm -rf $tmpdir 2>/dev/null && pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
|
||||
while true; do
|
||||
mkdir -p "$tmpdir"
|
||||
@@ -28,6 +32,10 @@
|
||||
rm -f $tmpfile $tmpfile.pub
|
||||
wait
|
||||
clear
|
||||
- echo "$art" | ccze -A -c default=red
|
||||
+ if ${_HAS_CCZE}; then
|
||||
+ echo "$art" | ccze -A -c default=red
|
||||
+ else
|
||||
+ echo "$art"
|
||||
+ fi
|
||||
sleep 3 &
|
||||
done
|
27
packages/hollywood/hollywood-1.20_lib_hollywood_stat.patch
Normal file
27
packages/hollywood/hollywood-1.20_lib_hollywood_stat.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff -uNr hollywood-1.20/lib/hollywood/stat hollywood-1.20.mod/lib/hollywood/stat
|
||||
--- hollywood-1.20/lib/hollywood/stat 2019-06-12 07:07:01.000000000 +0300
|
||||
+++ hollywood-1.20.mod/lib/hollywood/stat 2020-01-02 15:12:50.032259620 +0200
|
||||
@@ -15,12 +15,20 @@
|
||||
# limitations under the License.
|
||||
|
||||
command -v stat >/dev/null 2>&1 || exit 1
|
||||
-command -v ccze >/dev/null 2>&1 || exit 1
|
||||
+
|
||||
+_HAS_CCZE=false
|
||||
+if command -v ccze >/dev/null 2>&1; then
|
||||
+ _HAS_CCZE=true
|
||||
+fi
|
||||
|
||||
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
|
||||
while true; do
|
||||
- for f in $(find /sys /dev 2>/dev/null | head -n 4096 | sort -R); do
|
||||
- stat "$f" | ccze -A -c default=yellow
|
||||
+ for f in $(find @TERMUX_PREFIX@/etc @TERMUX_PREFIX@/tmp 2>/dev/null | head -n 4096 | sort -R); do
|
||||
+ if ${_HAS_CCZE}; then
|
||||
+ stat "$f" | ccze -A -c default=yellow
|
||||
+ else
|
||||
+ stat "$f"
|
||||
+ fi
|
||||
sleep 0.8
|
||||
done
|
||||
done
|
12
packages/hollywood/hollywood-1.20_lib_hollywood_tree.patch
Normal file
12
packages/hollywood/hollywood-1.20_lib_hollywood_tree.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr hollywood-1.20/lib/hollywood/tree hollywood-1.20.mod/lib/hollywood/tree
|
||||
--- hollywood-1.20/lib/hollywood/tree 2019-06-12 07:07:01.000000000 +0300
|
||||
+++ hollywood-1.20.mod/lib/hollywood/tree 2020-01-02 15:14:29.568079154 +0200
|
||||
@@ -17,7 +17,7 @@
|
||||
command -v tree >/dev/null 2>&1 || exit 1
|
||||
|
||||
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
|
||||
-DIRS="/sys /dev"
|
||||
+DIRS="@TERMUX_HOME@ @TERMUX_PREFIX@/bin @TERMUX_PREFIX@/etc @TERMUX_PREFIX@/lib @TERMUX_PREFIX@/share @TERMUX_PREFIX@/tmp"
|
||||
|
||||
while true; do
|
||||
for d1 in $DIRS; do
|
Loading…
Reference in New Issue
Block a user