From 7eed4f4162bcffa3b565470266a15e381e241d70 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 11 Jan 2022 12:25:05 -0500 Subject: [PATCH] system/nrg2cue: Added (convert .nrg CD images) Signed-off-by: Willy Sudiarto Raharjo --- system/nrg2cue/README | 9 ++++ system/nrg2cue/nrg2cue.SlackBuild | 76 +++++++++++++++++++++++++++++++ system/nrg2cue/nrg2cue.info | 10 ++++ system/nrg2cue/slack-desc | 19 ++++++++ 4 files changed, 114 insertions(+) create mode 100644 system/nrg2cue/README create mode 100644 system/nrg2cue/nrg2cue.SlackBuild create mode 100644 system/nrg2cue/nrg2cue.info create mode 100644 system/nrg2cue/slack-desc diff --git a/system/nrg2cue/README b/system/nrg2cue/README new file mode 100644 index 0000000000..14bdadc2a2 --- /dev/null +++ b/system/nrg2cue/README @@ -0,0 +1,9 @@ +nrg2cue (convert Nero .nrg CD images to bin/cue) + +Usage: nrg2cue [output.ISO] + +If you specify the output ISO file, it will be generated too. + +If you're wondering "Where is the .bin file?", the answer is that the +generated .cue file uses the .nrg image as the "bin" file, since it +contains all the data in the image anyway. diff --git a/system/nrg2cue/nrg2cue.SlackBuild b/system/nrg2cue/nrg2cue.SlackBuild new file mode 100644 index 0000000000..a59efe30a6 --- /dev/null +++ b/system/nrg2cue/nrg2cue.SlackBuild @@ -0,0 +1,76 @@ +#!/bin/bash + +# Slackware build script for nrg2cue + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=nrg2cue +VERSION=${VERSION:-0.1.1} +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 + +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" + 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 +cd $PRGNAM-$VERSION +unzip -p $CWD/$PRGNAM.zip $PRGNAM.c > $PRGNAM.c + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION + +# This is just a single C source file, with no documentation or even a +# Makefile. +mkdir -p $PKG/usr/bin $PKGDOC +${CC:-gcc} $SLKCFLAGS -Wl,-s -o $PKG/usr/bin/$PRGNAM $PRGNAM.c + +# The license is GPL, in comments in the source. +sed -n '2,18p' $PRGNAM.c > $PKGDOC/LICENSE + +# Include our own README, it may be helpful. +cat $CWD/README > $PKGDOC/README + +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:-tgz} diff --git a/system/nrg2cue/nrg2cue.info b/system/nrg2cue/nrg2cue.info new file mode 100644 index 0000000000..fafd305962 --- /dev/null +++ b/system/nrg2cue/nrg2cue.info @@ -0,0 +1,10 @@ +PRGNAM="nrg2cue" +VERSION="0.1.1" +HOMEPAGE="https://aluigi.altervista.org/mytoolz.htm" +DOWNLOAD="https://aluigi.altervista.org/mytoolz/nrg2cue.zip" +MD5SUM="eb4d8416d18f9ee59f9f3f21016b6820" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/system/nrg2cue/slack-desc b/system/nrg2cue/slack-desc new file mode 100644 index 0000000000..7e6212f8d4 --- /dev/null +++ b/system/nrg2cue/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------------------------------------------------------| +nrg2cue: nrg2cue (convert Nero .nrg CD images to bin/cue) +nrg2cue: +nrg2cue: Usage: nrg2cue [output.ISO] +nrg2cue: +nrg2cue: If you specify the output ISO file, it will be generated too. +nrg2cue: +nrg2cue: +nrg2cue: +nrg2cue: +nrg2cue: +nrg2cue: