mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
development/pcbasic: Added (GW-BASIC interpreter)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
9d9912343a
commit
8dd769515e
5 changed files with 149 additions and 0 deletions
10
development/pcbasic/README
Normal file
10
development/pcbasic/README
Normal file
|
@ -0,0 +1,10 @@
|
|||
pcbasic (GW-BASIC interpreter)
|
||||
|
||||
pcbasic is a free, cross-platform emulator for the GW-BASIC family of
|
||||
interpreters. It can run classic games and legacy BASIC applications
|
||||
designed for MS-DOS systems, IBM PC, PCjr or Tandy 1000. It aims for
|
||||
bug-for-bug compatibility with Microsoft GW-BASIC. It runs ASCII,
|
||||
tokenised and protected BASIC programs and supports the Microsoft
|
||||
Binary Format for full interchangeability of data files.
|
||||
|
||||
Full documentation and sample code are in "/usr/doc/pcbasic-$VERSION".
|
9
development/pcbasic/doinst.sh
Normal file
9
development/pcbasic/doinst.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
|
||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
99
development/pcbasic/pcbasic.SlackBuild
Normal file
99
development/pcbasic/pcbasic.SlackBuild
Normal file
|
@ -0,0 +1,99 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Slackware build script for pcbasic
|
||||
|
||||
# Written by B. Watson (urchlay@slackware.uk)
|
||||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
# The .deb is a "binary" package, but this is pure python, so this is
|
||||
# noarch. The python modules live in /usr/share/$PRGNAM and the main
|
||||
# /usr/bin/$PRGNAM script has been patched to load the modules from
|
||||
# there.
|
||||
|
||||
# The html doc isn't included in the .deb; it has to be generated
|
||||
# by checking out the source tree and running "python3 -m make",
|
||||
# and it requires python/lxml and all its deps. So I just included a
|
||||
# pre-generated copy of it to make things simpler.
|
||||
|
||||
# PyAudio and pygame are optional runtime deps, but I didn't mention
|
||||
# them in the README because "pcbasic --interface=pygame" says
|
||||
# "WARNING: The `pygame` interface is deprecated", and because
|
||||
# I couldn't get PyAudio (sound=portaudio in the config file) to
|
||||
# actually make any sound.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=pcbasic
|
||||
VERSION=${VERSION:-2.0.7}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
ARCH=noarch
|
||||
|
||||
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
|
||||
|
||||
# Extract the .deb directly to $PKG, so there's no source directory.
|
||||
# Feel free to use the "ar p ..." command in your own SlackBuild: it
|
||||
# extracts a .deb without creating any temp files.
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $PKG
|
||||
ar p $CWD/python3-${PRGNAM}_${VERSION}_all.deb data.tar.xz | tar xvfJ -
|
||||
tar xvf $CWD/$PRGNAM-doc-$VERSION.tar.xz
|
||||
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 {} \+
|
||||
|
||||
# The .deb puts stuff in /usr/local, which I bet is a violation of Debian's
|
||||
# standards. It definitely violates ours. Note that the man page is installed
|
||||
# to usr/local/share/man/pcbasic.1.gz (with no man1/ dir). Also, they
|
||||
# have a bunch of symlinks for the various python 3.x versions, where 3.6
|
||||
# is the one that *isn't* a link.
|
||||
# Fortunately, the paths aren't hardcoded in the code, and we can move things
|
||||
# around as needed, without breaking everything.
|
||||
PYLIB=usr/share/$PRGNAM
|
||||
ICONDIR=usr/share/icons/hicolor/32x32/apps
|
||||
APPDIR=usr/share/applications
|
||||
|
||||
mkdir -p usr/bin usr/man/man1 $PYLIB $ICONDIR $APPDIR
|
||||
mv usr/local/bin/* usr/bin
|
||||
mv usr/local/share/man/* usr/man/man1
|
||||
mv usr/local/lib/python3.6/dist-packages/* $PYLIB
|
||||
mv usr/local/share/applications/* $APPDIR
|
||||
mv usr/local/share/icons/* $ICONDIR
|
||||
rm -rf usr/local # no files left in this dir anyway...
|
||||
rm -rf usr/share/pcbasic/pcbasic/lib # don't need this.
|
||||
|
||||
# Make the main program look in our private dir for its python modules.
|
||||
sed -i -e '2iimport sys' \
|
||||
-e "2isys.path.insert(0, '/usr/share/pcbasic')" \
|
||||
usr/bin/pcbasic
|
||||
|
||||
# Get rid of hardcoded incorrect path.
|
||||
sed -i 's,/usr/local/bin/,,' $APPDIR/*.desktop
|
||||
|
||||
# Old-style icon.
|
||||
mkdir -p $PKG/usr/share/pixmaps
|
||||
ln -s ../icons/hicolor/32x32/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
|
||||
|
||||
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
ln -s ../../share/$PRGNAM/$PRGNAM-$VERSION.dist-info/licenses/LICENSE.md $PKGDOC
|
||||
ln -s ../../share/$PRGNAM/$PRGNAM/data/programs $PKGDOC
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|
12
development/pcbasic/pcbasic.info
Normal file
12
development/pcbasic/pcbasic.info
Normal file
|
@ -0,0 +1,12 @@
|
|||
PRGNAM="pcbasic"
|
||||
VERSION="2.0.7"
|
||||
HOMEPAGE="https://robhagemans.github.io/pcbasic/"
|
||||
DOWNLOAD="https://github.com/robhagemans/pcbasic/releases/download/v2.0.7/python3-pcbasic_2.0.7_all.deb \
|
||||
https://slackware.uk/~urchlay/src/pcbasic-doc-2.0.7.tar.xz"
|
||||
MD5SUM="c93e3826b38527d7b067ee6db49aa8ab \
|
||||
5e7b963fec9ad40db1ba406e8505237c"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="B. Watson"
|
||||
EMAIL="urchlay@slackware.uk"
|
19
development/pcbasic/slack-desc
Normal file
19
development/pcbasic/slack-desc
Normal file
|
@ -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------------------------------------------------------|
|
||||
pcbasic: pcbasic (GW-BASIC interpreter)
|
||||
pcbasic:
|
||||
pcbasic: pcbasic is a free, cross-platform emulator for the GW-BASIC family of
|
||||
pcbasic: interpreters. It can run classic games and legacy BASIC applications
|
||||
pcbasic: designed for MS-DOS systems, IBM PC, PCjr or Tandy 1000. It aims for
|
||||
pcbasic: bug-for-bug compatibility with Microsoft GW-BASIC. It runs ASCII,
|
||||
pcbasic: tokenised and protected BASIC programs and supports the Microsoft
|
||||
pcbasic: Binary Format for full interchangeability of data files.
|
||||
pcbasic:
|
||||
pcbasic:
|
||||
pcbasic:
|
Loading…
Reference in a new issue