# Gameshell ecosystem?

**URL:** <https://forum.clockworkpi.com/t/gameshell-ecosystem/3209>\
**Category:** Firmware and Apps\
**Created:** [March 15, 2019, 1:14pm UTC](https://forum.clockworkpi.com/t/gameshell-ecosystem/3209 "2019-03-15T13:14:08Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![r043v](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/r043v/32/672_2.png) [@r043v](https://forum.clockworkpi.com/u/r043v)\
**Post date:** [March 20, 2019, 3:09am UTC](https://forum.clockworkpi.com/t/gameshell-ecosystem/3209/6 "2019-03-20T03:09:52Z")

</div>

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 ☀

. - - . - - . - - .

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](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/manuals/debian-faq/ch-pkg_basics.en.html)  
[https://www.debian.org/doc/debian-policy/ch-controlfields.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

---

_[View the full topic](https://forum.clockworkpi.com/t/gameshell-ecosystem/3209)._
