debian/0002755000000000000000000000000011760177215007177 5ustar debian/rules0000755000000000000000000000517311742624354010264 0ustar #!/usr/bin/make -f # -*- makefile -*- # # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS export CFLAGS = -Wall -g -DDAEMONIZING -DNO_CONSOLE_CLIENT -DRENDERER_PATH=\"/usr/lib/infon-viewer/\" ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp addfiles_in: addfiles-stamp addfiles-stamp: cp debian/addfiles/* . chmod +x infon-wrapper touch addfiles-stamp addfiles_out: for file in debian/addfiles/*; do rm -f $$(basename $$file); done rm -f addfiles-stamp #Architecture build: build-arch build-indep build-arch: build-arch-stamp build-arch-stamp: addfiles_in configure-stamp # Add here commands to compile the arch part of the package. $(MAKE) infond PREFIX=/usr/share/infon-server/ $(MAKE) infon sdl_gui.so null_gui.so PREFIX=/usr/share/infon-viewer/ touch $@ build-indep: build-indep-stamp build-indep-stamp: addfiles_in configure-stamp # Add here commands to compile the indep part of the package. #$(MAKE) doc touch $@ clean: addfiles_out dh_testdir dh_testroot rm -f build-arch-stamp build-indep-stamp # Add here commands to clean up after the build process. $(MAKE) distclean dh_clean install: install-indep install-arch install-indep: dh_testdir dh_testroot dh_prep dh_installdirs -i dh_install -i install-arch: dh_testdir dh_testroot dh_prep dh_installdirs -s #(MAKE) DESTDIR=$(CURDIR)/debian/infon install ln -s ../../../etc/infond/config.lua debian/infon-server/usr/share/infon-server/config.lua ln -s ../../../etc/infond/rules debian/infon-server/usr/share/infon-server/rules dh_install -s # Must not depend on anything. This is to be called by # binary-arch/binary-indep # in another 'make' thread. binary-common: dh_testdir dh_testroot dh_installchangelogs dh_installdocs # dh_installexamples dh_installmenu #dh_installinit dh_installman dh_metainit dh_link dh_strip dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb # Build architecture independant packages using the common target. binary-indep: build-indep install-indep $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common # Build architecture dependant packages using the common target. binary-arch: build-arch install-arch $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common #binary: binary-arch binary-indep binary: binary-arch .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure debian/infon-viewer.manpages0000644000000000000000000000001710634772314013320 0ustar debian/infon.6 debian/infon-server.install0000644000000000000000000000026211617444657013212 0ustar infond usr/games level/ usr/share/infon-server/ api/ usr/share/infon-server/ infond.lua player.lua server.lua usr/share/infon-server/ rules/ etc/infond/ config.lua etc/infond/ debian/infond.80000644000000000000000000000353110634772314010545 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH INFOND 8 "November 21, 2006" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME infond \- Program bugs to compete for food and survival .SH SYNOPSIS .B infond .RI [ -d ] .SH DESCRIPTION This manual page documents briefly the .B infond command. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBinfond\fP is the server for the infon game. Infon is a game which simulates the live of simple bugs who eat, propagate, eat each other and evolve. The players can not control the bugs directly but write their "intelligence" in the simple script language lua and upload it to the game using a plain telnet connection. The code can then be modified even while the game is running. The server will be accessible on port 1234 for telnet clients as well as for graphical clients, such as .BR infon (6). It can be configured by editing the file .BR /etc/infond.lua . .SH OPTIONS .TP .B \-d Runs the program daemonized. Requires root. .SH SEE ALSO .BR infon (6) .SH AUTHOR infon was written by Florian Wesch .PP This manual page was written by Joachim Breitner , for the Debian project (but may be used by others). debian/infon-server.init0000644000000000000000000000226411617444731012504 0ustar #! /bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/games/infond DAEMON_OPTS=-d NAME=infond DESC=infond test -x $DAEMON || exit 0 # Include infon defaults if available if [ -f /etc/default/infon-server ] ; then . /etc/default/infon-server fi test "$START_INFOND" = "1" || exit 0 set -e case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --pidfile /var/run/$NAME.pid \ --chdir /usr/share/infon-server/ \ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/$NAME.pid \ --exec $DAEMON echo "$NAME." ;; force-reload) start-stop-daemon --stop --test --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON \ && $0 restart \ || exit 0 ;; restart) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON sleep 1 start-stop-daemon --start --pidfile /var/run/$NAME.pid \ --chdir /usr/share/infon-server/ \ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 debian/control0000644000000000000000000000340611760177144010604 0ustar Source: infon Section: games Priority: extra Maintainer: Joachim Breitner Build-Depends: debhelper (>= 9), libevent-dev, zlib1g-dev, libreadline-dev, libncurses-dev, libsdl1.2-dev, libsdl-gfx1.2-dev, libsdl-image1.2-dev, libsdl-sge-dev, dh-metainit Standards-Version: 3.9.3 Homepage: http://infon.dividuum.de/ XS-Vcs-Svn: http://infon.dividuum.de/svn/infon/trunk/contrib/debian Package: infon-server Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, metainit Description: Program bugs to compete for food and survival - Server Infon is a game which simulates the live of simple bugs who eat, propagate, eat each other and evolve. The players can not control the bugs directly but write their “intelligence” in the simple script language lua and upload it to the game using a plain telnet connection. The code can then be modified even while the game is running. . This package contains the infon server which hosts the game. To upload code to it, you only need a telnet client. To be able to view the game, see the infon-viewer package. Package: infon-viewer Architecture: any Recommends: infon-devel Suggests: infon-server Depends: ${shlibs:Depends}, ${misc:Depends}, ssft, zenity | kdebase-bin Description: Program bugs to compete for food and survival - GUI Infon is a game which simulates the live of simple bugs who eat, propagate, eat each other and evolve. The players can not control the bugs directly but write their “intelligence” in the simple script language lua and upload it to the game using a plain telnet connection. The code can then be modified even while the game is running. . This package contains the graphical client to view the game in progress. To host a game, see the infon-server package. debian/source/0002755000000000000000000000000011742624374010502 5ustar debian/source/format0000644000000000000000000000001411742624354011704 0ustar 3.0 (quilt) debian/infon.60000644000000000000000000000364011617444230010373 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH INFON 6 "November 21, 2006" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME infon \- Program bugs to compete for food and survival .SH SYNOPSIS infon [\fB\-r\fR ] [\fB\-f\fR] [\fB\-x\fR ] [\fB\-y\fR ] [\fB\-v\fR] [\fB\-h\fR] .SH DESCRIPTION \fBinfon\fP is the graphical viewers for the infon game. Infon is a game which simulates the live of simple bugs who eat, propagate, eat each other and evolve. The players can not control the bugs directly but write their "intelligence" in the simple script language lua and upload it to the game using a plain telnet connection. The code can then be modified even while the game is running. You have to specify the hostname of the server to connect to on the command line. .SH OPTIONS .TP .B -r \fI\fR Renderer to use (sdl_gui,...) .TP .B -x \fI\fR Initial screen width .TP .B -h \fI\fR Initial screen height .TP .B -f Start in fullscreen mode .TP .B -v Display version information .TP .B -h This help .TP .B server[:port] The server (and port) to connect to. If no port is given, 1234 is used. .SH SEE ALSO .BR infond (8) .SH AUTHOR infon was written by Florian Wesch .PP This manual page was written by Joachim Breitner , for the Debian project (but may be used by others). debian/infon-viewer.install0000644000000000000000000000031411617444662013177 0ustar infon usr/games infon-wrapper usr/share/infon-viewer gfx/theme.png usr/share/infon-viewer/gfx gfx/5x7.fnt usr/share/infon-viewer/gfx gfx/font.png usr/share/infon-viewer/gfx *_gui.so usr/lib/infon-viewer debian/copyright0000644000000000000000000000663311742624354011141 0ustar This package was debianized by Joachim Breitner on Tue, 21 Nov 2006 09:26:56 +0000. It was downloaded from http://infon.dividuum.de/ Upstream Author: Florian Wesch # # infon game: # Copyright: Copyright (C) 2006 Florian Wesch License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian systems, the complete text of the GNU General Public License, version 2 can be found in '/usr/share/common-licenses/GPL-2'. # # gfx/5x7.fnt is taken from the SDL_glx project: # Copyright: Andreas Schiffler This file is available under the GNU Library General Public License. On Debian GNU/Linux systems, the complete text of the GNU Library General Public License is found in `/usr/share/common-licenses/LGPL-2'. # # gfx/font.png is taken from the SDL_sge project: # Copyright: Anders Lindström This file is available under the GNU Library General Public License. On Debian GNU/Linux systems, the complete text of the GNU Library General Public License is found in `/usr/share/common-licenses/LGPL-2'. # # included lua source: # Lua is licensed under the terms of the MIT license reproduced below. This means that Lua is free software and can be used for both academic and commercial purposes at absolutely no cost. For details and rationale, see http://www.lua.org/license.html . =============================================================================== Copyright (C) 1994-2006 Lua.org, PUC-Rio. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =============================================================================== # # Debian packaging, including daemonize.h # The Debian packaging is Copyright (C) 2006, Joachim Breitner and is licensed under the GPL, see "/usr/share/common-licenses/GPL-2". debian/compat0000644000000000000000000000000211742624354010374 0ustar 9 debian/infon-viewer.menu0000644000000000000000000000020610634772314012471 0ustar ?package(infon-viewer):needs="X11" section="Games/Simulation"\ title="Infon viewer" command="/usr/share/infon-viewer/infon-wrapper" debian/infon-server.dirs0000644000000000000000000000002710634772314012474 0ustar usr/share/infon-server debian/addfiles/0002755000000000000000000000000011617444707010756 5ustar debian/addfiles/daemonize.h0000644000000000000000000000505410634772314013100 0ustar /* Copyright (c) 2006 Joachim Breitner . All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #include #include #include #include #include #define PIDFILE "/var/run/infond.pid" void undaemonize() { int ret; ret = unlink(PIDFILE); if (ret == -1) { perror("Could not delete " PIDFILE); // exit(1); } } void daemonize(int argc, char *argv[]) { int ret; if ( ! (argc > 1 && strcmp(argv[1], "-d") == 0) ) { return; } /* init script has to change directory */ /* ret = chdir("/usr/share/infon-server/"); if (ret == -1) { perror("Could not change to data directory"); exit(1); } */ int pid = fork(); if (pid == -1) { // error perror("Could not fork"); exit(1); } if (pid) { // parent process FILE *pidfile = fopen(PIDFILE,"w"); if (pidfile == NULL) { perror("Could not open pidfile"); exit(1); } ret = fprintf(pidfile,"%d\n",pid); if (ret < 0) { perror("Could not write to pidfile"); } ret = fclose(pidfile); if (ret != 0) { perror("Could not close pidfile"); } exit(EXIT_SUCCESS); } else { struct passwd *pwinfo = getpwnam("nobody"); if (pwinfo == NULL) { perror("Could not find user nobody"); exit (1); } if (setuid(pwinfo->pw_uid) == -1) { perror("Could not change userid"); exit(1); } freopen("/dev/null","r",stdin); freopen("/dev/null","w",stdout); freopen("/dev/null","w",stderr); } atexit(undaemonize); } debian/addfiles/infon-wrapper0000644000000000000000000000036511617444707013472 0ustar #!/bin/bash . /usr/bin/ssft.sh [ -n "$SSFT_FRONTEND" ] || SSFT_FRONTEND="$( ssft_choose_frontend )" SSFT_DEFAULT="infon.dividuum.de:1234" if ssft_read_string "Infon" "Connect to server:" then /usr/games/infon $SSFT_RESULT else exit 1 fi debian/infon-server.metainit0000644000000000000000000000004511617444675013355 0ustar Exec: /usr/games/infond No-Auto: Yes debian/patches/0002755000000000000000000000000011742624606010627 5ustar debian/patches/20-no-static-binary0000755000000000000000000000120111742624354014147 0ustar From: Joachim Breitner Subject: No description. diff -urNad infon-0~r198~/Makefile infon-0~r198/Makefile --- infon-0~r198~/Makefile 2007-03-31 01:13:42.000000000 +0200 +++ infon-0~r198/Makefile 2009-09-13 15:30:52.000000000 +0200 @@ -179,7 +179,6 @@ $(INFOND_EXECUTABLE): infond.o server.o listener.o map.o path.o misc.o packet.o player.o world.o creature.o scroller.o game.o pinger.o $(CC) $^ $(LDFLAGS) -o $@ - $(CC) $^ $(LDFLAGS) -static -o $@-static $(INFON_EXECUTABLE): infon.o client.o packet.o misc.o client_player.o client_world.o client_creature.o client_game.o renderer.o $(CC) $^ $(LDFLAGS) -o $@ debian/patches/series0000644000000000000000000000004211742624606012036 0ustar 10-config.lua 20-no-static-binary debian/patches/10-config.lua0000755000000000000000000000160411742624354013017 0ustar From: Joachim Breitner Subject: No description. diff -urNad infon-0~r198~/config.lua infon-0~r198/config.lua --- infon-0~r198~/config.lua 2007-06-01 21:39:54.000000000 +0200 +++ infon-0~r198/config.lua 2007-06-01 21:41:56.135930724 +0200 @@ -1,6 +1,10 @@ -- ip and port to bind listen socket -listenaddr = "0.0.0.0" +listenaddr = "127.0.0.1" listenport = 1234 +-- uncomment the following line to enable other players +-- to connect over the network +-- listenaddr = "0.0.0.0" + -- password for the 'shell' command. disabled if empty or missing. debugpass = "" @@ -12,7 +16,7 @@ nokickpass = "" -- message displayed every 10 seconds -join_info = "this message can be changed in config.lua" +join_info = "this message can be changed in /etc/infond/config.lua" -- maps to rotate maps = {"foo", "gpn", "water", "cn", "owl", "stripeslice", "castle", "infon" } debian/infon-server.manpages0000644000000000000000000000002010634772314013317 0ustar debian/infond.8 debian/changelog0000644000000000000000000000541011760177215011047 0ustar infon (0~r198-8) unstable; urgency=low * Depend on libsdl-image1.2-dev (Closes: #674360) -- Joachim Breitner Sat, 26 May 2012 18:02:21 +0200 infon (0~r198-7) unstable; urgency=low * Depend on libncurses-dev (Closes: #669302) -- Joachim Breitner Thu, 19 Apr 2012 09:46:26 +0200 infon (0~r198-6) unstable; urgency=low Got some nice packaging cleanup by Jari Aalto, thanks for that (Closes: 668937): [ Jari Aalto ] * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt". * Update to Standards-Version to 3.9.3 and debhelper to 9. * Use dh_prep in rules file. * Fix copyright-refers-to-symlink-license (Lintian). * Fix copyright-with-old-dh-make-debian-copyright (Lintian). * Fix debian-rules-ignores-make-clean-error (Lintian). -- Joachim Breitner Sun, 15 Apr 2012 22:01:33 +0200 infon (0~r198-5) unstable; urgency=low * Reorganize targets in debian/rules (Closes: #666291) -- Joachim Breitner Wed, 04 Apr 2012 21:32:47 +0200 infon (0~r198-4) unstable; urgency=low * Depend on kdebase-bin instead of kdebase, as pointed out by Daniel Roschka * Put binaries in /usr/games -- Joachim Breitner Sun, 07 Aug 2011 10:21:04 +0200 infon (0~r198-3) unstable; urgency=low * Depend on libreadline-dev instead of libreadline5-dev * Extend infon(6) manpage (Closes: #445647) -- Joachim Breitner Sun, 13 Sep 2009 15:35:28 +0200 infon (0~r198-2) unstable; urgency=low * Uses metainit for the init script -- Joachim Breitner Mon, 16 Jul 2007 16:05:19 +0200 infon (0~r198-1) unstable; urgency=low * New upstream release -- Joachim Breitner Fri, 01 Jun 2007 21:39:34 +0200 infon (0~r139-1) unstable; urgency=low * New upstream release * Dropping patches/20-quieten-infond.dpatch, upstream supports a flag for that * Upload to unstable, since etch is frozen. * Sponsored by http://www.aiti-kace.com.gh/ -- Joachim Breitner Fri, 22 Dec 2006 16:35:26 +0000 infon (0~r99-2) experimental; urgency=low * missing build-dep on dpatch (Closes: #402608) (I thought I had checked it in pbuilder. I thought wrongly) -- Joachim Breitner Mon, 11 Dec 2006 18:02:29 +0000 infon (0~r99-1) experimental; urgency=low * New upstream version * Added XS-Vcs-Svn header * Sponsored by AITI-KACE, Accra, Ghana -- Joachim Breitner Mon, 27 Nov 2006 13:29:51 +0000 infon (0~r89-1) experimental; urgency=low * Initial release * Upload to experimental as per release manager’s wish * Sponsored by AITI-KACE, Accra, Ghana -- Joachim Breitner Tue, 21 Nov 2006 09:26:56 +0000 debian/infon-server.default0000644000000000000000000000024610634772314013162 0ustar # If you want the infon server to run, switch this to 1. # You might also want to enable access from your network # by editing /etc/infond/config.lua START_INFOND=0