mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 03:14:50 +00:00
Added all debian changes
git-svn-id: file:///srv/svn/joey/bsdgames-trunk@5095 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.8 1998/09/15 13:43:34 frueauf Exp $ */
|
||||
/* $NetBSD: main.c,v 1.9 1999/02/10 12:29:47 hubertf Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.8 1998/09/15 13:43:34 frueauf Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.9 1999/02/10 12:29:47 hubertf Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@@ -53,7 +53,6 @@ __RCSID("$NetBSD: main.c,v 1.8 1998/09/15 13:43:34 frueauf Exp $");
|
||||
#include <time.h>
|
||||
|
||||
#define MVPAUSE 5 /* time to sleep when stuck */
|
||||
#define MAXUSERS 35 /* maximum number of users */
|
||||
|
||||
extern const char *const instr[]; /* text of instructions */
|
||||
extern const char *const message[]; /* update message */
|
||||
@@ -73,18 +72,8 @@ const char *const contin[] = { /* pause message */
|
||||
"",
|
||||
0
|
||||
};
|
||||
#if 0
|
||||
static char user1a[] =
|
||||
"Sorry, you cannot play backgammon when there are more than ";
|
||||
static char user1b[] =
|
||||
" users\non the system.";
|
||||
static char user2a[] =
|
||||
"\nThere are now more than ";
|
||||
static char user2b[] =
|
||||
" users on the system, so you cannot play\nanother game. ";
|
||||
#endif
|
||||
static const char rules[] = "\nDo you want the rules of the game?";
|
||||
static const char noteach[] = "Teachgammon not available!\n\007";
|
||||
static const char noteach[] = "Teachgammon not available!\n\a";
|
||||
static const char need[] = "Do you need instructions for this program?";
|
||||
static const char askcol[] =
|
||||
"Enter 'r' to play red, 'w' to play white, 'b' to play both:";
|
||||
@@ -106,7 +95,7 @@ static char pbuf[10];
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc __attribute__((unused));
|
||||
int argc __attribute__((__unused__));
|
||||
char **argv;
|
||||
{
|
||||
int i; /* non-descript index */
|
||||
@@ -128,16 +117,6 @@ main(argc, argv)
|
||||
bg_raw.c_lflag &= ~ICANON; /* set up modes */
|
||||
ospeed = cfgetospeed(&old); /* for termlib */
|
||||
|
||||
/* check user count */
|
||||
#ifdef CORY
|
||||
if (ucount() > MAXUSERS) {
|
||||
writel(user1a);
|
||||
wrint(MAXUSERS);
|
||||
writel(user1b);
|
||||
getout(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* get terminal capabilities, and decide if it can cursor address */
|
||||
tflag = getcaps(getenv("TERM"));
|
||||
/* use whole screen for text */
|
||||
@@ -489,37 +468,26 @@ main(argc, argv)
|
||||
if (tflag)
|
||||
refresh();
|
||||
|
||||
/*
|
||||
* If any men have been born off, it's a single game,
|
||||
* regardless of where other men are.
|
||||
*/
|
||||
|
||||
if (*offptr > 0) {
|
||||
// Single game.
|
||||
} else {
|
||||
/* backgammon? */
|
||||
mflag = 0;
|
||||
l = bar + 7 * cturn;
|
||||
for (i = bar; i != l; i += cturn)
|
||||
if (board[i] * cturn)
|
||||
mflag++;
|
||||
|
||||
/* compute game value */
|
||||
if (tflag)
|
||||
curmove(20, 0);
|
||||
if (*offopp == 15) {
|
||||
if (mflag) {
|
||||
writel(bgammon);
|
||||
gvalue *= 3;
|
||||
} else
|
||||
if (*offptr <= 0) {
|
||||
writel(gammon);
|
||||
gvalue *= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* backgammon? */
|
||||
mflag = 0;
|
||||
l = bar + 7 * cturn;
|
||||
for (i = bar; i != l; i += cturn)
|
||||
if (board[i] * cturn)
|
||||
mflag++;
|
||||
|
||||
/* report situation */
|
||||
/* compute game value */
|
||||
if (tflag)
|
||||
curmove(20, 0);
|
||||
if (*offopp == 15 && *offptr <= 0) {
|
||||
if (mflag) {
|
||||
writel(bgammon);
|
||||
gvalue *= 3;
|
||||
} else {
|
||||
writel(gammon);
|
||||
gvalue *= 2;
|
||||
}
|
||||
}
|
||||
/* report situation */
|
||||
if (cturn == -1) {
|
||||
writel("Red wins ");
|
||||
rscore += gvalue;
|
||||
@@ -536,17 +504,6 @@ main(argc, argv)
|
||||
/* write score */
|
||||
wrscore();
|
||||
|
||||
/* check user count */
|
||||
#ifdef CORY
|
||||
if (ucount() > MAXUSERS) {
|
||||
writel(user2a);
|
||||
wrint(MAXUSERS);
|
||||
writel(user2b);
|
||||
rfl = 1;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* see if he wants another game */
|
||||
writel(again);
|
||||
if ((i = yorn('S')) == 0)
|
||||
|
||||
@@ -11,11 +11,16 @@ bsd_games_cfg_no_build_dirs="dm banner fortune factor"
|
||||
# change this later.
|
||||
bsd_games_cfg_sbindir=/usr/sbin
|
||||
|
||||
# Use /usr/man still. Debian doesn't use this part of FHS yet.
|
||||
bsd_games_cfg_man8dir=/usr/man/man8
|
||||
bsd_games_cfg_man6dir=/usr/man/man6
|
||||
bsd_games_cfg_man5dir=/usr/man/man5
|
||||
|
||||
# Debian doesn't like cluttering up the /usr/*/games/ dirs too much,
|
||||
# use a subdir. /var too.
|
||||
bsd_games_cfg_usrlibdir=/usr/lib/games/bsdgames
|
||||
bsd_games_cfg_sharedir=/usr/share/games/bsdgames
|
||||
bsd_games_cfg_varlibdir=/var/games/bsdgames
|
||||
bsd_games_cfg_varlibdir=/var/lib/games/bsdgames
|
||||
|
||||
# Do not do chown now, we arn't running as root.
|
||||
bsd_games_cfg_do_chown=n
|
||||
|
||||
7
debian/changelog
vendored
7
debian/changelog
vendored
@@ -1,9 +1,8 @@
|
||||
bsdgames (2.6-3) unstable; urgency=low
|
||||
bsdgames (2.7-1) unstable; urgency=low
|
||||
|
||||
* FHS. This involves moving to /var/games for all game data. Score files
|
||||
are moved to there in the postinst now.
|
||||
* New upstream release.
|
||||
|
||||
-- Joey Hess <joeyh@master.debian.org> Wed, 8 Sep 1999 17:02:12 -0700
|
||||
-- Joey Hess <joeyh@master.debian.org> Tue, 6 Apr 1999 23:50:51 -0700
|
||||
|
||||
bsdgames (2.6-2) unstable; urgency=low
|
||||
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -2,7 +2,7 @@ Source: bsdgames
|
||||
Section: games
|
||||
Priority: optional
|
||||
Maintainer: Joey Hess <joeyh@master.debian.org>
|
||||
Standards-Version: 3.0.1.1
|
||||
Standards-Version: 2.5.0.0
|
||||
|
||||
Package: bsdgames
|
||||
Architecture: any
|
||||
|
||||
2
debian/copyright
vendored
2
debian/copyright
vendored
@@ -5,7 +5,7 @@ sources from:
|
||||
ftp://sunsite.unc.edu/pub/Linux/Incoming/bsd-games-2.5.tar.gz
|
||||
|
||||
Most programs in this package have the standard BSD copyright. See
|
||||
/usr/share/common-licenses/BSD for the text of this copyright. There are some
|
||||
/usr/doc/copyrigght/BSD for the text of this copyright. There are some
|
||||
exceptions, as follows:
|
||||
|
||||
atc:
|
||||
|
||||
60
debian/postinst
vendored
60
debian/postinst
vendored
@@ -1,50 +1,32 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
SCOREFILES="
|
||||
/var/games/bsdgames/atc_score
|
||||
/var/games/bsdgames/battlestar.log
|
||||
/var/games/bsdgames/cfscores
|
||||
/var/games/bsdgames/criblog
|
||||
/var/games/bsdgames/robots_roll
|
||||
/var/games/bsdgames/saillog
|
||||
/var/games/bsdgames/snake.log
|
||||
/var/games/bsdgames/snakerawscores
|
||||
/var/games/bsdgames/tetris-bsd.scores
|
||||
/var/games/bsdgames/phantasia/characs
|
||||
/var/games/bsdgames/phantasia/gold
|
||||
/var/games/bsdgames/phantasia/lastdead
|
||||
/var/games/bsdgames/phantasia/mess
|
||||
/var/games/bsdgames/phantasia/motd
|
||||
/var/games/bsdgames/phantasia/scoreboard
|
||||
/var/games/bsdgames/phantasia/void
|
||||
/var/games/bsdgames/phantasia/monsters"
|
||||
|
||||
# We used to keep score files in /var/lib/games, and if files are there,
|
||||
# move them into the new location.
|
||||
if [ -d /var/lib/games ]; then
|
||||
for file in $SCOREFILES; do
|
||||
oldfile=`echo $file | sed s:/var/games/:/var/lib/games/:`
|
||||
if [ -e $oldfile ]; then
|
||||
if [ ! -e $file ]; then
|
||||
mv -f $oldfile $file
|
||||
else
|
||||
rm -f $oldfile
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Delete the old directory hierarchy.
|
||||
rm -rf /var/lib/games/bsdgames
|
||||
fi
|
||||
/var/lib/games/bsdgames/atc_score
|
||||
/var/lib/games/bsdgames/battlestar.log
|
||||
/var/lib/games/bsdgames/cfscores
|
||||
/var/lib/games/bsdgames/criblog
|
||||
/var/lib/games/bsdgames/robots_roll
|
||||
/var/lib/games/bsdgames/saillog
|
||||
/var/lib/games/bsdgames/snake.log
|
||||
/var/lib/games/bsdgames/snakerawscores
|
||||
/var/lib/games/bsdgames/tetris-bsd.scores
|
||||
/var/lib/games/bsdgames/phantasia/characs
|
||||
/var/lib/games/bsdgames/phantasia/gold
|
||||
/var/lib/games/bsdgames/phantasia/lastdead
|
||||
/var/lib/games/bsdgames/phantasia/mess
|
||||
/var/lib/games/bsdgames/phantasia/motd
|
||||
/var/lib/games/bsdgames/phantasia/scoreboard
|
||||
/var/lib/games/bsdgames/phantasia/void
|
||||
/var/lib/games/bsdgames/phantasia/monsters"
|
||||
|
||||
# These files cannot just be zero-byte files:
|
||||
if [ ! -e /var/games/bsdgames/phantasia/void ]; then
|
||||
if [ ! -e /var/lib/games/bsdgames/phantasia/void ]; then
|
||||
cp /usr/share/games/bsdgames/phantasia/void \
|
||||
/var/games/bsdgames/phantasia/void
|
||||
/var/lib/games/bsdgames/phantasia/void
|
||||
fi
|
||||
if [ ! -e /var/games/bsdgames/phantasia/monsters ] ; then
|
||||
if [ ! -e /var/lib/games/bsdgames/phantasia/monsters ] ; then
|
||||
cp /usr/share/games/bsdgames/phantasia/monsters \
|
||||
/var/games/bsdgames/phantasia/monsters
|
||||
/var/lib/games/bsdgames/phantasia/monsters
|
||||
fi
|
||||
|
||||
touch $SCOREFILES
|
||||
|
||||
38
debian/postrm
vendored
38
debian/postrm
vendored
@@ -1,30 +1,30 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
SCOREFILES="
|
||||
/var/games/bsdgames/atc_score
|
||||
/var/games/bsdgames/battlestar.log
|
||||
/var/games/bsdgames/cfscores
|
||||
/var/games/bsdgames/criblog
|
||||
/var/games/bsdgames/robots_roll
|
||||
/var/games/bsdgames/saillog
|
||||
/var/games/bsdgames/snake.log
|
||||
/var/games/bsdgames/snakerawscores
|
||||
/var/games/bsdgames/tetris-bsd.scores
|
||||
/var/games/bsdgames/phantasia/characs
|
||||
/var/games/bsdgames/phantasia/gold
|
||||
/var/games/bsdgames/phantasia/lastdead
|
||||
/var/games/bsdgames/phantasia/mess
|
||||
/var/games/bsdgames/phantasia/motd
|
||||
/var/games/bsdgames/phantasia/scoreboard
|
||||
/var/games/bsdgames/phantasia/void
|
||||
/var/games/bsdgames/phantasia/monsters"
|
||||
/var/lib/games/bsdgames/atc_score
|
||||
/var/lib/games/bsdgames/battlestar.log
|
||||
/var/lib/games/bsdgames/cfscores
|
||||
/var/lib/games/bsdgames/criblog
|
||||
/var/lib/games/bsdgames/robots_roll
|
||||
/var/lib/games/bsdgames/saillog
|
||||
/var/lib/games/bsdgames/snake.log
|
||||
/var/lib/games/bsdgames/snakerawscores
|
||||
/var/lib/games/bsdgames/tetris-bsd.scores
|
||||
/var/lib/games/bsdgames/phantasia/characs
|
||||
/var/lib/games/bsdgames/phantasia/gold
|
||||
/var/lib/games/bsdgames/phantasia/lastdead
|
||||
/var/lib/games/bsdgames/phantasia/mess
|
||||
/var/lib/games/bsdgames/phantasia/motd
|
||||
/var/lib/games/bsdgames/phantasia/scoreboard
|
||||
/var/lib/games/bsdgames/phantasia/void
|
||||
/var/lib/games/bsdgames/phantasia/monsters"
|
||||
|
||||
# Remove high score files on purge.
|
||||
if [ "$1" = "purge" ]; then
|
||||
rm -f $SCOREFILES
|
||||
fi
|
||||
|
||||
rmdir /var/games/bsdgames/phantasia /var/games/bsdgames \
|
||||
/var/games 2>/dev/null || true
|
||||
rmdir /var/lib/games/bsdgames/phantasia /var/lib/games/bsdgames \
|
||||
/var/lib/games 2>/dev/null || true
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
29
debian/rules
vendored
29
debian/rules
vendored
@@ -27,24 +27,23 @@ binary-arch: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
dh_installdirs usr/share/doc/bsdgames \
|
||||
usr/share/games/bsdgames/phantasia
|
||||
dh_installdirs usr/doc/bsdgames usr/share/games/bsdgames/phantasia
|
||||
|
||||
$(MAKE) install
|
||||
cp atc/BUGS debian/tmp/usr/share/doc/bsdgames/BUGS.atc
|
||||
cp hunt/README debian/tmp/usr/share/doc/bsdgames/README.hunt
|
||||
cp hunt/README.linux debian/tmp/usr/share/doc/bsdgames/README.linux.hunt
|
||||
cp phantasia/README debian/tmp/usr/share/doc/bsdgames/README.phantasia
|
||||
cp boggle/README debian/tmp/usr/share/doc/bsdgames/README.boggle
|
||||
cp boggle/README.linux debian/tmp/usr/share/doc/bsdgames/README.linux.boggle
|
||||
cp atc/BUGS debian/tmp/usr/doc/bsdgames/BUGS.atc
|
||||
cp hunt/README debian/tmp/usr/doc/bsdgames/README.hunt
|
||||
cp hunt/README.linux debian/tmp/usr/doc/bsdgames/README.linux.hunt
|
||||
cp phantasia/README debian/tmp/usr/doc/bsdgames/README.phantasia
|
||||
cp boggle/README debian/tmp/usr/doc/bsdgames/README.boggle
|
||||
cp boggle/README.linux debian/tmp/usr/doc/bsdgames/README.linux.boggle
|
||||
# Since factor is not installed, and primes.6 is a symlink to
|
||||
# factor.6, I need to change that to the actual man page.
|
||||
-rm -f debian/tmp/usr/share/man/man6/factor.6.gz \
|
||||
debian/tmp/usr/share/man/man6/primes.6
|
||||
cp factor/factor.6 debian/tmp/usr/share/man/man6/primes.6
|
||||
-rm -f debian/tmp/usr/man/man6/factor.6.gz \
|
||||
debian/tmp/usr/man/man6/primes.6
|
||||
cp factor/factor.6 debian/tmp/usr/man/man6/primes.6
|
||||
# Move phantasia's binary state files into /usr, they are copied
|
||||
# back to /var in the postinst.
|
||||
mv debian/tmp/var/games/bsdgames/phantasia/{monsters,void} \
|
||||
mv debian/tmp/var/lib/games/bsdgames/phantasia/{monsters,void} \
|
||||
debian/tmp/usr/share/games/bsdgames/phantasia/
|
||||
|
||||
dh_installdocs ChangeLog ChangeLog.0 TODO README \
|
||||
@@ -65,9 +64,9 @@ binary-arch: build
|
||||
chmod g+s debian/tmp/usr/games/{atc,battlestar,canfield,cribbage,robots,snake,tetris-bsd,phantasia,sail}
|
||||
# The game directories need to be sgid too, and let's
|
||||
# remove all the zero byte score files in them.
|
||||
chown root.games debian/tmp/var/games/bsdgames/{,phantasia}
|
||||
chmod g+rws debian/tmp/var/games/bsdgames/{,phantasia}
|
||||
find debian/tmp/var/games/bsdgames -size 0 -exec rm {} \;
|
||||
chown root.games debian/tmp/var/lib/games/bsdgames/{,phantasia}
|
||||
chmod g+rws debian/tmp/var/lib/games/bsdgames/{,phantasia}
|
||||
find debian/tmp/var/lib/games/bsdgames -size 0 -exec rm {} \;
|
||||
|
||||
dh_suidregister
|
||||
|
||||
|
||||
@@ -751,7 +751,7 @@ bad_ver()
|
||||
*/
|
||||
SIGNAL_TYPE
|
||||
sigterm(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
leave(0, (char *) NULL);
|
||||
/* NOTREACHED */
|
||||
@@ -764,7 +764,7 @@ sigterm(dummy)
|
||||
*/
|
||||
SIGNAL_TYPE
|
||||
sigemt(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
leave(1, "Unable to start driver. Try again.");
|
||||
/* NOTREACHED */
|
||||
@@ -777,7 +777,7 @@ sigemt(dummy)
|
||||
*/
|
||||
SIGNAL_TYPE
|
||||
sigalrm(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -804,7 +804,7 @@ rmnl(s)
|
||||
*/
|
||||
SIGNAL_TYPE
|
||||
intr(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
int ch;
|
||||
int explained;
|
||||
|
||||
@@ -184,7 +184,7 @@ main(ac, av)
|
||||
*/
|
||||
void
|
||||
quit(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
endwin();
|
||||
exit(0);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sync.c,v 1.10 1998/09/11 14:15:46 hubertf Exp $ */
|
||||
/* $NetBSD: sync.c,v 1.11 1999/02/10 00:45:46 hubertf Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
||||
Reference in New Issue
Block a user