You are not logged in.
Hi there.
I'm maintainer of some Teeworlds[1] packages[2] and I'm trying modify the packaging in order to be a install-n-play solution. I'd like some help to figure out what is the best solution
Basically, when running a Teeworlds server, one needs to specify a config file with the syntax "teeworlds_srv -f <configfile>". If the parameter "-f <configfile>", no config file will be found and therefore server won't have your settings. Some mods[3] require specific configurations, so user might get confused on what has to be done in order to make the server go up. And I want that to be easiest as possible.
I would like to package it, automatizing with something like a shell script, environment variable or whatever that allows the end-user will only install the package and then run the 'teeworlds_srv' to play.
[1] https://www.teeworlds.com/
[2] https://aur.archlinux.org/packages/?K=teeworlds
[3] mods = modified servers providing different game types
Any ideas to automatize it properly?
Thanks in advance,
Rafael Ferreira
Offline
I would leave the package alone for the most part and add a series of shell scripts that can launch the different game modes. You could also create a split package, if the number of different settings is not too big. It is important to make sure, that the PKGBUILD is not interactive. It is also not encouraged to use internal variables. However, it is only discouraged, not forbidden by any rules. The user needs to make sure to modify the PKGBUILD according to his needs anyway, so it should not be a problem to introduce a local variable, for that matter.
Offline
If the package provides a fixed number of static configuration files for a fixed number of games modes then you could provide a script that selects the mode based on a user argument, e.g. "teeworlds_srv" with no arguments would return a list of the modes and "teeworlds_srv modeA" would launch the server in mode A.
What I suspect to be more likely is that the user is meant to configure the file him-/herself. In that case, don't provide hand-holding scripts like this. It is not the Arch way. Include a message in the post_install function in the install script directing the user to some online documentation about how to run the server.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Minor observation: the word is 'automate', not 'automatize'.
Offline
Minor observation: the word is 'automate', not 'automatize'.
http://en.wiktionary.org/wiki/automatize
http://en.wiktionary.org/wiki/automate
Wiktionary say both are valid (included automatise).
Well, I suppose that this is somekind of signature, no?
Offline