summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2020-05-09 13:25:12 +0100
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2020-05-10 08:37:01 +0700
commit3f1a0907d814d3b8780b1ab8fc374a64ba4b9c78 (patch)
tree4d9779f5eafa499204421799306708d8bfa288c5 /system
parentb94b29ab1bdf8925f05670137d3c2269b82e6c2b (diff)
downloadslackbuilds-3f1a0907d814d3b8780b1ab8fc374a64ba4b9c78.tar.gz
slackbuilds-3f1a0907d814d3b8780b1ab8fc374a64ba4b9c78.tar.xz
system/crc32_simple: Added (calculate crc32 checksum of files)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/crc32_simple/README6
-rw-r--r--system/crc32_simple/crc32_simple.161
-rw-r--r--system/crc32_simple/crc32_simple.SlackBuild67
-rw-r--r--system/crc32_simple/crc32_simple.info10
-rw-r--r--system/crc32_simple/crc32_simple.rst44
-rw-r--r--system/crc32_simple/slack-desc19
6 files changed, 207 insertions, 0 deletions
diff --git a/system/crc32_simple/README b/system/crc32_simple/README
new file mode 100644
index 0000000000..fa12639621
--- /dev/null
+++ b/system/crc32_simple/README
@@ -0,0 +1,6 @@
+crc32_simple (calculate crc32 checksum of files)
+
+Simple public domain implementation of the standard CRC32 checksum.
+Outputs the checksum for each file given as a command line argument.
+Invalid file names and files that cause errors are silently skipped.
+The program reads from stdin if it is called with no arguments.
diff --git a/system/crc32_simple/crc32_simple.1 b/system/crc32_simple/crc32_simple.1
new file mode 100644
index 0000000000..d5d119a2f6
--- /dev/null
+++ b/system/crc32_simple/crc32_simple.1
@@ -0,0 +1,61 @@
+.\" Man page generated from reStructuredText.
+.
+.TH CRC32_SIMPLE 1 "2020-05-05" "20120911" "SlackBuilds.org"
+.SH NAME
+crc32_simple \- calculate standard crc32 checksum
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" RST source for crc32_simple(1) man page. Convert with:
+.
+.\" rst2man.py crc32_simple.rst > crc32_simple.1
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.\" converting from pod:
+.
+.\" s/B<\([^>]*\)>/**\1**/g
+.
+.\" s/I<\([^>]*\)>/*\1*/g
+.
+.SH SYNOPSIS
+.sp
+crc32_simple [filenames]
+.SH DESCRIPTION
+.sp
+Simple public domain implementation of the standard CRC32 checksum.
+Outputs the checksum for each file given as a command line argument.
+Invalid file names and files that cause errors are silently skipped.
+The program reads from stdin if it is called with no arguments.
+.SH AUTHORS
+.sp
+crc32_simple was written by Björn Samuelsson.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.\" Generated by docutils manpage writer.
+.
diff --git a/system/crc32_simple/crc32_simple.SlackBuild b/system/crc32_simple/crc32_simple.SlackBuild
new file mode 100644
index 0000000000..759078b08d
--- /dev/null
+++ b/system/crc32_simple/crc32_simple.SlackBuild
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+# Slackware build script for crc32_simple
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Why doesn't Slackware already have some tool that can do crc32?
+# There are TCL and PHP modules, the kernel includes its own crc32 algo,
+# but nothing you can run directly from the command line.
+
+# VERSION is from the timestamp on the source file.
+
+PRGNAM=crc32_simple
+VERSION=${VERSION:-20120911}
+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"
+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
+
+# Look ma, no source directory!
+mkdir -p $PKG/usr/bin
+gcc -Wall $SLKCFLAGS -Wl,-s -o $PKG/usr/bin/$PRGNAM $CWD/$PRGNAM.c
+ln -s $PRGNAM $PKG/usr/bin/crc32
+
+# It's probably overkill, but I wrote a man page for this...
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+ln -s $PRGNAM.1.gz $PKG/usr/man/man1/crc32.1.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
+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/crc32_simple/crc32_simple.info b/system/crc32_simple/crc32_simple.info
new file mode 100644
index 0000000000..ee890f6530
--- /dev/null
+++ b/system/crc32_simple/crc32_simple.info
@@ -0,0 +1,10 @@
+PRGNAM="crc32_simple"
+VERSION="20120911"
+HOMEPAGE="http://home.thep.lu.se/~bjorn/crc/"
+DOWNLOAD="http://home.thep.lu.se/~bjorn/crc/crc32_simple.c"
+MD5SUM="da200e9ec1cb4f9e72ed6bd87cb43017"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/system/crc32_simple/crc32_simple.rst b/system/crc32_simple/crc32_simple.rst
new file mode 100644
index 0000000000..d8842c4e29
--- /dev/null
+++ b/system/crc32_simple/crc32_simple.rst
@@ -0,0 +1,44 @@
+.. RST source for crc32_simple(1) man page. Convert with:
+.. rst2man.py crc32_simple.rst > crc32_simple.1
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 20120911
+.. |date| date::
+
+.. converting from pod:
+.. s/B<\([^>]*\)>/**\1**/g
+.. s/I<\([^>]*\)>/*\1*/g
+
+============
+crc32_simple
+============
+
+---------------------------------
+calculate standard crc32 checksum
+---------------------------------
+
+:Manual section: 1
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+crc32_simple [filenames]
+
+DESCRIPTION
+===========
+
+Simple public domain implementation of the standard CRC32 checksum.
+Outputs the checksum for each file given as a command line argument.
+Invalid file names and files that cause errors are silently skipped.
+The program reads from stdin if it is called with no arguments.
+
+AUTHORS
+=======
+
+crc32_simple was written by Björn Samuelsson.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
diff --git a/system/crc32_simple/slack-desc b/system/crc32_simple/slack-desc
new file mode 100644
index 0000000000..c642cbd537
--- /dev/null
+++ b/system/crc32_simple/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------------------------------------------------------|
+crc32_simple: crc32_simple (calculate crc32 checksum of files)
+crc32_simple:
+crc32_simple: Simple public domain implementation of the standard CRC32 checksum.
+crc32_simple: Outputs the checksum for each file given as a command line argument.
+crc32_simple: Invalid file names and files that cause errors are silently skipped.
+crc32_simple: The program reads from stdin if it is called with no arguments.
+crc32_simple:
+crc32_simple:
+crc32_simple:
+crc32_simple:
+crc32_simple: