pkg-deinstall

#!/bin/sh

PATH=/bin:/usr/sbin

if [ -n "${PACKAGE_BUILDING}" ]; then
exit 0
fi

case $2 in
DEINSTALL)
rm -fr ${PKG_PREFIX}/games/atitd

;;

POST-DEINSTALL)
PW=/usr/sbin/pw
USER=atitd
GROUP=atitd

echo -n "Checking for group '$GROUP'... "

if ! ${PW} groupshow $GROUP >/dev/null 2>&1; then
echo "doesn't exist."
else
echo "deleting."
${PW} groupdel -n ${GROUP}
fi

echo -n "Checking for user '$USER'... "

if ! ${PW} usershow $USER >/dev/null 2>&1; then
echo "doesn't exist."
else
echo "deleting."
${PW} userdel -n ${USER}
fi

;;
esac

pkg-descr

The Linux "A Tale in the Desert" (ATITD) client.
A Massively Multiplayer Online Roleplaying Game (MMORPG) by eGenesis.

A free 24 hour demo period is provided for new users to evaluate this game.

System Requirements:

Required:
Pentium III 700
512 MB RAM
32MB 3D Accelerator Graphics Card

Recommended:
Pentium 4 1 GHz
768 MB RAM
GeForce FX/Radeon 9600+

- NVIDIA users may have to reinstall the nvidia-driver port as installing
this port may cause the linux_dri port to be installed. Alternately move
the /compat/linux/usr/X11R6/lib/libGL.so.* libraries out of the way.
- DRI users may experience problems whose solution may be a more up to date
version of MesaGL (ports/graphics/mesagl).

WWW: http://www.atitd.com/

pkg-install

#!/bin/sh

PATH=/bin:/usr/sbin

if [ -n "${PACKAGE_BUILDING}" ]; then
exit 0
fi

case $2 in
PRE-INSTALL)
PW=/usr/sbin/pw
USER=atitd
GROUP=atitd
GECOS="A Tale in the Desert"

echo -n "Checking for group '$GROUP'... "

if ! ${PW} groupshow $GROUP >/dev/null 2>&1; then
echo -n "doesn't exist, adding... "
if ${PW} groupadd $GROUP ; then
echo "success."
else
echo "FAILED!"
exit 1
fi
else
echo "exists."
fi

echo -n "Checking for user '$USER'... "

if ! ${PW} usershow $USER >/dev/null 2>&1; then
echo -n "doesn't exist, adding... "
if ${PW} useradd $USER -c "${GECOS}" -d /nonexistent -g $GROUP -s /sbin/nologin -h - ; then
echo "success."
else
echo "FAILED!"
exit 1
fi
else
echo "exists."
fi

;;
esac