183 lines
4.9 KiB
Bash
Executable file
183 lines
4.9 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
CWD=$(pwd)
|
|
TAG=${TAG:-gwh}
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
TMP=/tmp/$TAG
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
VERSION=${VERSION:-1.0}
|
|
ARCH=${ARCH:-${ARCH:-dosbox}}
|
|
BUILD=${BUILD:-1}
|
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM}
|
|
|
|
mkdir -p $REPOSITORY
|
|
|
|
rm -rf $PKG $TMP/${PRGNAM}-${VERSION}
|
|
|
|
mkdir -p $TMP
|
|
cd $TMP
|
|
|
|
mkdir -p $PKG/usr/games/ $PKG/usr/share/games/ $PKG/usr/doc/$PRGNAM
|
|
cd $PKG/usr/share/games
|
|
[ ! -e $REPOSITORY/Blockout_1989.zip ] && wget -c https://cors.archive.org/cors/msdos_Blockout_1989/Blockout_1989.zip -O $REPOSITORY/Blockout_1989.zip
|
|
unzip $REPOSITORY/Blockout_1989.zip
|
|
mv blkout $PRGNAM
|
|
cd $PRGNAM
|
|
touch $PKG/usr/share/games/Blockout/BLSCORE.IDX
|
|
chmod a+w $PKG/usr/share/games/$PRGNAM/*
|
|
|
|
cat <<EOF > dosbox.config
|
|
[sdl]
|
|
# fullscreen -- Start dosbox directly in fullscreen.
|
|
# autolock -- Mouse will automatically lock, if you click on the screen.
|
|
# sensitiviy -- Mouse sensitivity.
|
|
# waitonerror -- Wait before closing the console if dosbox has an error.
|
|
|
|
fullscreen=false
|
|
autolock=false
|
|
sensitivity=100
|
|
waitonerror=true
|
|
|
|
[dosbox]
|
|
# language -- Select another language file.
|
|
# memsize -- Amount of memory dosbox has in megabytes.
|
|
|
|
language=
|
|
memsize=16
|
|
|
|
[render]
|
|
# frameskip -- How many frames dosbox skips before drawing one.
|
|
# snapdir -- Directory where screenshots get saved.
|
|
# scaler -- Scaler used to enlarge/enhance low resolution modes.
|
|
# Supported are none,normal2x,advmame2x
|
|
# scaler = none | normal2x | normal3x | tv2x | tv3x | rgb2x | rgb3x | scan2x | scan3x | advmame2x | advmame3x | advinterp2x | advinterp3x | 2xsai | super2xsai | supereagle | hq2x | hq3x
|
|
frameskip=0
|
|
snapdir=snaps
|
|
scaler=hq3x
|
|
|
|
[cpu]
|
|
# cycles -- Amount of instructions dosbox tries to emulate each millsecond.
|
|
# Setting this higher than your machine can handle is bad!
|
|
|
|
#cycles=2583
|
|
|
|
[mixer]
|
|
# nosound -- Enable silent mode, sound is still emulated though.
|
|
# rate -- Mixer sample rate, setting any devices higher than this will
|
|
# probably lower their sound quality.
|
|
# blocksize -- Mixer block size, larger blocks might help sound stuttering
|
|
# but sound will also be more lagged.
|
|
# wavedir -- Directory where saved sound output goes when you use the
|
|
# sound record key-combination, check README file.
|
|
|
|
nosound=false
|
|
rate=22050
|
|
blocksize=2048
|
|
wavedir=waves
|
|
|
|
[midi]
|
|
# mpu401 -- Enable MPU-401 Emulation.
|
|
# device -- Device that will receive the MIDI data from MPU-401.
|
|
# This can be default,alsa,oss,win32,coreaudio,none.
|
|
# config -- Special configuration options for the device.
|
|
|
|
#mpu401=true
|
|
device=default
|
|
config=
|
|
|
|
[sblaster]
|
|
# sblaster -- Enable the soundblaster emulation.
|
|
# base,irq,dma -- The IO/IRQ/DMA address of the soundblaster.
|
|
# sbrate -- Sample rate of soundblaster emulation.
|
|
# adlib -- Enable the adlib emulation.
|
|
# adlibrate -- Sample rate of adlib emulation.
|
|
# cms -- Enable the Creative Music System/Gameblaster emulation.
|
|
# Enabling both the adlib and cms might give conflicts!
|
|
# cmsrate -- Sample rate of cms emulation.
|
|
|
|
sblaster=true
|
|
base=220
|
|
irq=7
|
|
dma=1
|
|
sbrate=22050
|
|
adlib=true
|
|
adlibrate=22050
|
|
cms=false
|
|
cmsrate=22050
|
|
|
|
[speaker]
|
|
# pcspeaker -- Enable PC-Speaker emulation.
|
|
# pcrate -- Sample rate of the PC-Speaker sound generation.
|
|
# tandy -- Enable Tandy 3-Voice emulation.
|
|
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
|
|
# disney -- Enable Disney Sound Source emulation.
|
|
|
|
pcspeaker=true
|
|
pcrate=22050
|
|
#tandy=true
|
|
tandyrate=22050
|
|
disney=true
|
|
|
|
[bios]
|
|
# Nothing to setup yet!
|
|
|
|
|
|
[dos]
|
|
# xms -- Enable XMS support.
|
|
# ems -- Enable EMS support.
|
|
# dpmi -- Enable builtin DPMI host support.
|
|
# This might help in getting some games to work, but might crash others.
|
|
# So be sure to try both settings.
|
|
|
|
xms=true
|
|
ems=true
|
|
dpmi=true
|
|
|
|
[autoexec]
|
|
# Lines in this section will be run at startup.
|
|
mount f /usr/share/games/$PRGNAM
|
|
f:
|
|
BL.EXE
|
|
exit
|
|
EOF
|
|
|
|
cd $PKG/usr/games/
|
|
cat <<EOF > $PRGNAM.sh
|
|
#!/bin/bash
|
|
dosbox -conf /usr/share/games/$PRGNAM/dosbox.config \$*
|
|
EOF
|
|
chmod +x $PRGNAM.sh
|
|
|
|
chown -R root:root $PKG/*
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
|
# 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 ':'.
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
${PRGNAM}: ${PRGNAM} ($PRGNAM running in DosBox)
|
|
${PRGNAM}:
|
|
${PRGNAM}: https://archive.org/details/msdos_$PRGNAM_1989
|
|
${PRGNAM}:
|
|
${PRGNAM}:
|
|
${PRGNAM}:
|
|
${PRGNAM}:
|
|
${PRGNAM}:
|
|
${PRGNAM}:
|
|
${PRGNAM}: see /usr/doc/${PRGNAM}-${VERSION} for more.
|
|
${PRGNAM}:
|
|
EOF
|
|
|
|
cd $PKG
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
|
/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}$TAG.txz
|