1
0
mirror of https://salsa.debian.org/games-team/bsdgames synced 2025-02-02 15:07:16 -05:00

Revert removal of games.

All previously included games are included again, there is
obviously demand for almost all of them. I've received many
mails and bug reports to please keep a specific program.
So I've decided to re-enable all of them. In my opinion, it's
not sensible to switch to the alternative upstream at
https://sourceforge.net/projects/bsd-games/, because
many games have been removed from those sources.
This version of bsdgames is therefore essentially the same as
version 2.17-30.

Closes: #1069795, #1069807
This commit is contained in:
Dr. Tobias Quathamer 2024-04-26 11:18:59 +02:00
parent 75c589b972
commit 04c3d7395a
22 changed files with 181 additions and 6 deletions

6
debian/control vendored
View File

@ -26,5 +26,7 @@ Description: collection of classic textual unix games
have been enjoyed for decades on unix systems.
.
It includes these programs: adventure, arithmetic, atc, backgammon,
battlestar, caesar, canfield, cribbage, dab, go-fish, gomoku, hack, hangman,
pom, primes, quiz, robots, sail, snake, tetris, trek, worm, wtf, wump
battlestar, bcd, boggle, caesar, canfield, countmail, cribbage, dab,
go-fish, gomoku, hack, hangman, hunt, mille, monop, morse, number,
phantasia, pig, pom, ppt, primes, quiz, rain, random, robots, sail, snake,
tetris, trek, wargames, worm, worms, wtf, wump

8
debian/desktop-files/bcd.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=BCD
Exec=bcd
Icon=bsdgames.svg
Terminal=True
Categories=Game;ConsoleOnly

8
debian/desktop-files/boggle.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Boggle
Exec=boggle
Icon=bsdgames.svg
Terminal=True
Categories=Game;LogicGame;ConsoleOnly

View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Countmail
Exec=countmail
Icon=bsdgames.svg
Terminal=True
Categories=Game;ConsoleOnly

8
debian/desktop-files/hunt.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Hunt
Exec=hunt
Icon=bsdgames.svg
Terminal=True
Categories=Game;StrategyGame;ActionGame;ConsoleOnly

8
debian/desktop-files/mille.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Mille Bornes
Exec=mille
Icon=bsdgames.svg
Terminal=True
Categories=Game;CardGame;ConsoleOnly

8
debian/desktop-files/monop.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Monopoly
Exec=monop
Icon=bsdgames.svg
Terminal=True
Categories=Game;BoardGame

8
debian/desktop-files/morse.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Pig
Exec=pig
Icon=bsdgames.svg
Terminal=True
Categories=Game;KidsGame;ConsoleOnly

8
debian/desktop-files/number.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Number
Exec=number
Icon=bsdgames.svg
Terminal=True
Categories=Game;ConsoleOnly

View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Phantasia
Exec=phantasia
Icon=bsdgames.svg
Terminal=True
Categories=Game;AdventureGame;ConsoleOnly

8
debian/desktop-files/pig.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=PIG
Exec=pig
Icon=bsdgames.svg
Terminal=True
Categories=Game;KidsGame;ConsoleOnly

8
debian/desktop-files/ppt.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=PPT
Exec=ppt
Icon=bsdgames.svg
Terminal=True
Categories=Game;ConsoleOnly

8
debian/desktop-files/quiz.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Quiz
Exec=quiz
Icon=bsdgames.svg
Terminal=True
Categories=Game;ConsoleOnly

8
debian/desktop-files/rain.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Rain
Exec=rain
Icon=bsdgames.svg
Terminal=True
Categories=Game;ConsoleOnly

8
debian/desktop-files/random.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Random
Exec=random
Icon=bsdgames.svg
Terminal=True
Categories=Game;ConsoleOnly

8
debian/desktop-files/wargames.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Wargames
Exec=wargames
Icon=bsdgames.svg
Terminal=True
Categories=Game;ConsoleOnly

8
debian/desktop-files/worms.desktop vendored Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.5
Name=Worms
Exec=worms
Icon=bsdgames.svg
Terminal=True
Categories=Game;ActionGame;ConsoleOnly

1
debian/dirs vendored
View File

@ -1,2 +1,3 @@
usr/share/doc/bsdgames
usr/share/games/bsdgames/phantasia
var/games/bsdgames/hack/save

View File

@ -23,7 +23,7 @@ index 0000000..97d45fb
+bsd_games_cfg_install_prefix=`pwd`/debian/bsdgames
+
+# Do not build or install these games:
+bsd_games_cfg_no_build_dirs="banner bcd boggle countmail dm factor fortune hunt mille monop morse number phantasia pig ppt rain random wargames worms"
+bsd_games_cfg_no_build_dirs="banner dm factor fortune"
+
+# Keep huntd in /usr/sbin as it was in the past. I may
+# change this later.

22
debian/postinst vendored
View File

@ -28,6 +28,14 @@ SCOREFILES="
/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/games/bsdgames/hack/perm
/var/games/bsdgames/hack/record"
@ -45,10 +53,24 @@ if [ -d /var/games/bsdgames-nonfree ]; then
rmdir -p /var/games/bsdgames-nonfree/hack/save 2>/dev/null || true
fi
# These files cannot just be zero-byte files:
if [ ! -e /var/games/bsdgames/phantasia/void ]; then
cp /usr/share/games/bsdgames/phantasia/void \
/var/games/bsdgames/phantasia/void
fi
if [ ! -e /var/games/bsdgames/phantasia/monsters ] ; then
cp /usr/share/games/bsdgames/phantasia/monsters \
/var/games/bsdgames/phantasia/monsters
fi
touch $SCOREFILES
chown root:games $SCOREFILES
chmod 664 $SCOREFILES
# These files may not be world-readable as they have passwords
# in them.
chmod 660 /var/games/bsdgames/phantasia/characs
ADVENTURE_PRIORITY=50
case "$action" in

16
debian/preinst vendored
View File

@ -23,7 +23,15 @@ SCOREFILES="
/var/games/bsdgames/saillog
/var/games/bsdgames/snake.log
/var/games/bsdgames/snakerawscores
/var/games/bsdgames/tetris-bsd.scores"
/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.
@ -32,8 +40,10 @@ if [ -d /var/lib/games ]; then
# Have to set up directory hierarchy, since this is running as a
# preinst.
mkdir -p /var/games/bsdgames/phantasia
chown root:games /var/games/bsdgames
chmod g+rws /var/games/bsdgames
chown root:games /var/games/bsdgames \
/var/games/bsdgames/phantasia
chmod g+rws /var/games/bsdgames \
/var/games/bsdgames/phantasia
for file in $SCOREFILES; do
oldfile=`echo $file | sed s:/var/games/:/var/lib/games/:`

12
debian/rules vendored
View File

@ -23,8 +23,16 @@ override_dh_auto_build:
override_dh_installdocs:
dh_installdocs
cp atc/BUGS debian/bsdgames/usr/share/doc/bsdgames/BUGS.atc
cp hunt/README debian/bsdgames/usr/share/doc/bsdgames/README.hunt
cp phantasia/README debian/bsdgames/usr/share/doc/bsdgames/README.phantasia
cp boggle/README debian/bsdgames/usr/share/doc/bsdgames/README.boggle
cp hack/Original_READ_ME debian/bsdgames/usr/share/doc/bsdgames/Original_READ_ME.hack
cp hack/READ_ME debian/bsdgames/usr/share/doc/bsdgames/READ_ME.hack
# Move phantasia's binary state files into /usr, they are copied
# back to /var in the postinst.
mv debian/bsdgames/var/games/bsdgames/phantasia/monsters \
debian/bsdgames/var/games/bsdgames/phantasia/void \
debian/bsdgames/usr/share/games/bsdgames/phantasia/
cat COPYING >> debian/bsdgames/usr/share/doc/bsdgames/copyright
override_dh_install:
@ -48,6 +56,7 @@ override_dh_fixperms:
debian/bsdgames/usr/games/robots \
debian/bsdgames/usr/games/snake \
debian/bsdgames/usr/games/tetris-bsd \
debian/bsdgames/usr/games/phantasia \
debian/bsdgames/usr/games/sail \
debian/bsdgames/usr/games/hack
chmod g+s debian/bsdgames/usr/games/atc \
@ -57,16 +66,19 @@ override_dh_fixperms:
debian/bsdgames/usr/games/robots \
debian/bsdgames/usr/games/snake \
debian/bsdgames/usr/games/tetris-bsd \
debian/bsdgames/usr/games/phantasia \
debian/bsdgames/usr/games/sail \
debian/bsdgames/usr/games/hack
# The game directories need to be sgid too, and let's
# remove all the zero byte score files in them.
chown root:games debian/bsdgames/var/games/bsdgames/ \
debian/bsdgames/var/games/bsdgames/sail \
debian/bsdgames/var/games/bsdgames/phantasia \
debian/bsdgames/var/games/bsdgames/hack \
debian/bsdgames/var/games/bsdgames/hack/save
chmod g+rws debian/bsdgames/var/games/bsdgames/ \
debian/bsdgames/var/games/bsdgames/sail \
debian/bsdgames/var/games/bsdgames/phantasia \
debian/bsdgames/var/games/bsdgames/hack \
debian/bsdgames/var/games/bsdgames/hack/save
find debian/bsdgames/var/games/bsdgames -size 0 -exec rm {} \;