diff options
-rw-r--r-- | games/an/README | 18 | ||||
-rw-r--r-- | games/an/an.SlackBuild | 94 | ||||
-rw-r--r-- | games/an/an.info | 10 | ||||
-rw-r--r-- | games/an/anaffront.desktop | 7 | ||||
-rw-r--r-- | games/an/anaffront.png | bin | 0 -> 968 bytes | |||
-rw-r--r-- | games/an/doinst.sh | 3 | ||||
-rw-r--r-- | games/an/slack-desc | 19 | ||||
-rw-r--r-- | games/an/usr_share_dict_words_docs.diff | 24 |
8 files changed, 175 insertions, 0 deletions
diff --git a/games/an/README b/games/an/README new file mode 100644 index 0000000000..888b087077 --- /dev/null +++ b/games/an/README @@ -0,0 +1,18 @@ +an (Anagram Generator) + +Generates anagrams for a phrase supplied by the user, the words used in +the anagram are taken from a specified dictionary which should contain +one word per line (default:/usr/share/dict/words). + +On Slackware, /usr/share/dict/words comes from bsd-games, in y/ on the +install media. + +an is a command-line program. If you'd like a GUI frontend also: + +- Install the perl-tk package from slackbuilds.org +- Download anaffront.pl from http://fatphil.org/words/anaffront.pl and + place it in the directory with the SlackBuild script +- Run the SlackBuild. anaffront will be part of the resulting package, + including an entry in KDE's K menu. +- See the author's site at http://fatphil.org/words/an.html for more + information about anaffront. diff --git a/games/an/an.SlackBuild b/games/an/an.SlackBuild new file mode 100644 index 0000000000..9cb48a77dc --- /dev/null +++ b/games/an/an.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/sh + +# Slackware build script for an + +# Written by B. Watson (yalhcru@gmail.com) + +PRGNAM=an +VERSION=${VERSION:-0.95_2} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +TARVER=$( echo $VERSION | sed 's/_/-/g' ) +SRCVER=$( echo $VERSION | sed 's/_.*//' ) + +# Optional GUI frontend (requires perl-tk): +GUI_IN=anaffront.pl +GUI_OUT=anaffront + +rm -rf $PKG +mkdir -p $TMP $PKG/usr/{games,man/man6} $OUTPUT +cd $TMP +rm -rf ${PRGNAM}-${SRCVER} +tar xvf $CWD/${PRGNAM}_$TARVER.tar.gz +cd ${PRGNAM}-$SRCVER +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Slackware's dictionary is in /usr/share/dict/words (not /usr/dict/words). +# an's default dictionary is also /usr/share/dict/words, but the README and +# man page incorrectly state /usr/dict/words. +patch -p1 < $CWD/usr_share_dict_words_docs.diff + +make MANDIR=/usr/man/man6 DEFS="$SLKCFLAGS" +make install DESTDIR=$PKG MANDIR=$PKG/usr/man/man6 + +strip $PKG/usr/games/$PRGNAM +gzip -9 $PKG/usr/man/man6/$PRGNAM.6 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION + +cp \ + COPY* DICTIONARY EXAMPLE.ANAGRAMS HINTS README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/* +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Add the GUI frontend to the package, if the user has it: +if [ -e $CWD/$GUI_IN ]; then + sed 's,/net/noarch/share/dict/anagram,/usr/share/dict/words,' \ + < $CWD/$GUI_IN \ + > $PKG/usr/games/$GUI_OUT + + chmod 755 $PKG/usr/games/$GUI_OUT + mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps + cp $CWD/$GUI_OUT.desktop $PKG/usr/share/applications + +# TODO: Anyone want to design a real icon? IANAGD... + cp $CWD/$GUI_OUT.png $PKG/usr/share/pixmaps + + cat $CWD/doinst.sh > $PKG/install/doinst.sh + + sed -i \ + '15s/$/ This packages includes the anaffront GUI frontend (requires perl-tk)/' \ + $PKG/install/slack-desc +fi + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/an/an.info b/games/an/an.info new file mode 100644 index 0000000000..fc56ea5858 --- /dev/null +++ b/games/an/an.info @@ -0,0 +1,10 @@ +PRGNAM="an" +VERSION="0.95_2" +HOMEPAGE="http://fatphil.org/words/an.html" +DOWNLOAD="http://fatphil.org/words/an_0.95-2.tar.gz" +DOWNLOAD_x86_64="" +MD5SUM="6e3e94e15efceca0d15267d5b462913e" +MD5SUM_x86_64="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" +APPROVED="Erik Hanson" diff --git a/games/an/anaffront.desktop b/games/an/anaffront.desktop new file mode 100644 index 0000000000..fe039a3f0b --- /dev/null +++ b/games/an/anaffront.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=AnAffront +Exec=/usr/games/anaffront +Type=Application +Icon=anaffront +GenericName=Anagram Finder +Categories=Game;LogicGame; diff --git a/games/an/anaffront.png b/games/an/anaffront.png Binary files differnew file mode 100644 index 0000000000..cd0784db9d --- /dev/null +++ b/games/an/anaffront.png diff --git a/games/an/doinst.sh b/games/an/doinst.sh new file mode 100644 index 0000000000..5fb28930db --- /dev/null +++ b/games/an/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/games/an/slack-desc b/games/an/slack-desc new file mode 100644 index 0000000000..1a51a672cf --- /dev/null +++ b/games/an/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +an: an (Anagram Generator) +an: +an: Generates anagrams for a phrase supplied by the user, the words used +an: in the anagram are taken from a specified dictionary which should +an: contain one word per line (default:/usr/share/dict/words). +an: +an: +an: +an: +an: +an: diff --git a/games/an/usr_share_dict_words_docs.diff b/games/an/usr_share_dict_words_docs.diff new file mode 100644 index 0000000000..bcafe1ca19 --- /dev/null +++ b/games/an/usr_share_dict_words_docs.diff @@ -0,0 +1,24 @@ +diff -Naur an-0.95.orig/README an-0.95/README +--- an-0.95.orig/README 2001-03-17 08:58:48.000000000 -0500 ++++ an-0.95/README 2010-01-26 22:56:44.000000000 -0500 +@@ -3,7 +3,7 @@ + + Generates anagrams for a phrase supplied by the user, the words used in the + anagram are taken from a specified dictionary which should contain one +-word per line (default:/usr/dict/words). ++word per line (default:/usr/share/dict/words). + + Read INSTALL for instructions on installing. + +diff -Naur an-0.95.orig/an.6 an-0.95/an.6 +--- an-0.95.orig/an.6 2000-11-13 19:37:48.000000000 -0500 ++++ an-0.95/an.6 2010-01-26 22:56:59.000000000 -0500 +@@ -11,7 +11,7 @@ + .SH DESCRIPTION + .B an + finds all anagrams which can be made from the letters in \fBPHRASE\fP, +-using words in the specified dictionary (default=/usr/dict/words). ++using words in the specified dictionary (default=/usr/share/dict/words). + .SH OPTIONS + .TP + .I \-w, --words |