aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-01-28 14:09:20 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-01-30 08:36:01 +0700
commit7b36d9e657ab325f7673ba803d6e1af934b5bd6c (patch)
tree768fa3d638f9fc28b9d3497ff5abd2a76aebdd90 /misc
parent2cd8c26b45fc16936767281e7cbced1750c260b7 (diff)
downloadslackbuilds-7b36d9e657ab325f7673ba803d6e1af934b5bd6c.tar.xz
misc/hxtools: Added (miscellaneous command-line tools).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/hxtools/README75
-rw-r--r--misc/hxtools/hxtools.SlackBuild164
-rw-r--r--misc/hxtools/hxtools.info12
-rw-r--r--misc/hxtools/shared_perl_lib.diff56
-rw-r--r--misc/hxtools/slack-desc19
5 files changed, 326 insertions, 0 deletions
diff --git a/misc/hxtools/README b/misc/hxtools/README
new file mode 100644
index 000000000000..532f84299c0d
--- /dev/null
+++ b/misc/hxtools/README
@@ -0,0 +1,75 @@
+hxtools (miscellaneous command-line tools)
+
+A collection of tools and scripts by Jan Engelhardt that have
+accumulated over the years, each of which seems to be too small to
+warrant its own project.
+
+The following tools are included:
+
+* aumeta - move seek index and adjust metadata of audio files
+* bin2c - embed data files into C as variables
+* bsvplay - convert BASICA music files to PCM
+* cctypeinfo - show sizes of some important C types on the implemen-
+ tation it was compiled with
+* checkbrack - check parenthesis and bracket count
+* clock_info - print info about system clocks
+* cwdiff - run wdiff with color
+* declone - break hardlinks
+* diff2php - transform patch to self-serving PHP file
+* doxygen-kerneldoc-filter - filter for Doxygen to support kerneldoc
+* extract_d3pkg - extract Descent3 PKG files
+* extract_dxhog - extract Descent HOG files
+* extract_f3pod - extract Fury3 POD files
+* extract_qupak - extract Quake2 PACK files
+* fd0ssh - pipe for password-over-stdin support to ssh
+* filenameconv - convert file name encoding
+* fxterm - start xterm with VGA color palette
+* git-author-stat - show commit author statistics of a git repository
+* git-blame-stats - show per-line author statistics of a git repository
+* git-forest - display the commit history forest
+* git-revert-stats - show reverting statistics of a git repository
+* git-track - set up branch for tracking a remote
+* gpsh [1] - grep in tracklists and play audio files
+* graph-fanout - fan a tree (for graphviz)
+* graph-lchain - remove circles in graphs using longest-chaining method
+* gxxdm - g++ symbol name demangler
+* hcdplay - control autonomous CDDA playback using Linux ioctls
+* ldif-duplicate-attrs - check for multi-value attributes in LDIF file
+* ldif-leading-spaces - detect questionable values for LDAP attributes
+* logontime - show cumulative logon time from wtmp
+* mailsplit - split an mbox into single files
+* mkvappend - cat multiple files into one Matroska container file
+* mod2opus - wrapper for tracker module/MIDI to Opus transcoding
+* hxnetload - show utilization of network interface
+* ofl - open file lister (replaces fuser and lsof -m)
+* paddrspacesize - print size of processes' address spaces
+* pcmdiff - proof-of-concept raw PCM deltifier
+* pcmmix - mix output from bsvplay/qplay in arpeggio or polyphonic mode
+* pegrep - multi-line perl-regexp grep
+* peicon - extract icon resources from PE files
+* pesubst - perl-regexp stream substitution (replaces sed substitutions)
+* pmap_dirty - display amount of RAM a process uses hard
+* proc_iomem_count - show MMIO region sizes
+* proc_stat_parse - ???
+* proc_stat_signal_decode - decode /proc/self/stat for signal status
+* psthreads - alternative experiment to ps involving thread display
+* qpdecode - ???
+* qplay - convert QBASIC play strings to PCM
+* qtar - faster interface to tar with file ordering
+* raregetty - local login program for remote hosts
+* recursive_lower - recursively lowercase all filenames
+* rezip - optimize zip file compression
+* rpmdep.pl - read RPM dependencies and output a graph
+* sourcefuncsize - statistical analysis of code
+* spec-beautifier - program to clean up RPM .spec files
+* ssa2srt - convert SubStation Alpha (SSA) subtitles to SubRip (SRT)
+* su1 - what sudo should have done
+* sysinfo - print IRC-style system information banner
+* tailhex - hex dumper with tail-following support
+* utmp_register - make entries in the utmp/wtmp database
+* vcsaview - display a screen dump in VCSA format
+* vfontas - a bitmap font file transformation utility
+* wktimer - work timer
+* xcp - proof-of-concept cp with alternate copying mechanisms
+
+[1] perl-File-Find-Rule is required for gpsh to work.
diff --git a/misc/hxtools/hxtools.SlackBuild b/misc/hxtools/hxtools.SlackBuild
new file mode 100644
index 000000000000..aa5371cc02c0
--- /dev/null
+++ b/misc/hxtools/hxtools.SlackBuild
@@ -0,0 +1,164 @@
+#!/bin/bash
+
+# Slackware build script for hxtools
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# This build includes both hxtools and the libHX library it depends
+# on. In the unlikely event that someone finds another project that
+# depends on libHX and wants to package it up for SBo, whatever it is
+# can just list hxtools as a dependency.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=hxtools
+VERSION=${VERSION:-20211204}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+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"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+LIBNAM=libHX
+LIBVER=${LIBVER:-4.2}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM
+mkdir -p $PRGNAM
+cd $PRGNAM
+TOPDIR="$( pwd )"
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+tar xvf $CWD/$LIBNAM-$LIBVER.tar.xz
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+### libHX:
+cd $LIBNAM-$LIBVER
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make # V=1
+make install-strip DESTDIR=$PKG
+rm -f $PKG/usr/lib*/*.la
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+LIBDOC=$PKGDOC/$LIBNAM-$VERSION
+
+# LICENSE.GPL3 and LICENSE.WTFPL are also in hxtools, don't install here.
+mkdir -p $LIBDOC
+cp -a COPYING LICENSE.LGPL* *.rst doc $LIBDOC
+
+### hxtools itself, link with the libHX in $PKG:
+cd $TOPDIR/$PRGNAM-$VERSION
+
+# look for extract_dfqshared.pm in /usr/share/$PRGNAM, not /usr/bin.
+patch -p1 < $CWD/shared_perl_lib.diff
+
+libHX_CFLAGS="-I$PKG/usr/include" \
+libHX_LIBS="-L$PKG/usr/lib$LIBDIRSUFFIX -lHX" \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make # V=1
+make install-strip DESTDIR=$PKG
+
+# dunno why so much stuff is installed in libexec... easier to
+# move it after the fact than patch the autotools stuff to fix it.
+mv $PKG/usr/libexec/$PRGNAM/* $PKG/usr/bin
+rm -rf $PKG/usr/libexec
+
+# move this to where the patched extract_* tools expect to find it.
+install -m0644 $PKG/usr/bin/extract_dfqshared.pm $PKG/usr/share/$PRGNAM
+rm -f $PKG/usr/bin/extract_dfqshared.pm
+
+# these don't get installed by 'make install'
+install -m0755 sadmin/filenameconv $PKG/usr/bin
+install -s -m0755 smath/graph-{fanout,lchain} $PKG/usr/bin
+
+# nor these...
+mkdir -p $PKG/usr/sbin
+install -m0755 sadmin/raregetty $PKG/usr/sbin
+# this isn't useful on Slackware, is it?
+install -m0755 sadmin/rpmdep.pl $PKG/usr/sbin
+
+cp -a doc/filenameconv.1 $PKG/usr/man/man1
+cp -a doc/raregetty.8 $PKG/usr/man/man8
+
+# these 2 conflict with bsd-games and man-db:
+rm -f $PKG/usr/bin/{rot13,man2html} \
+ $PKG/usr/man/man1/{rot13,man2html}.1
+
+# there's also a bin2c in SBo's cudatoolkit, but it's installed to
+# /usr/share/cuda/bin, so there's no conflict here.
+
+# redundant copy (the other one's in etc/):
+rm -f $PKG/usr/share/hxtools/hxloginpref.conf
+
+gzip -9 $PKG/usr/man/man*/*
+
+# symlink redundant licenses
+cp -a LICENSE* doc/*.rst examples $PKGDOC
+ln -s ../LICENSE.WTFPL $LIBDOC/LICENSE.WTFPL
+ln -s ../LICENSE.GPL3 $LIBDOC/LICENSE.GPL3
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
diff --git a/misc/hxtools/hxtools.info b/misc/hxtools/hxtools.info
new file mode 100644
index 000000000000..68423c33d6bd
--- /dev/null
+++ b/misc/hxtools/hxtools.info
@@ -0,0 +1,12 @@
+PRGNAM="hxtools"
+VERSION="20211204"
+HOMEPAGE="https://inai.de/projects/hxtools/"
+DOWNLOAD="https://inai.de/files/hxtools/hxtools-20211204.tar.xz \
+ https://inai.de/files/libhx/libHX-4.2.tar.xz"
+MD5SUM="d1bcd68d5181c8c1ebf30eda7aa6820c \
+ 3f2cc2752c0837990d7abf84f7b65b33"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/misc/hxtools/shared_perl_lib.diff b/misc/hxtools/shared_perl_lib.diff
new file mode 100644
index 000000000000..16a8ecb3a900
--- /dev/null
+++ b/misc/hxtools/shared_perl_lib.diff
@@ -0,0 +1,56 @@
+diff -Naur hxtools-20211204/smm/extract_d3pkg hxtools-20211204.patched/smm/extract_d3pkg
+--- hxtools-20211204/smm/extract_d3pkg 2021-12-04 08:56:44.000000000 -0500
++++ hxtools-20211204.patched/smm/extract_d3pkg 2022-01-27 15:49:49.273028431 -0500
+@@ -10,8 +10,8 @@
+
+ use Getopt::Long;
+ use strict;
+-do (($0 =~ m{^(.*)/})[0] || ".")."/shared.pm" ||
+- die "Could not load shared.pm: $!\n";
++do "/usr/share/hxtools/extract_dfqshared.pm" ||
++ die "Could not load extract_dfqshared.pm: $!\n";
+
+ my $ex_out_dir = ".";
+ my $ex_archive_file = "-";
+diff -Naur hxtools-20211204/smm/extract_dxhog hxtools-20211204.patched/smm/extract_dxhog
+--- hxtools-20211204/smm/extract_dxhog 2021-12-04 08:56:44.000000000 -0500
++++ hxtools-20211204.patched/smm/extract_dxhog 2022-01-27 15:50:02.081027267 -0500
+@@ -10,8 +10,8 @@
+
+ use Getopt::Long;
+ use strict;
+-do (($0 =~ m{^(.*)/})[0] || ".")."/shared.pm" ||
+- die "Could not load shared.pm: $!\n";
++do "/usr/share/hxtools/extract_dfqshared.pm" ||
++ die "Could not load extract_dfqshared.pm: $!\n";
+
+ my $ex_out_dir = ".";
+ my $ex_archive_file = "-";
+diff -Naur hxtools-20211204/smm/extract_f3pod hxtools-20211204.patched/smm/extract_f3pod
+--- hxtools-20211204/smm/extract_f3pod 2021-12-04 08:56:44.000000000 -0500
++++ hxtools-20211204.patched/smm/extract_f3pod 2022-01-27 15:50:12.877026285 -0500
+@@ -10,8 +10,8 @@
+
+ use Getopt::Long;
+ use strict;
+-do (($0 =~ m{^(.*)/})[0] || ".")."/shared.pm" ||
+- die "Could not load shared.pm: $!\n";
++do "/usr/share/hxtools/extract_dfqshared.pm" ||
++ die "Could not load extract_dfqshared.pm: $!\n";
+
+ my $ex_out_dir = ".";
+ my $ex_archive_file = "-";
+diff -Naur hxtools-20211204/smm/extract_qupak hxtools-20211204.patched/smm/extract_qupak
+--- hxtools-20211204/smm/extract_qupak 2021-12-04 08:56:44.000000000 -0500
++++ hxtools-20211204.patched/smm/extract_qupak 2022-01-27 15:50:19.046025725 -0500
+@@ -10,8 +10,8 @@
+
+ use Getopt::Long;
+ use strict;
+-do (($0 =~ m{^(.*)/})[0] || ".")."/shared.pm" ||
+- die "Could not load shared.pm: $!\n";
++do "/usr/share/hxtools/extract_dfqshared.pm" ||
++ die "Could not load extract_dfqshared.pm: $!\n";
+
+ my $ex_out_dir = ".";
+ my $ex_archive_file = "-";
diff --git a/misc/hxtools/slack-desc b/misc/hxtools/slack-desc
new file mode 100644
index 000000000000..c8d041cb90f4
--- /dev/null
+++ b/misc/hxtools/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------------------------------------------------------|
+hxtools: hxtools (miscellaneous command-line tools)
+hxtools:
+hxtools: A collection of tools and scripts by Jan Engelhardt that have
+hxtools: accumulated over the years, each of which seems to be too small to
+hxtools: warrant its own project.
+hxtools:
+hxtools:
+hxtools:
+hxtools:
+hxtools:
+hxtools: