aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hinchee <henesy.dev@gmail.com>2024-10-27 23:12:33 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-10-28 06:29:16 +0700
commitb03fde5cec08306bd875fec7e3eec63be632a509 (patch)
tree6e14803a78e878bcc1d5a4997ad56acc59973490
parentdcf5a603d709e16f28582e16ae4ecc99cdc08ac0 (diff)
misc/pc: Added (programmer's calculator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--misc/pc/README3
-rw-r--r--misc/pc/pc.SlackBuild86
-rw-r--r--misc/pc/pc.info10
-rw-r--r--misc/pc/slack-desc19
4 files changed, 118 insertions, 0 deletions
diff --git a/misc/pc/README b/misc/pc/README
new file mode 100644
index 000000000000..b2a079a75e01
--- /dev/null
+++ b/misc/pc/README
@@ -0,0 +1,3 @@
+pc -- programmer's calculator.
+
+pc(1) ported from 9front to some kind of other operating systems.
diff --git a/misc/pc/pc.SlackBuild b/misc/pc/pc.SlackBuild
new file mode 100644
index 000000000000..28136f169f28
--- /dev/null
+++ b/misc/pc/pc.SlackBuild
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+# Slackware build script for pc
+
+# Copyright 2024 Sean Hinchee
+# 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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=pc
+VERSION=${VERSION:-20241026_c3690045}
+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}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz || tar xvf $CWD/snap.tar.gz
+#cd $PRGNAM-$VERSION
+cd $PRGNAM
+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 {} \;
+
+### Build
+
+sed -i 's/\/share//g' Makefile
+DESTDIR=$PKG PREFIX=/usr make
+DESTDIR=$PKG PREFIX=/usr make install
+
+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
+
+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
+cp -a README.md 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
diff --git a/misc/pc/pc.info b/misc/pc/pc.info
new file mode 100644
index 000000000000..21a8b2fd6cc4
--- /dev/null
+++ b/misc/pc/pc.info
@@ -0,0 +1,10 @@
+PRGNAM="pc"
+VERSION="20241026_c3690045"
+HOMEPAGE="http://shithub.us/sigrid/pc/HEAD/info.html"
+DOWNLOAD="http://shithub.us/git/sigrid/pc/c3690045d4e188ffb203fe59f08e26b681d275c8/snap.tar.gz"
+MD5SUM="ac8ceab8e3112dc1152c4d85d3738a16"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Sean Hinchee"
+EMAIL="henesy.dev@gmail.com"
diff --git a/misc/pc/slack-desc b/misc/pc/slack-desc
new file mode 100644
index 000000000000..84e810de6956
--- /dev/null
+++ b/misc/pc/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------------------------------------------------------|
+pc: pc (programmer's calculator)
+pc:
+pc: pc(1) ported from 9front to some kind of other operating systems.
+pc: operating systems.
+pc:
+pc:
+pc:
+pc:
+pc:
+pc: Homepage: https://github.com/plan9-archive/pc
+pc: