aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorAlexander Verbovetsky <alik@ejik.org>2020-10-30 23:33:27 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-10-31 11:15:29 +0700
commit2b638a588bbbd1cf4c4af423e0db1800c6cedf9d (patch)
tree53ff5ca47eb1a2013fb684ab26fd13a890414e82 /development
parent1b4bb13feb668f5b27050f23ea5f3e1ed71a0961 (diff)
development/xxd-standalone: Added (hex dump utility from vim)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/xxd-standalone/README15
-rw-r--r--development/xxd-standalone/doinst.sh10
-rw-r--r--development/xxd-standalone/slack-desc19
-rw-r--r--development/xxd-standalone/xxd-standalone.SlackBuild121
-rw-r--r--development/xxd-standalone/xxd-standalone.info32
5 files changed, 197 insertions, 0 deletions
diff --git a/development/xxd-standalone/README b/development/xxd-standalone/README
new file mode 100644
index 000000000000..59fd97781c4b
--- /dev/null
+++ b/development/xxd-standalone/README
@@ -0,0 +1,15 @@
+xxd creates a hex dump of a given file or standard input. It can also
+convert a hex dump back to its original binary form.
+
+xxd is a part of vim. This standalone version can be useful for users of
+neovim who want to remove the stock vim. This package is useless if vim
+is installed.
+
+Since xxd is a part of vim, xxd-standalone conflicts with the stock vim
+package. You should remove vim before installing xxd-standalone.
+
+If, by some reason, you have xxd-standalone installed simultaneously
+with vim and decide to remove vim, you may need to reinstall
+xxd-standalone.
+
+If you remove xxd-standalone, you'll need to reinstall vim.
diff --git a/development/xxd-standalone/doinst.sh b/development/xxd-standalone/doinst.sh
new file mode 100644
index 000000000000..8cbfd234c57a
--- /dev/null
+++ b/development/xxd-standalone/doinst.sh
@@ -0,0 +1,10 @@
+if VIMP=$(grep -rwl '/var/log/packages/' -e 'usr/bin/xxd' \
+ | grep -o -m 1 "vim-.*"); then
+ echo "WARNING: It seems that you installed xxd-standalone"
+ echo " simultaneously with ${VIMP},"
+ echo " which provides xxd. If you remove vim,"
+ echo " you may need to reinstall xxd-standalone."
+ echo " Conversely, if you remove xxd-standalone,"
+ echo " you'll need to reinstall vim."
+ sleep 5
+fi
diff --git a/development/xxd-standalone/slack-desc b/development/xxd-standalone/slack-desc
new file mode 100644
index 000000000000..8fac3aeb5493
--- /dev/null
+++ b/development/xxd-standalone/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------------------------------------------------------|
+xxd-standalone: xxd-standalone (hex dump utility from vim)
+xxd-standalone:
+xxd-standalone:
+xxd-standalone:
+xxd-standalone: xxd is a part of vim. This standalone version can be useful for users
+xxd-standalone: of neovim who want to remove the stock vim.
+xxd-standalone:
+xxd-standalone:
+xxd-standalone:
+xxd-standalone:
+xxd-standalone:
diff --git a/development/xxd-standalone/xxd-standalone.SlackBuild b/development/xxd-standalone/xxd-standalone.SlackBuild
new file mode 100644
index 000000000000..8c81455ac3a5
--- /dev/null
+++ b/development/xxd-standalone/xxd-standalone.SlackBuild
@@ -0,0 +1,121 @@
+#!/bin/sh
+
+# Slackware build script for xxd-standalone
+
+# Copyright 2020, Alexander Verbovetsky, Moscow, Russia
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=xxd-standalone
+VERSION=${VERSION:-8.2.0854}
+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
+
+CWD=$(pwd)
+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
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir -p $PRGNAM-$VERSION
+cat $CWD/Makefile > $PRGNAM-$VERSION/Makefile
+cat $CWD/xxd.c > $PRGNAM-$VERSION/xxd.c
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+make CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
+
+mkdir -p $PKG/usr/bin
+install -m 0755 -o root -g root xxd $PKG/usr/bin
+
+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
+
+mkdir -p $PKG/usr/man/fr.ISO8859-1/man1
+mkdir -p $PKG/usr/man/fr/man1
+mkdir -p $PKG/usr/man/fr.UTF-8/man1
+mkdir -p $PKG/usr/man/it.ISO8859-1/man1
+mkdir -p $PKG/usr/man/it/man1
+mkdir -p $PKG/usr/man/it.UTF-8/man1
+mkdir -p $PKG/usr/man/ja/man1
+mkdir -p $PKG/usr/man/pl.ISO8859-2/man1
+mkdir -p $PKG/usr/man/pl/man1
+mkdir -p $PKG/usr/man/pl.UTF-8/man1
+mkdir -p $PKG/usr/man/ru.KOI8-R/man1
+mkdir -p $PKG/usr/man/ru.UTF-8/man1
+mkdir -p $PKG/usr/man/man1
+
+cat $CWD/xxd-fr.1 > $PKG/usr/man/fr.ISO8859-1/man1/xxd.1
+cat $CWD/xxd-fr.1 > $PKG/usr/man/fr/man1/xxd.1
+cat $CWD/xxd-fr.UTF-8.1 > $PKG/usr/man/fr.UTF-8/man1/xxd.1
+cat $CWD/xxd-it.1 > $PKG/usr/man/it.ISO8859-1/man1/xxd.1
+cat $CWD/xxd-it.1 > $PKG/usr/man/it/man1/xxd.1
+cat $CWD/xxd-it.UTF-8.1 > $PKG/usr/man/it.UTF-8/man1/xxd.1
+cat $CWD/xxd-ja.UTF-8.1 > $PKG/usr/man/ja/man1/xxd.1
+cat $CWD/xxd-pl.1 > $PKG/usr/man/pl.ISO8859-2/man1/xxd.1
+cat $CWD/xxd-pl.1 > $PKG/usr/man/pl/man1/xxd.1
+cat $CWD/xxd-pl.UTF-8.1 > $PKG/usr/man/pl.UTF-8/man1/xxd.1
+cat $CWD/xxd-ru.1 > $PKG/usr/man/ru.KOI8-R/man1/xxd.1
+cat $CWD/xxd-ru.UTF-8.1 > $PKG/usr/man/ru.UTF-8/man1/xxd.1
+cat $CWD/xxd.1 > $PKG/usr/man/man1/xxd.1
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/xxd-standalone/xxd-standalone.info b/development/xxd-standalone/xxd-standalone.info
new file mode 100644
index 000000000000..74350184cc1a
--- /dev/null
+++ b/development/xxd-standalone/xxd-standalone.info
@@ -0,0 +1,32 @@
+PRGNAM="xxd-standalone"
+VERSION="8.2.0854"
+HOMEPAGE="https://www.vim.org"
+DOWNLOAD="https://raw.githubusercontent.com/vim/vim/v8.2.0854/src/xxd/xxd.c \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/src/xxd/Makefile \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-fr.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-fr.UTF-8.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-it.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-it.UTF-8.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-ja.UTF-8.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-pl.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-pl.UTF-8.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-ru.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd-ru.UTF-8.1 \
+ https://raw.githubusercontent.com/vim/vim/v8.2.0854/runtime/doc/xxd.1"
+MD5SUM="316a7f62dd590d7d18ef4344575d00d0 \
+ d551525508580302c1c22a9ec0c0fb84 \
+ d5967064b340a99671066fe1662b9a70 \
+ 37987f54a8bef25f75c72972381880db \
+ b772556f2393b1cdc82c653449bdcf02 \
+ 9bb23fce20c8c6d0772108b53d66c874 \
+ 557970ea576b1550c74edbf729c58ef0 \
+ e3a2e3643b2bc4b14c99b45a7a46a5cc \
+ 8f4fe8c8a682d6b1c608011a1fdc7171 \
+ 92408c9623fcfa72e7780a4b0d365eb5 \
+ 3ec378d11a435980ac03c1f66c1717f0 \
+ 87467fa59b7efa85002baa2d78d2c0bb"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Alexander Verbovetsky"
+EMAIL="alik@ejik.org"