diff options
author | B. Watson <urchlay@slackware.uk> | 2023-04-08 02:43:28 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-04-08 09:16:29 +0700 |
commit | 965f8b1316bba277274442c6e0700d857016fa46 (patch) | |
tree | 360523903e02e11e5d2e0a0ed75b8fa8d8589901 /system | |
parent | 883f47ab59076fe17d8b7a9edfe562a9ce49ed5f (diff) |
system/ciderpress-tools: Added (tools for Apple II disk images)
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/ciderpress-tools/README | 11 | ||||
-rw-r--r-- | system/ciderpress-tools/ciderpress-tools.SlackBuild | 142 | ||||
-rw-r--r-- | system/ciderpress-tools/ciderpress-tools.info | 10 | ||||
-rw-r--r-- | system/ciderpress-tools/slack-desc | 19 |
4 files changed, 182 insertions, 0 deletions
diff --git a/system/ciderpress-tools/README b/system/ciderpress-tools/README new file mode 100644 index 0000000000000..de431421abc07 --- /dev/null +++ b/system/ciderpress-tools/README @@ -0,0 +1,11 @@ +ciderpress-tools (tools for working with Apple II disk images) + +CiderPress is a Windows utility for managing Apple II file archives +and disk images. The application has not been ported to Linux, but it +ships with various command-line tools which have been ported. This +package contains cider-getfile, cider-iconv, cider-makedisk, +cider-mdc, cider-packddd, and cider-sstasm. + +See /usr/doc/ciderpress-tools-4.1.0_d3/README-linux.md for usage. +Note that the tools are installed with the cider- prefix, to avoid +conflicts. diff --git a/system/ciderpress-tools/ciderpress-tools.SlackBuild b/system/ciderpress-tools/ciderpress-tools.SlackBuild new file mode 100644 index 0000000000000..d4a22d03bed0f --- /dev/null +++ b/system/ciderpress-tools/ciderpress-tools.SlackBuild @@ -0,0 +1,142 @@ +#!/bin/bash + +# Slackware build script for ciderpress-tools + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# TODO: +# - Write man pages. Or at least, one man page, describing all the +# tools. Not doing this now because I have absolutely no idea +# what some of these tools do (packddd, sstasm?) and because +# there's almost no documentation for the others. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=ciderpress-tools +VERSION=${VERSION:-4.1.1_d1} +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 + +# Slackware VERSION can't have hyphens, so: +SRCNAM=ciderpress +SRCVER="$( echo $VERSION | sed 's,_,-,g' )" + +# Undocumented (broken) option. +# Someday, BZIP2=yes may work. Currently, you can compile with +# bzip2 support, but it doesn't actually work (not a recognized +# disk format). +# In case you're wondering: libnufx supports bzip2, but the diskimg +# library doesn't (and it's non-trivial to add support). +BZIP2=${BZIP2:-no} +if [ "$BZIP2" = "yes" ]; then + CONFIG_ARG="--enable-bzip2" + cat <<EOF +*** +*** BZIP2=yes doesn't work yet. Remove this message if it's been fixed. +*** +EOF + sleep 5 +fi + +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 +rm -rf $SRCNAM-$SRCVER +tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz +cd $SRCNAM-$SRCVER +TOPDIR=$( pwd ) +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 {} \+ + +# Since we override OPT, and it contains this, we gotta add it here: +SLKCFLAGS+=" -DHAVE_CONFIG_H" + +# DRY... +runmake() { + make "$@" OPT="$SLKCFLAGS" +} + +### nufxlib +cd nufxlib + +# We don't need the full panoply of configure args here, they don't +# do anything (and we're not installing this static library). +./configure $CONFIG_ARG + +# Plain "make" fails with parallelism (tries to build the samples +# before the library's been built), but this works: +runmake libnufx.a + +# If we needed the samples: +#runmake samples + +### diskimg, then libhfs +cd $TOPDIR/diskimg +runmake +cd libhfs +runmake + +### Finally, the binaries that use the above libraries. +cd $TOPDIR/linux + +# LIBS and LDFLAGS don't work, surgically implant the bzip2 library +# if requested. +[ "$BZIP2" = "yes" ] && sed -i 's,-lz,-lz -lbz2,' Makefile + +runmake + +### Compile done, no 'make install' so install manually. +# Only going to install the "Sample" and "Bonus" programs that are +# documented in README-linux.md. They all get a cider- prefix because +# they have generic names like "getfile" and "makedisk" and even +# worse, "iconv" (which would conflict with /usr/bin/iconv). +for i in getfile iconv makedisk mdc packddd sstasm; do + install -s -D $i $PKG/usr/bin/cider-$i +done + +cd $TOPDIR + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +# Very sparse documentation. The sed stuff omits the build directions. +sed -n '/^Sample Programs/,$p' README-linux.md > $PKGDOC/README-linux.md +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/system/ciderpress-tools/ciderpress-tools.info b/system/ciderpress-tools/ciderpress-tools.info new file mode 100644 index 0000000000000..b50749dad0699 --- /dev/null +++ b/system/ciderpress-tools/ciderpress-tools.info @@ -0,0 +1,10 @@ +PRGNAM="ciderpress-tools" +VERSION="4.1.1_d1" +HOMEPAGE="http://a2ciderpress.com/" +DOWNLOAD="https://github.com/fadden/ciderpress/archive/v4.1.1-d1/ciderpress-4.1.1-d1.tar.gz" +MD5SUM="2449d265b89c7dd8df0c2ca6e15f3dc5" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/system/ciderpress-tools/slack-desc b/system/ciderpress-tools/slack-desc new file mode 100644 index 0000000000000..704dbcc544a14 --- /dev/null +++ b/system/ciderpress-tools/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------------------------------------------------------| +ciderpress-tools: ciderpress-tools (tools for working with Apple II disk images) +ciderpress-tools: +ciderpress-tools: CiderPress is a Windows utility for managing Apple II file archives +ciderpress-tools: and disk images. The application has not been ported to Linux, but it +ciderpress-tools: ships with various command-line tools which have been ported. This +ciderpress-tools: package contains cider-getfile, cider-iconv, cider-makedisk, +ciderpress-tools: cider-mdc, cider-packddd, and cider-sstasm. +ciderpress-tools: +ciderpress-tools: +ciderpress-tools: +ciderpress-tools: |