Gameshell ecosystem?

Arch for the win !!!

that’s pretty great ! you must know the system and how it’s work much better than me,
here i just done minimal things to got a workable state and certainly made some errors.

any help or advice will be greatly appreciated :sunny:

. - - . - - . - - .

for guys who want submit their own packages you could use this minimal tutorial :

download this archive : http://gs.dread.fr/gs-dstar.tar.gz
uncrunch it, you will find theses files :

[gs@dread gs-dstar]$ find .
.
./DEBIAN
./DEBIAN/postinst
./DEBIAN/control
./home
./home/cpi
./home/cpi/games
./home/cpi/games/dstar
./home/cpi/apps
./home/cpi/apps/Menu
./home/cpi/apps/Menu/21_Indie Games
./home/cpi/apps/Menu/21_Indie Games/dstar.png
./home/cpi/apps/Menu/21_Indie Games/dstar.sh

(here we see that menu entry is hard writed, a big problem on my eyes)

DEBIAN folder is a need, it will contain package info & specific scripts

others files & folder will be data to copy in the system on setup, in this example we see it will only put files in /home/cpi/

DEBIAN folder got here two files control and postinst

control file is a need, containing package information, in this minimal example here is the content :

Package: gs-dstar
Version: 19.3.14.gameJam
Maintainer: r- <r@dude.pm>
Architecture: armhf
Priority: optional
Section: games
Description: catch all sky stars !

(version MUST start with a number and pingu will ignore for now multiline description

postinst is an optional script who will be executed after setup, in dstar i’m only change ownership of sh launch script, but on jazz jack rabbit by example it will download and extract shareware data too :

#!/bin/bash
cd /home/cpi/games/openjazz/
echo "downloading shareware data"
wget -nc https://image.dosgamesarchive.com/games/jazz.zip
unzip jazz.zip
rm -f jazz.zip
chown cpi:cpi /home/cpi/apps/Menu/OpenJazz.sh

(and i’m a sucky packager as i’m not made a prerm script to delete this additional data ;- )

so, to write your own packages you need :

a top folder named with your package name (i conventionally force prefix it with gs-)
inside it all files & folder to append to the target system from root ( / ),
a DEBIAN folder with control file and optionally some script to execute

when all is nice change directory (cd) to the same level of your package top folder and ask dpkg to convert it to a .deb

dpkg-deb -b gs-dstar .

this will create a .deb file named with package name, version & architechture : gs-dstar_19.3.14.gameJam_armhf.deb

transfer the .deb file to your handled using rsync or whatever and try a manual install :

sudo dpkg -i gs-dstar_19.3.14.gameJam_armhf.deb

try remove it using package name :

sudo dpkg -r gs-dstar

if all is ok, release it, in a second time i’ll append it to the repo for making it available through apt-get

for more information on packaging check these debian pages >
https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html
https://www.debian.org/doc/debian-policy/ch-controlfields.html

as a last word, don’t miss chmod +x your scripts and take care about ownership of files, as i’m generate deb files on my server userid will differ from the cpi user of your gameshell, here i need change ownership of sh launch script in postinstall, if you generate deb files from gameshell i think userid will be correct one

2 Likes