IGNOREPATH=/etc:/home:/dev:/boot:/root:/tmp:/usr/local:/bin:/sbin:/mnt:/cdrom:/usr/src STRIPLIB=y STRIPBIN=y VERSION=2.13 PROGNAME="BSD games $VERSION" DESC="\ bsd-games (Classic BSD text games collection) \n\ \n\ Games that go in /usr/games: adventure arithmetic atc backgammon \n\ banner battlestar bcd caesar canfield cfscores countmail cribbage \n\ factor fish fortune gomoku hangman hunt mille monop morse number \n\ phantasia pig pom ppt primes quiz rain random robots rot13 sail \n\ snake snscore teachgammon trek wargames worm worms wump \n\ \n\ Adds a call to 'fortune' to /etc/profile.d/ so that users will get a \n\ fortune message when they log in." BUILD=1 MAINTAINER="Mark Post " SOURCE=ftp://metalab.unc.edu/pub/Linux/games PKGNAME=bsd-games-$VERSION-s390-$BUILD TAG=OPT compile() { tar -xzvf $CWD/bsd-games-$VERSION.tar.gz cd bsd-games-$VERSION/ # The next command creates the config.param file and subsequent runs will just # append onto the end, so we need to delete it before we start. rm -f config.params zcat $CWD/bsd-games.config.params.diff.gz | patch -p1 --backup --suffix=.orig # Modify the package installation path cat $CWD/config.params.diff | patch -p1 --backup --suffix=.orig2 cat $CWD/phantasia.makefrag.diff | patch -p1 --backup --suffix=.orig ./configure zcat $CWD/bsd-games.ospeed.diff.gz | patch -p1 --backup --suffix=.orig zcat $CWD/bsd-games.fortunepath.diff.gz | patch -p1 --backup --suffix=.orig zcat $CWD/bsd-games.fortlen.diff.gz | patch -p1 --backup --suffix=.orig zcat $CWD/bsd-games.strfile.8.diff.gz | patch -p1 --backup --suffix=.orig cp fortune/datfiles/unamerican-o.real fortune/datfiles/unamerican-o.fake cp fortune/datfiles/unamerican-o.real unamerican-o make ( cd fortune/datfiles $TMP/bsd-games-$VERSION/fortune/strfile/strfile unamerican-o unamerican-o.dat ) } install() { # Note that we can do a plain "make install" because the installation path was # set by the patch to config.params to be /package-bsd-games make install mkdir -p /package-bsd-games/usr/doc/bsd-games-$VERSION cp -a AUTHORS BUGS INSTALL NEWS PACKAGING README SECURITY THANKS \ TODO YEAR2000 \ /package-bsd-games/usr/doc/bsd-games-$VERSION cp -a fortune/README /package-bsd-games/usr/doc/bsd-games-$VERSION/README.fortune cp -a hunt/README /package-bsd-games/usr/doc/bsd-games-$VERSION/README.hunt cp -a hunt/README.linux /package-bsd-games/usr/doc/bsd-games-$VERSION/README.linux.hunt cp -a phantasia/README /package-bsd-games/usr/doc/bsd-games-$VERSION/README.phantasia cp -a trek/README.linux /package-bsd-games/usr/doc/bsd-games-$VERSION/README.linux.trek mkdir -p /package-bsd-games/etc/profile.d \ /package-bsd-games/usr/share/dict cp -a $CWD/bsd-games-login-fortune.*h /package-bsd-games/etc/profile.d ( cd /package-bsd-games # Add some Linux related quotes: tar -zxvf $CWD/fortunes-linuxcookie.tar.gz tar -zxvf $CWD/fortunes-o.tar.gz # Pat says: I'm not in favor of censorship of any kind. If you are, you'll # have to be the one to delete these: # rm -f /package-bsd-games/usr/share/games/fortunes/limerick # rm -f /package-bsd-games/usr/share/games/fortunes/limerick.dat ) zcat $CWD/hangman-words.gz > /package-bsd-games/usr/share/dict/words ( cd /package-bsd-games/usr/share/games/fortunes for file in *.dat ; do /package-bsd-games/usr/bin/strfile -r `basename $file .dat` done # These ones are rot13: for file in *-o.dat ; do /package-bsd-games/usr/bin/strfile -r -x `basename $file .dat` done ) } attributes() { chown -R root.bin $PKG/package-bsd-games/usr/bin \ $PKG/package-bsd-games/usr/sbin chmod 755 $PKG/package-bsd-games/etc/profile.d/* chmod 644 $PKG/package-bsd-games/var/lib/bsdgames/phantasia/characs chmod 750 $PKG/package-bsd-games/var/lib/bsdgames/sail/ } special() { cd $PKG mv package-bsd-games/* ./ rmdir package-bsd-games/ cd $CTL cat $CWD/slack-desc > slack-desc sed -e 's%package-bsd-games/%%g' doinst.sh > doinst.sh.new cat doinst.sh.new > doinst.sh rm doinst.sh.new }