Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system/cc1541: Added (Commodore floppy disk images). #6750

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions system/cc1541/01-fix-manpage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
commit 6d53fb4cd3939f0b1ede46cff7ab74e13c87aacf
Author: Claus <[email protected]>
Date: Wed Feb 28 21:48:51 2024 +0100

Fix build buster for man page and update copyright year

diff --git a/cc1541.1.txt.in b/cc1541.1.txt.in
index 1f7c68c..271d326 100644
--- a/cc1541.1.txt.in
+++ b/cc1541.1.txt.in
@@ -12,13 +12,7 @@ Björn Esser
== Name

cc1541 - A tool for creating Commodore floppy disk images in
-D64 (35 and 40 track), D71 or D81 format, providing a lot of
-control over the layout of the data on the disk. It also
-supports writing the file format for the Transwarp loader by
-Krill.
-
-Find a more extensive online documentation here:
-https://acoustic-velocity.com/cc1541
+D64, D71 or D81 format

== Synopsis

@@ -216,7 +210,7 @@ https://bitbucket.org/PTV_Claus/cc1541/issues/new

== License

-Copyright (C) 2008-2021 {author}. +
+Copyright (C) 2008-2024 {author}. +

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
4 changes: 4 additions & 0 deletions system/cc1541/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cc1541 is a tool for creating Commodore floppy disk images in D64
(35 and 40 track), D71 or D81 format, providing a lot of control over
the layout of the data on the disk. It also supports writing the file
format for the Transwarp loader by Krill.
98 changes: 98 additions & 0 deletions system/cc1541/cc1541.SlackBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#!/bin/bash

# Slackware build script for cc1541

# Copyright 2024 ilmich < ardutu at gmail dot com >
# 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=cc1541
VERSION=${VERSION:-4.2}
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"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
elif [ "$ARCH" = "aarch64" ]; then
SLKCFLAGS="-O2 -fPIC"
else
SLKCFLAGS="-O2"
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
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 {} \;

# patch from https://aur.archlinux.org/cgit/aur.git/tree/asciidoc.patch?h=cc1541
patch -p1 < $CWD/01-fix-manpage.patch

CFLAGS=$SLKCFLAGS make install bindir=$PKG/usr/bin mandir=$PKG/usr/man ENABLE_MAN=1

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.txt \
$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
10 changes: 10 additions & 0 deletions system/cc1541/cc1541.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PRGNAM="cc1541"
VERSION="4.2"
HOMEPAGE="https://acoustic-velocity.com/cc1541"
DOWNLOAD="https://bitbucket.org/ptv_claus/cc1541/downloads/cc1541-4.2.tar.gz"
MD5SUM="d0f752b56485766642031f6197d56e16"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="ilmich"
EMAIL="[email protected]"
19 changes: 19 additions & 0 deletions system/cc1541/slack-desc
Original file line number Diff line number Diff line change
@@ -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------------------------------------------------------|
cc1541: cc1541 (tool for creating Commodore 1541 Floppy disk images)
cc1541:
cc1541: cc1541 is a tool for creating Commodore 1541 Floppy disk images
cc1541: in D64, D71 or D81 format with custom sector interleaving etc.
cc1541:
cc1541:
cc1541:
cc1541:
cc1541: Homepage: https://acoustic-velocity.com/cc1541/
cc1541:
cc1541: